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..6635ca69e6 --- /dev/null +++ b/web-wallet/src/lib/containers/MigrateContract/MigrateContract.svelte @@ -0,0 +1,470 @@ + + + + +
+
+

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/style/dusk/language.css b/web-wallet/src/style/dusk/language.css index 0e094d6e0e..1e0064d2e0 100644 --- a/web-wallet/src/style/dusk/language.css +++ b/web-wallet/src/style/dusk/language.css @@ -136,7 +136,7 @@ /* Controls */ - --non-button-control-bg-color: var(--smokey-black); + --non-button-control-bg-color: #000; --non-button-control-text-color: var(--light-grey); --control-bg-color: var(--light-grey); 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 @@ + + + + + + + + + +