diff --git a/go.mod b/go.mod index 61d6cb40de7..88cde8d900c 100644 --- a/go.mod +++ b/go.mod @@ -229,7 +229,8 @@ require ( github.com/prysmaticlabs/gohashtree v0.0.3-alpha // indirect github.com/prysmaticlabs/prombbolt v0.0.0-20210126082820-9b7adba6db7c // indirect github.com/quic-go/qpack v0.4.0 // indirect - github.com/quic-go/quic-go v0.42.0 // indirect + github.com/quic-go/qtls-go1-20 v0.3.4 // indirect + github.com/quic-go/quic-go v0.39.4 // indirect github.com/quic-go/webtransport-go v0.6.0 // indirect github.com/raulk/go-watchdog v1.3.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect @@ -269,7 +270,7 @@ require ( go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/dig v1.17.1 // indirect go.uber.org/fx v1.20.1 // indirect - go.uber.org/mock v0.4.0 // indirect + go.uber.org/mock v0.3.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect golang.org/x/crypto v0.22.0 // indirect diff --git a/go.sum b/go.sum index 591d7adf2e8..ca234aa4bcb 100644 --- a/go.sum +++ b/go.sum @@ -992,8 +992,10 @@ github.com/prysmaticlabs/prysm/v4 v4.2.0 h1:87QoRT3Azs7c1Y6SnIq0+CNtQRbAt0sVKGj2 github.com/prysmaticlabs/prysm/v4 v4.2.0/go.mod h1:PQrQtHJeeqTz4K3udN/EX1Gs2xhWR4j93gSj0OQZ1f4= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= -github.com/quic-go/quic-go v0.42.0 h1:uSfdap0eveIl8KXnipv9K7nlwZ5IqLlYOpJ58u5utpM= -github.com/quic-go/quic-go v0.42.0/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M= +github.com/quic-go/qtls-go1-20 v0.3.4 h1:MfFAPULvst4yoMgY9QmtpYmfij/em7O8UUi+bNVm7Cg= +github.com/quic-go/qtls-go1-20 v0.3.4/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= +github.com/quic-go/quic-go v0.39.4 h1:PelfiuG7wXEffUT2yceiqz5V6Pc0TA5ruOd1LcmFc1s= +github.com/quic-go/quic-go v0.39.4/go.mod h1:T09QsDQWjLiQ74ZmacDfqZmhY/NLnw5BC40MANNNZ1Q= github.com/quic-go/webtransport-go v0.6.0 h1:CvNsKqc4W2HljHJnoT+rMmbRJybShZ0YPFDD3NxaZLY= github.com/quic-go/webtransport-go v0.6.0/go.mod h1:9KjU4AEBqEQidGHNDkZrb8CAa1abRaosM2yGOyiikEc= github.com/rabbitmq/amqp091-go v1.9.0 h1:qrQtyzB4H8BQgEuJwhmVQqVHB9O4+MNDJCCAcpc3Aoo= @@ -1225,8 +1227,8 @@ go.uber.org/fx v1.20.1/go.mod h1:iSYNbHf2y55acNCwCXKx7LbWb5WG1Bnue5RDXz1OREg= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= -go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= -go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= +go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo= +go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= diff --git a/packages/bridge-ui/src/components/Alert/FlatAlert.svelte b/packages/bridge-ui/src/components/Alert/FlatAlert.svelte index 6fc7fd4d029..a82472fe189 100644 --- a/packages/bridge-ui/src/components/Alert/FlatAlert.svelte +++ b/packages/bridge-ui/src/components/Alert/FlatAlert.svelte @@ -30,7 +30,7 @@ info: { textClass: 'text-secondary-content', iconType: 'info-circle', - iconFillClass: 'fill-info-content', + iconFillClass: 'fill-secondary-content', }, }; diff --git a/packages/bridge-ui/src/components/Bridge/SharedBridgeComponents/AddressInput/AddressInput.svelte b/packages/bridge-ui/src/components/Bridge/SharedBridgeComponents/AddressInput/AddressInput.svelte index 92fd502b3c7..f7a8d25ce4b 100644 --- a/packages/bridge-ui/src/components/Bridge/SharedBridgeComponents/AddressInput/AddressInput.svelte +++ b/packages/bridge-ui/src/components/Bridge/SharedBridgeComponents/AddressInput/AddressInput.svelte @@ -99,7 +99,7 @@ {#if !quiet} -
+
{#if state === State.INVALID && ethereumAddress} {:else if state === State.TOO_SHORT && ethereumAddress} diff --git a/packages/bridge-ui/src/components/DialogTabs/DialogTab.svelte b/packages/bridge-ui/src/components/DialogTabs/DialogTab.svelte new file mode 100644 index 00000000000..9c1ab0557fe --- /dev/null +++ b/packages/bridge-ui/src/components/DialogTabs/DialogTab.svelte @@ -0,0 +1,40 @@ + + + + + diff --git a/packages/bridge-ui/src/components/DialogTabs/DialogTabs.svelte b/packages/bridge-ui/src/components/DialogTabs/DialogTabs.svelte new file mode 100644 index 00000000000..919434c01d3 --- /dev/null +++ b/packages/bridge-ui/src/components/DialogTabs/DialogTabs.svelte @@ -0,0 +1,24 @@ + + +
+ {#each tabs as tab} + setActiveTab(tab.id)}> + {tab.title} + + {/each} +
diff --git a/packages/bridge-ui/src/components/DialogTabs/index.ts b/packages/bridge-ui/src/components/DialogTabs/index.ts new file mode 100644 index 00000000000..1db8f2a45c8 --- /dev/null +++ b/packages/bridge-ui/src/components/DialogTabs/index.ts @@ -0,0 +1,2 @@ +export { default as DialogTab } from './DialogTab.svelte'; +export { default as DialogTabs } from './DialogTabs.svelte'; diff --git a/packages/bridge-ui/src/components/Icon/Icon.svelte b/packages/bridge-ui/src/components/Icon/Icon.svelte index 95e37b2de99..87b3de139e2 100644 --- a/packages/bridge-ui/src/components/Icon/Icon.svelte +++ b/packages/bridge-ui/src/components/Icon/Icon.svelte @@ -202,7 +202,7 @@ class={fillClass} fill-rule="evenodd" clip-rule="evenodd" - d="M20,6H16V5a3,3,0,0,0-3-3H11A3,3,0,0,0,8,5V6H4A1,1,0,0,0,4,8H5V19a3,3,0,0,0,3,3h8a3,3,0,0,0,3-3V8h1a1,1,0,0,0,0-2ZM10,5a1,1,0,0,1,1-1h2a1,1,0,0,1,1,1V6H10Zm7,14a1,1,0,0,1-1,1H8a1,1,0,0,1-1-1V8H17Z" /> + d="M6.12461 0.699951C5.06146 0.699951 4.19961 1.5618 4.19961 2.62495V2.93484C3.64291 2.98875 3.09083 3.05858 2.54381 3.14386C2.25733 3.18852 2.06129 3.45697 2.10595 3.74346C2.15061 4.02995 2.41907 4.22599 2.70556 4.18132L2.80909 4.16538L3.39814 11.5285C3.47817 12.5289 4.31339 13.2999 5.31701 13.2999H8.68206C9.68568 13.2999 10.5209 12.5289 10.6009 11.5285L11.19 4.16534L11.2938 4.18132C11.5803 4.22599 11.8488 4.02995 11.8934 3.74346C11.9381 3.45697 11.742 3.18852 11.4556 3.14386C10.9085 3.05857 10.3564 2.98874 9.79961 2.93482V2.62495C9.79961 1.5618 8.93776 0.699951 7.87461 0.699951H6.12461ZM6.99968 2.79995C7.58723 2.79995 8.17071 2.81761 8.74961 2.85244V2.62495C8.74961 2.1417 8.35786 1.74995 7.87461 1.74995H6.12461C5.64136 1.74995 5.24961 2.1417 5.24961 2.62495V2.85245C5.82856 2.81762 6.41208 2.79995 6.99968 2.79995ZM5.94903 5.40625C5.93868 5.14758 5.72059 4.94626 5.46192 4.95661C5.20324 4.96696 5.00193 5.18505 5.01228 5.44372L5.22229 10.6937C5.23263 10.9524 5.45072 11.1537 5.7094 11.1434C5.96807 11.133 6.16938 10.9149 6.15904 10.6563L5.94903 5.40625ZM8.98704 5.44372C8.99738 5.18505 8.79607 4.96696 8.5374 4.95661C8.27872 4.94627 8.06063 5.14758 8.05029 5.40625L7.84029 10.6563C7.82994 10.9149 8.03125 11.133 8.28993 11.1434C8.5486 11.1537 8.76669 10.9524 8.77704 10.6937L8.98704 5.44372Z" /> {:else if type === 'adjustments'} { - log('remove token', token); - const address = $account.address; - tokenService.removeToken(token, address as Address); - customTokens = tokenService.getTokens(address as Address); dispatch('tokenRemoved', { token }); }; @@ -155,8 +151,6 @@ ? formatUnits(customTokenWithDetails.balance, customTokenWithDetails.decimals) : 0; - $: customTokens = tokenService.getTokens($account?.address as Address); - $: disabled = state !== AddressInputState.VALID || tokenAddress === '' || tokenAddress.length !== 42; const closeModalIfClickedOutside = (e: MouseEvent) => { @@ -186,7 +180,7 @@ on:addressvalidation={onAddressValidation} bind:state onDialog /> -
+
{#if customTokenWithDetails} {$t('common.name')}: {customTokenWithDetails.symbol} {$t('common.balance')}: {formattedBalance} @@ -194,16 +188,12 @@ {:else if loadingTokenDetails} - {:else} -
+ {:else if state === AddressInputState.DEFAULT} + {/if}
- - - {$t('token_dropdown.custom_token.button')} - - +
{#if customTokens.length > 0}

{$t('token_dropdown.imported_tokens')}

@@ -217,10 +207,15 @@
-
{/each}
+ {:else} + {$t('token_dropdown.no_imported_token')} {/if} +
+ + {$t('token_dropdown.custom_token.button')} +
diff --git a/packages/bridge-ui/src/components/TokenDropdown/DialogView.svelte b/packages/bridge-ui/src/components/TokenDropdown/DialogView.svelte index cf199d2b111..cb355971ce1 100644 --- a/packages/bridge-ui/src/components/TokenDropdown/DialogView.svelte +++ b/packages/bridge-ui/src/components/TokenDropdown/DialogView.svelte @@ -1,34 +1,49 @@ -
    - {#each tokens as t (t.symbol)} -
  • selectToken(t)} - on:keydown={getTokenKeydownHandler(t)}> -
    - - {#if symbolToIconMap[t.symbol] && !t.imported} - - - - {:else} - - - - {/if} - {t.symbol} -
    -
  • - {/each} - {#if !onlyMintable} - {#each customTokens as ct, index (index)} -
  • selectToken(ct)} - on:keydown={getTokenKeydownHandler(ct)}> -
    - - - - {truncateString(ct.symbol, 10)} -
    -
  • - {/each} -
    -
  • - -
  • - {/if} -
- + {$t('token_dropdown.add_custom')} + + + + {/if} + {/if} + +
diff --git a/packages/bridge-ui/src/components/TokenDropdown/TokenDropdown.svelte b/packages/bridge-ui/src/components/TokenDropdown/TokenDropdown.svelte index 07ddc5a7869..5b40f1e2b81 100644 --- a/packages/bridge-ui/src/components/TokenDropdown/TokenDropdown.svelte +++ b/packages/bridge-ui/src/components/TokenDropdown/TokenDropdown.svelte @@ -1,4 +1,5 @@