diff --git a/web-wallet/src/lib/containers/MigrateContract/MigrateContract.svelte b/web-wallet/src/lib/containers/MigrateContract/MigrateContract.svelte new file mode 100644 index 0000000000..6b82a16447 --- /dev/null +++ b/web-wallet/src/lib/containers/MigrateContract/MigrateContract.svelte @@ -0,0 +1,468 @@ + + +
+
+

Migrate

+
+
+ + +
+ + +
+
+ + {#if migrationInProgress} +
+ Another migration is in progress. You can check the status here. +
+ {/if} + +
+

From:

+ + {#if isWalletConnected} +

Connected Wallet:

+

+ {middleEllipsis( + connectedWalletAddress, + calculateAdaptiveCharCount(screenWidth) + )} +

+
+ Balance: {duskFormatter(connectedWalletBalance)} + {selected} DUSK +
+ {/if} +
+ + {#if isWalletConnected} +
+
+
+ {#if selected === ERC_TOKEN} + + {:else} + + {/if} +

DUSK {selected}

+
+ +
+ + +
+ {/if} + + {#if isWalletConnected && !isAmountValid && typeof amount === "number"} +
Not enough balance
+ {/if} + + {#if isWalletConnected && isAmountValid && isMigrationInitialized} +
+
+

+ + Est. Time + + {estimatedTime} +

+

+ + Total Gas Fee + + {gasFee} +

+
+ + + { + isMigrationBeingApproved = true; + await delay(10000); + }, + disabled: isMigrationBeingApproved, + icon: null, + label: "APPROVE MIGRATION", + variant: "primary", + }} + > + {#if !isMigrationBeingApproved} +
+

DUSK token migration requires two transactions:

+
    +
  1. + Approve: Authorize the migration contract to spend your DUSK + tokens. +
  2. +
  3. + Migrate: Transfer your DUSK tokens to the migration contract. +
  4. +
+

+ Both steps must be completed for a successful migration.

Warning: Make sure your wallet has enough funds to pay + for the gas. +

+
+ {:else} +
+ + Approval in progress +
+ {/if} +
+ {}, + icon: null, + label: "EXECUTE MIGRATION", + variant: "primary", + }} + > +
+ + Migration Approved +
+
+ +
+ + Migration in progress +
+
+ Migration takes some minutes to complete. Your transaction is + being executed and you can check it here. +
+
+
+
+ {/if} + + {#if !isWalletConnected} +
+ + diff --git a/web-wallet/src/lib/containers/index.js b/web-wallet/src/lib/containers/index.js index 725cb77dc4..2387cdbe37 100644 --- a/web-wallet/src/lib/containers/index.js +++ b/web-wallet/src/lib/containers/index.js @@ -1,2 +1,3 @@ export { default as StakeContract } from "./StakeContract/StakeContract.svelte"; export { default as TransferContract } from "./TransferContract/TransferContract.svelte"; +export { default as MigrateContract } from "./MigrateContract/MigrateContract.svelte"; diff --git a/web-wallet/src/lib/dusk/components/Wizard/WizardStep.svelte b/web-wallet/src/lib/dusk/components/Wizard/WizardStep.svelte index 1183692daa..484e3e48c9 100644 --- a/web-wallet/src/lib/dusk/components/Wizard/WizardStep.svelte +++ b/web-wallet/src/lib/dusk/components/Wizard/WizardStep.svelte @@ -30,8 +30,8 @@ wizardStore.decrementStep(); } - function handleNext() { - nextButton?.action?.(); + async function handleNext() { + await nextButton?.action?.(); wizardStore.incrementStep(); } diff --git a/web-wallet/src/style/dusk/language.css b/web-wallet/src/style/dusk/language.css index 0e094d6e0e..9df272b560 100644 --- a/web-wallet/src/style/dusk/language.css +++ b/web-wallet/src/style/dusk/language.css @@ -26,6 +26,8 @@ --on-success-color: var(--smokey-black); --on-warning-color: var(--smokey-black); + --input--on-background-color: #fff; + /* Typography */ --main-font-family: "Soehne", "Helvetica Neue", Helvetica, Arial, sans-serif; @@ -131,6 +133,8 @@ --on-primary-color: var(--smokey-black); --on-surface-color: var(--light-grey); + --input--on-background-color: #000; + /* Anchors */ --anchor-color-on-surface: var(--accent-dark-900); diff --git a/web-wallet/static/binance_dusk.svg b/web-wallet/static/binance_dusk.svg new file mode 100644 index 0000000000..efafb55ca7 --- /dev/null +++ b/web-wallet/static/binance_dusk.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/web-wallet/static/binance_dusk_light.svg b/web-wallet/static/binance_dusk_light.svg new file mode 100644 index 0000000000..55bedead06 --- /dev/null +++ b/web-wallet/static/binance_dusk_light.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/web-wallet/static/eth_dusk.svg b/web-wallet/static/eth_dusk.svg new file mode 100644 index 0000000000..14403c9039 --- /dev/null +++ b/web-wallet/static/eth_dusk.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/web-wallet/static/eth_dusk_light.svg b/web-wallet/static/eth_dusk_light.svg new file mode 100644 index 0000000000..7b5ae8ce2b --- /dev/null +++ b/web-wallet/static/eth_dusk_light.svg @@ -0,0 +1,10 @@ + + + + + + + + + +