From d5c771c5d8d7adcc75b75888f7c41fa42bff89bb Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 2 Mar 2023 16:11:33 +0100 Subject: [PATCH 01/27] Get it of unnecessary provider --- .../bridge-ui/src/components/providers/BaseQueries.svelte | 1 - .../bridge-ui/src/components/providers/QueryProvider.svelte | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 packages/bridge-ui/src/components/providers/BaseQueries.svelte diff --git a/packages/bridge-ui/src/components/providers/BaseQueries.svelte b/packages/bridge-ui/src/components/providers/BaseQueries.svelte deleted file mode 100644 index 4fa864ce7aa..00000000000 --- a/packages/bridge-ui/src/components/providers/BaseQueries.svelte +++ /dev/null @@ -1 +0,0 @@ - diff --git a/packages/bridge-ui/src/components/providers/QueryProvider.svelte b/packages/bridge-ui/src/components/providers/QueryProvider.svelte index 91774c4acb8..56dbd5c6213 100644 --- a/packages/bridge-ui/src/components/providers/QueryProvider.svelte +++ b/packages/bridge-ui/src/components/providers/QueryProvider.svelte @@ -1,13 +1,9 @@ - - - + From 8fbe0769a8a0dd2ea46cd2fa929b6db9d7bd5a39 Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 2 Mar 2023 17:00:28 +0100 Subject: [PATCH 02/27] Use reactivity and improve accessibility --- packages/bridge-ui/.editorconfig | 10 ++++ packages/bridge-ui/src/pages/home/Home.svelte | 58 ++++++++++++------- 2 files changed, 47 insertions(+), 21 deletions(-) create mode 100644 packages/bridge-ui/.editorconfig diff --git a/packages/bridge-ui/.editorconfig b/packages/bridge-ui/.editorconfig new file mode 100644 index 00000000000..a6ef10acae1 --- /dev/null +++ b/packages/bridge-ui/.editorconfig @@ -0,0 +1,10 @@ +root=true + +[*] +end_of_line = lf +insert_final_newline = true + +[*.{js,ts,svelte}] +charset = utf-8 +indent_style = space +indent_size = 2 diff --git a/packages/bridge-ui/src/pages/home/Home.svelte b/packages/bridge-ui/src/pages/home/Home.svelte index 1bdc514a8df..f98d558142e 100644 --- a/packages/bridge-ui/src/pages/home/Home.svelte +++ b/packages/bridge-ui/src/pages/home/Home.svelte @@ -1,28 +1,50 @@ -
-
-
- (activeTab = "bridge")}>Bridge +
+ + +
+ +
+ {#if activeTab === "bridge"}
@@ -33,9 +55,3 @@ {/if}
- - From e7391e960be3c3e2967c91385e1ee2825eb0aaba Mon Sep 17 00:00:00 2001 From: Francisco Date: Fri, 3 Mar 2023 13:26:52 +0100 Subject: [PATCH 03/27] Added support for both tokens --- .../src/components/buttons/SelectToken.svelte | 8 ++-- packages/bridge-ui/src/domain/token.ts | 45 +++++++++++-------- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/packages/bridge-ui/src/components/buttons/SelectToken.svelte b/packages/bridge-ui/src/components/buttons/SelectToken.svelte index fe1febe7e00..e0dd814688b 100644 --- a/packages/bridge-ui/src/components/buttons/SelectToken.svelte +++ b/packages/bridge-ui/src/components/buttons/SelectToken.svelte @@ -94,8 +94,8 @@ -{#if $token.symbol === "HORSE" && $signer && tokenBalance && ethers.utils +{#if $signer && tokenBalance && ethers.utils .parseUnits(tokenBalance, $token.decimals) .eq(BigNumber.from(0))}
diff --git a/packages/bridge-ui/src/components/icons/Bull.svelte b/packages/bridge-ui/src/components/icons/Bull.svelte new file mode 100644 index 00000000000..8fd54ba40f1 --- /dev/null +++ b/packages/bridge-ui/src/components/icons/Bull.svelte @@ -0,0 +1,9 @@ + + + diff --git a/packages/bridge-ui/src/components/modals/FaucetModal.svelte b/packages/bridge-ui/src/components/modals/FaucetModal.svelte index 85630aef06f..7329d221195 100644 --- a/packages/bridge-ui/src/components/modals/FaucetModal.svelte +++ b/packages/bridge-ui/src/components/modals/FaucetModal.svelte @@ -1,6 +1,5 @@ diff --git a/packages/bridge-ui/src/components/modals/FaucetModal.svelte b/packages/bridge-ui/src/components/modals/FaucetModal.svelte index 15774a7c978..1863b1e4c87 100644 --- a/packages/bridge-ui/src/components/modals/FaucetModal.svelte +++ b/packages/bridge-ui/src/components/modals/FaucetModal.svelte @@ -1,39 +1,29 @@ - - You can request 1000 {$token.symbol}. {$token.symbol} is only available to be minted - on {import.meta.env - ? import.meta.env.VITE_MAINNET_CHAIN_NAME - : "Ethereum A2"}. If you are on {import.meta.env ? import.meta.env.VITE_TAIKO_CHAIN_NAME : "Taiko A2"}, your network will be changed first. You - must have a small amount of ETH in your {import.meta.env - ? import.meta.env.VITE_MAINNET_CHAIN_NAME - : "Ethereum A2"} wallet to send the transaction. + + You can request 5 {$token.symbol}. {$token.symbol} is only available to be minted on {mainnetName}. + If you are on {taikonetName}, your network will be changed first. You must have a small amount of + ETH in your {mainnetName} wallet to send the transaction.
{/if} -