From c6e23ad79eeb899551572b0a2a4abcac02339893 Mon Sep 17 00:00:00 2001 From: Korbinian Date: Wed, 20 Sep 2023 13:29:45 +0200 Subject: [PATCH] feat(bridge-ui-v2): insufficient funds modal (#14759) --- .../Transactions/MobileDetailsDialog.svelte | 11 +++- .../src/components/Transactions/Status.svelte | 25 +++++---- .../Transactions/StatusInfoDialog.svelte | 4 +- .../Transactions/Transaction.svelte | 51 +++++++++++++++---- .../Transactions/Transactions.svelte | 18 +------ packages/bridge-ui-v2/src/i18n/en.json | 6 +-- 6 files changed, 68 insertions(+), 47 deletions(-) diff --git a/packages/bridge-ui-v2/src/components/Transactions/MobileDetailsDialog.svelte b/packages/bridge-ui-v2/src/components/Transactions/MobileDetailsDialog.svelte index b83f002d4ac..7d6642abe46 100644 --- a/packages/bridge-ui-v2/src/components/Transactions/MobileDetailsDialog.svelte +++ b/packages/bridge-ui-v2/src/components/Transactions/MobileDetailsDialog.svelte @@ -1,4 +1,5 @@ @@ -66,7 +73,7 @@
- +
  • diff --git a/packages/bridge-ui-v2/src/components/Transactions/Status.svelte b/packages/bridge-ui-v2/src/components/Transactions/Status.svelte index 8b5e370c9c7..5b1425ad826 100644 --- a/packages/bridge-ui-v2/src/components/Transactions/Status.svelte +++ b/packages/bridge-ui-v2/src/components/Transactions/Status.svelte @@ -1,6 +1,6 @@ @@ -65,7 +87,11 @@ {/if}
    - + +
    + + + + + diff --git a/packages/bridge-ui-v2/src/components/Transactions/Transactions.svelte b/packages/bridge-ui-v2/src/components/Transactions/Transactions.svelte index 6f91ca3a9fb..b3b121a508b 100644 --- a/packages/bridge-ui-v2/src/components/Transactions/Transactions.svelte +++ b/packages/bridge-ui-v2/src/components/Transactions/Transactions.svelte @@ -15,7 +15,6 @@ import { account, network } from '$stores'; import type { Account } from '$stores/account'; - import MobileDetailsDialog from './MobileDetailsDialog.svelte'; import StatusInfoDialog from './StatusInfoDialog.svelte'; import Transaction from './Transaction.svelte'; @@ -31,11 +30,8 @@ let loadingTxs = false; - let detailsOpen = false; let isDesktopOrLarger: boolean; - let selectedItem: BridgeTransaction | null = null; - const handlePageChange = (detail: number) => { isBlurred = true; setTimeout(() => { @@ -67,16 +63,6 @@ } }; - const closeDetails = () => { - detailsOpen = false; - selectedItem = null; - }; - - const openDetails = (tx: BridgeTransaction) => { - detailsOpen = true; - selectedItem = tx; - }; - const updateTransactions = async (address: Address) => { const { mergedTransactions, outdatedLocalTransactions, error } = await fetchTransactions(address); transactions = mergedTransactions; @@ -136,7 +122,7 @@ class="flex flex-col items-center" style={isBlurred ? `filter: blur(5px); transition: filter ${transitionTime / 1000}s ease-in-out` : ''}> {#each transactionsToShow as item (item.hash)} - openDetails(item)} /> +
    {/each}
    @@ -156,8 +142,6 @@ - - diff --git a/packages/bridge-ui-v2/src/i18n/en.json b/packages/bridge-ui-v2/src/i18n/en.json index a5943f0201f..0c569706904 100644 --- a/packages/bridge-ui-v2/src/i18n/en.json +++ b/packages/bridge-ui-v2/src/i18n/en.json @@ -102,9 +102,9 @@ "release": "Release" }, "status": { - "initiated": { - "name": "Initiated", - "description": "Transaction initiated" + "processing": { + "name": "Processing", + "description": "Transaction is processing. Depending on the pending blocks to be verified this can take up to several minutes." }, "pending": { "name": "Pending",