From ac019c0d03ac4dae2796fd48305c8d5f135cc393 Mon Sep 17 00:00:00 2001 From: Korbinian Date: Fri, 15 Sep 2023 04:47:33 +0200 Subject: [PATCH] chore(bridge-ui-v2): merge main into alpha 5 (#14681) Co-authored-by: xiaodino Co-authored-by: Roger <50648015+RogerLamTd@users.noreply.github.com> Co-authored-by: D <51912515+adaki2004@users.noreply.github.com> Co-authored-by: jeff <113397187+cyberhorsey@users.noreply.github.com> Co-authored-by: Daniel Wang <99078276+dantaik@users.noreply.github.com> Co-authored-by: dave | d1onys1us <13951458+d1onys1us@users.noreply.github.com> Co-authored-by: Kenk --- .../Activities/MobileDetailsDialog.svelte | 13 +- .../Activities/StatusInfoDialog.svelte | 11 +- .../src/components/Bridge/Bridge.svelte | 10 +- .../Bridge/ChainSelectorWrapper.svelte | 1 + .../src/components/Faucet/Faucet.svelte | 12 +- .../TokenDropdown/DropdownView.svelte | 31 +- .../libs/relayer/RelayerAPIService.test.ts | 88 + .../libs/storage/CustomTokenService.test.ts | 37 +- .../src/libs/token/getBalance.test.ts | 1 + .../bridge-ui-v2/src/libs/token/getBalance.ts | 3 +- .../libs/token/getCrossChainAddress.test.ts | 12 +- .../libs/util/mergeTransactions.test.ts | 49 +- packages/eventindexer/.l1.env | 3 +- packages/eventindexer/cmd/flags/generator.go | 8 + packages/eventindexer/cmd/flags/indexer.go | 1 + packages/eventindexer/db/db.go | 4 +- packages/eventindexer/event.go | 4 + packages/eventindexer/generator/config.go | 2 + .../eventindexer/generator/config_test.go | 2 + packages/eventindexer/generator/generator.go | 236 +- packages/eventindexer/http/get_stats.go | 4 +- packages/eventindexer/http/get_stats_test.go | 3 +- packages/eventindexer/indexer/config.go | 4 +- packages/eventindexer/indexer/config_test.go | 43 +- packages/eventindexer/indexer/indexer.go | 2 +- .../indexer/save_block_proposed_event.go | 106 +- .../1666650599_create_events_table.sql | 2 + .../1666650701_create_stats_table.sql | 2 + ...06203931_create_time_series_data_table.sql | 2 +- .../repo/{chart_repo.go => chart.go} | 2 +- packages/eventindexer/repo/event.go | 24 + packages/eventindexer/repo/stat.go | 9 + packages/eventindexer/repo/stat_test.go | 26 +- packages/eventindexer/stat.go | 17 +- packages/eventindexer/tasks/tasks.go | 8 + packages/eventindexer/time_series_data.go | 8 +- packages/fork-diff/index.html | 5243 +++++++++-------- packages/relayer/cmd/flags/indexer.go | 4 +- packages/relayer/db/db.go | 6 +- packages/relayer/indexer/config_test.go | 36 +- packages/relayer/processor/config.go | 3 - packages/relayer/processor/config_test.go | 56 +- .../components/Ecosystem/EcosystemSection.tsx | 61 +- packages/website/package.json | 21 +- packages/website/pages/_app.mdx | 3 - .../website/pages/docs/concepts/bridging.mdx | 30 +- packages/website/pages/ecosystem.mdx | 2 +- .../bridging/bridging-process-message.png | Bin 183712 -> 1186846 bytes .../bridging/bridging-send-message.png | Bin 162453 -> 1939546 bytes .../public/images/ecosystem/catalyst.png | Bin 0 -> 34626 bytes .../public/images/ecosystem/cyberscan.png | Bin 0 -> 35406 bytes .../public/images/ecosystem/movechess.png | Bin 0 -> 73995 bytes .../public/images/ecosystem/stakeme.png | Bin 0 -> 312372 bytes .../public/images/ecosystem/x7finance.png | Bin 0 -> 30573 bytes pnpm-lock.yaml | 1523 +++-- 55 files changed, 4769 insertions(+), 3009 deletions(-) create mode 100644 packages/bridge-ui-v2/src/libs/relayer/RelayerAPIService.test.ts rename packages/bridge-ui-v2/src/{test => }/libs/util/mergeTransactions.test.ts (73%) rename packages/eventindexer/repo/{chart_repo.go => chart.go} (96%) create mode 100644 packages/website/public/images/ecosystem/catalyst.png create mode 100644 packages/website/public/images/ecosystem/cyberscan.png create mode 100644 packages/website/public/images/ecosystem/movechess.png create mode 100644 packages/website/public/images/ecosystem/stakeme.png create mode 100644 packages/website/public/images/ecosystem/x7finance.png diff --git a/packages/bridge-ui-v2/src/components/Activities/MobileDetailsDialog.svelte b/packages/bridge-ui-v2/src/components/Activities/MobileDetailsDialog.svelte index 55b467db2c5..6077e555914 100644 --- a/packages/bridge-ui-v2/src/components/Activities/MobileDetailsDialog.svelte +++ b/packages/bridge-ui-v2/src/components/Activities/MobileDetailsDialog.svelte @@ -11,18 +11,25 @@ import ChainSymbolName from './ChainSymbolName.svelte'; import Status from './Status.svelte'; + import StatusInfoDialog from './StatusInfoDialog.svelte'; export let closeDetails = noop; export let detailsOpen = false; export let selectedItem: BridgeTransaction | null; + let openStatusDialog = false; + let tooltipOpen = false; const openToolTip = (event: Event) => { event.stopPropagation(); tooltipOpen = !tooltipOpen; }; let dialogId = `dialog-${uid()}`; + + const handleStatusDialog = () => { + openStatusDialog = !openStatusDialog; + }; @@ -54,7 +61,9 @@ - TODO: add description about status here +
@@ -77,3 +86,5 @@
+ + diff --git a/packages/bridge-ui-v2/src/components/Activities/StatusInfoDialog.svelte b/packages/bridge-ui-v2/src/components/Activities/StatusInfoDialog.svelte index 969734705ad..3a1af6a844d 100644 --- a/packages/bridge-ui-v2/src/components/Activities/StatusInfoDialog.svelte +++ b/packages/bridge-ui-v2/src/components/Activities/StatusInfoDialog.svelte @@ -4,8 +4,11 @@ import { Icon } from '$components/Icon'; import { uid } from '$libs/util/uid'; - let dialogId = `dialog-${uid()}`; - let modalOpen = false; + export let modalOpen = false; + + export let noIcon = false; + + const dialogId = `dialog-${uid()}`; const closeModal = () => (modalOpen = false); @@ -34,7 +37,9 @@ on:click={openModal} on:focus={openModal} class=" ml-[4px]"> - + {#if !noIcon} + + {/if} diff --git a/packages/bridge-ui-v2/src/components/Bridge/Bridge.svelte b/packages/bridge-ui-v2/src/components/Bridge/Bridge.svelte index c95249dabc5..99b23917b58 100644 --- a/packages/bridge-ui-v2/src/components/Bridge/Bridge.svelte +++ b/packages/bridge-ui-v2/src/components/Bridge/Bridge.svelte @@ -258,13 +258,13 @@ bridgeTxService.addTxByAddress($account.address, bridgeTx); - // Reset the form - amountComponent.clearAmount(); - recipientComponent.clearRecipient(); - processingFeeComponent.resetProcessingFee(); + // Reset the form (we check if these are still mounted, as the user might have left the page) + if (amountComponent) amountComponent.clearAmount(); + if (recipientComponent) recipientComponent.clearRecipient(); + if (processingFeeComponent) processingFeeComponent.resetProcessingFee(); // Update balance after bridging - amountComponent.updateBalance(); + if (amountComponent) amountComponent.updateBalance(); // Refresh user's balance refreshUserBalance(); diff --git a/packages/bridge-ui-v2/src/components/Bridge/ChainSelectorWrapper.svelte b/packages/bridge-ui-v2/src/components/Bridge/ChainSelectorWrapper.svelte index e92be3c7a79..4354e8b006b 100644 --- a/packages/bridge-ui-v2/src/components/Bridge/ChainSelectorWrapper.svelte +++ b/packages/bridge-ui-v2/src/components/Bridge/ChainSelectorWrapper.svelte @@ -1,5 +1,6 @@ diff --git a/packages/bridge-ui-v2/src/components/TokenDropdown/DropdownView.svelte b/packages/bridge-ui-v2/src/components/TokenDropdown/DropdownView.svelte index 79c13ca570f..eb20ddc6521 100644 --- a/packages/bridge-ui-v2/src/components/TokenDropdown/DropdownView.svelte +++ b/packages/bridge-ui-v2/src/components/TokenDropdown/DropdownView.svelte @@ -60,39 +60,39 @@