From 419f1cfcbab2002bc46117b29206d8030ffdfc75 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Tue, 20 Dec 2022 12:10:54 -0800 Subject: [PATCH 01/23] tooltop icon --- .../src/components/form/ProcessingFee.svelte | 4 +++ .../src/components/icons/Tooltip.svelte | 33 +++++++++++++++++++ packages/bridge-ui/src/eth/bridge.spec.ts | 1 - 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 packages/bridge-ui/src/components/icons/Tooltip.svelte diff --git a/packages/bridge-ui/src/components/form/ProcessingFee.svelte b/packages/bridge-ui/src/components/form/ProcessingFee.svelte index e0d1436289d..b9cfca13050 100644 --- a/packages/bridge-ui/src/components/form/ProcessingFee.svelte +++ b/packages/bridge-ui/src/components/form/ProcessingFee.svelte @@ -2,6 +2,7 @@ import { _ } from "svelte-i18n"; import { processingFee } from "../../store/fee"; import { ProcessingFeeMethod, PROCESSING_FEE_META } from "../../domain/fee"; + import Tooltip from "../icons/Tooltip.svelte"; export let customFee: string; @@ -17,6 +18,9 @@

{$_("bridgeForm.processingFeeLabel")} + + +

{#each Array.from(PROCESSING_FEE_META) as fee} diff --git a/packages/bridge-ui/src/components/icons/Tooltip.svelte b/packages/bridge-ui/src/components/icons/Tooltip.svelte new file mode 100644 index 00000000000..edd01fb1049 --- /dev/null +++ b/packages/bridge-ui/src/components/icons/Tooltip.svelte @@ -0,0 +1,33 @@ + + + + + + + diff --git a/packages/bridge-ui/src/eth/bridge.spec.ts b/packages/bridge-ui/src/eth/bridge.spec.ts index 000600051bd..045e5a9877a 100644 --- a/packages/bridge-ui/src/eth/bridge.spec.ts +++ b/packages/bridge-ui/src/eth/bridge.spec.ts @@ -3,7 +3,6 @@ import { mainnet, taiko } from "../domain/chain"; import type { Bridge, BridgeOpts } from "../domain/bridge"; import ETHBridge from "./bridge"; import { Message, MessageStatus } from "../domain/message"; -import { src_url_equal } from "svelte/internal"; const mockSigner = { getAddress: jest.fn(), From 13ecfe67c802fbc2854dc2bec188556b1694a10a Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Tue, 20 Dec 2022 12:23:49 -0800 Subject: [PATCH 02/23] processing fee tooltip --- .../bridge-ui/src/components/Tooltip.svelte | 9 +++++++++ .../src/components/form/ProcessingFee.svelte | 18 ++++++++++++++++-- .../{Tooltip.svelte => TooltipIcon.svelte} | 0 .../src/components/modals/Modal.svelte | 12 +++++++++++- .../src/components/modals/TooltipModal.svelte | 17 +++++++++++++++++ 5 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 packages/bridge-ui/src/components/Tooltip.svelte rename packages/bridge-ui/src/components/icons/{Tooltip.svelte => TooltipIcon.svelte} (100%) create mode 100644 packages/bridge-ui/src/components/modals/TooltipModal.svelte diff --git a/packages/bridge-ui/src/components/Tooltip.svelte b/packages/bridge-ui/src/components/Tooltip.svelte new file mode 100644 index 00000000000..0b0b924137f --- /dev/null +++ b/packages/bridge-ui/src/components/Tooltip.svelte @@ -0,0 +1,9 @@ + + + diff --git a/packages/bridge-ui/src/components/form/ProcessingFee.svelte b/packages/bridge-ui/src/components/form/ProcessingFee.svelte index b9cfca13050..3784f5bbf4b 100644 --- a/packages/bridge-ui/src/components/form/ProcessingFee.svelte +++ b/packages/bridge-ui/src/components/form/ProcessingFee.svelte @@ -2,9 +2,11 @@ import { _ } from "svelte-i18n"; import { processingFee } from "../../store/fee"; import { ProcessingFeeMethod, PROCESSING_FEE_META } from "../../domain/fee"; - import Tooltip from "../icons/Tooltip.svelte"; + import TooltipModal from "../modals/TooltipModal.svelte"; + import Tooltip from "../Tooltip.svelte"; export let customFee: string; + let tooltipOpen: boolean = false; function selectProcessingFee(fee) { $processingFee = fee; @@ -18,7 +20,7 @@

{$_("bridgeForm.processingFeeLabel")} - + (tooltipOpen = true)}>

@@ -53,3 +55,15 @@
{/if}
+ + + +

+ Processing Fees are the amount you pay to have your bridge message + processed on the destination chain. +
Use the recommended fee to have a relayer pick it up as soon as they + can, use a custom fee if you okay with waiting, or no fee if you want to come + back here and claim it yourself. +

+
+
diff --git a/packages/bridge-ui/src/components/icons/Tooltip.svelte b/packages/bridge-ui/src/components/icons/TooltipIcon.svelte similarity index 100% rename from packages/bridge-ui/src/components/icons/Tooltip.svelte rename to packages/bridge-ui/src/components/icons/TooltipIcon.svelte diff --git a/packages/bridge-ui/src/components/modals/Modal.svelte b/packages/bridge-ui/src/components/modals/Modal.svelte index 9892318aef0..81ec7f063fb 100644 --- a/packages/bridge-ui/src/components/modals/Modal.svelte +++ b/packages/bridge-ui/src/components/modals/Modal.svelte @@ -12,7 +12,11 @@ }; - + + diff --git a/packages/bridge-ui/src/components/modals/TooltipModal.svelte b/packages/bridge-ui/src/components/modals/TooltipModal.svelte new file mode 100644 index 00000000000..a7ea557e7f7 --- /dev/null +++ b/packages/bridge-ui/src/components/modals/TooltipModal.svelte @@ -0,0 +1,17 @@ + + + +
+
+ +
+ +
+
From 7f0d5597f1e8577691e93bb304cc5f1b67f715fa Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Tue, 20 Dec 2022 12:27:04 -0800 Subject: [PATCH 03/23] memo tooltip --- .../bridge-ui/src/components/form/Memo.svelte | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/bridge-ui/src/components/form/Memo.svelte b/packages/bridge-ui/src/components/form/Memo.svelte index 4da018e853c..fb07f113537 100644 --- a/packages/bridge-ui/src/components/form/Memo.svelte +++ b/packages/bridge-ui/src/components/form/Memo.svelte @@ -1,6 +1,10 @@ -