diff --git a/packages/bridge-ui/src/components/ButtonWithTooltip.svelte b/packages/bridge-ui/src/components/ButtonWithTooltip.svelte new file mode 100644 index 00000000000..d065c599256 --- /dev/null +++ b/packages/bridge-ui/src/components/ButtonWithTooltip.svelte @@ -0,0 +1,15 @@ + + +
+ + +
diff --git a/packages/bridge-ui/src/components/Transaction.svelte b/packages/bridge-ui/src/components/Transaction.svelte index 2fbc7b2cdb6..e0a9f137906 100644 --- a/packages/bridge-ui/src/components/Transaction.svelte +++ b/packages/bridge-ui/src/components/Transaction.svelte @@ -27,6 +27,7 @@ import { fetchSigner, switchNetwork } from "@wagmi/core"; import Tooltip from "./Tooltip.svelte"; import Bridge from "../constants/abi/Bridge"; + import ButtonWithTooltip from "./ButtonWithTooltip.svelte"; export let transaction: BridgeTransaction; @@ -114,7 +115,7 @@ }, 20 * 1000); - + @@ -131,6 +132,8 @@ + ($showMessageStatusTooltip = true)}> + {#if !processable} Pending {:else if !transaction.receipt && transaction.status === MessageStatus.New} @@ -147,29 +150,28 @@ controlsLayout={[]} /> - {:else if transaction.receipt && transaction.status === MessageStatus.New} - await claim(transaction)} - > - Claim + {:else if transaction.receipt && transaction.status === MessageStatus.New} + await claim(transaction)} + > + Claim + + {:else if transaction.status === MessageStatus.Retriable} + await claim(transaction)} + > + Retry + + {:else if transaction.status === MessageStatus.Failed} + + Failed + {:else if transaction.status === MessageStatus.Done} + Claimed + {/if} - {:else if transaction.status === MessageStatus.Retriable} - await claim(transaction)} - > - Retry - - {:else if transaction.status === MessageStatus.Failed} - - Failed - {:else if transaction.status === MessageStatus.Done} - Claimed - {/if} - ($showMessageStatusTooltip = true)}> - - + diff --git a/packages/bridge-ui/src/components/Transactions.svelte b/packages/bridge-ui/src/components/Transactions.svelte index c112bc74307..f45855b12b1 100644 --- a/packages/bridge-ui/src/components/Transactions.svelte +++ b/packages/bridge-ui/src/components/Transactions.svelte @@ -10,7 +10,7 @@ {#if $transactions.length} - + diff --git a/packages/bridge-ui/src/components/buttons/SelectToken.svelte b/packages/bridge-ui/src/components/buttons/SelectToken.svelte index 7d26db4231e..b32b1c8782b 100644 --- a/packages/bridge-ui/src/components/buttons/SelectToken.svelte +++ b/packages/bridge-ui/src/components/buttons/SelectToken.svelte @@ -7,6 +7,8 @@ import { ChevronDown } from "svelte-heros-v2"; import { successToast } from "../../utils/toast"; + let dropdownElement: HTMLDivElement; + async function select(t: Token) { if (t === $token) return; token.set(t); @@ -16,15 +18,21 @@ bridgeType.set(BridgeType.ERC20); } successToast(`Token changed to ${t.symbol.toUpperCase()}`); + + // to close the dropdown on click + dropdownElement?.classList.remove('dropdown-open'); + if (document.activeElement instanceof HTMLElement) { + document.activeElement.blur(); + } } -
From To Amount