Repository: dusk-network/rusk (language: rust)

Issue:
web-wallet: Missing "Migration Successful" Step in Wizard
### Description
After completing the migration process using the wizard, the final confirmation step is missing.

### Expected Behavior
- Once the migration completes, the wizard should display a final step or message confirming that the migration has finished successfully.
- This final step should provide a clear success message and any relevant follow-up instructions or links.

### Current Behavior
- After the migration is done, the wizard stays on the `Migration has been submitted`.

### Steps to Reproduce
1. Start the migration wizard.
2. Complete all necessary migration steps.
3. Observe that there is no final confirmation or success message displayed.

### Possible Solutions
- Add a new "Migration Complete" step to the end of the wizard flow.
- Include a success icon, confirmation text, and any guidance for next steps.

### Additional Notes
Clearly indicating a successful migration will improve user confidence and reduce confusion after completion of the process.



Discussion / hints:

Fix patch:
diff --git a/web-wallet/src/lib/components/ExecuteMigration/ExecuteMigration.svelte b/web-wallet/src/lib/components/ExecuteMigration/ExecuteMigration.svelte
index 442bf43a36..dbf5a12492 100644
--- a/web-wallet/src/lib/components/ExecuteMigration/ExecuteMigration.svelte
+++ b/web-wallet/src/lib/components/ExecuteMigration/ExecuteMigration.svelte
@@ -8,11 +8,12 @@
   } from "@mdi/js";
   import { waitForTransactionReceipt } from "@wagmi/core";
   import { isHex } from "viem";
-  import { AppAnchor } from "$lib/components";
+  import { AppAnchor, Banner } from "$lib/components";
   import { Button, Icon } from "$lib/dusk/components";
   import { account, wagmiConfig } from "$lib/migration/walletConnection";
   import { migrate } from "$lib/migration/migration";
   import { createDataStore } from "$lib/dusk/svelte-stores";
+  import { createEventDispatcher } from "svelte";
 
   /** @type {bigint} */
   export let amount;
@@ -23,6 +24,8 @@
   /** @type {HexString} */
   export let migrationContract;
 
+  const dispatch = createEventDispatcher();
+
   /** @type {string} */
   let migrationHash = "";
 
@@ -37,10 +40,15 @@
 
     if (isHex(txHash)) {
       migrationHash = txHash;
-      return waitForTransactionReceipt(wagmiConfig, {
+      const result = await waitForTransactionReceipt(wagmiConfig, {
         confirmations: 10,
         hash: txHash,
       });
+      if (result.status === "success") {
+        dispatch("incrementStep");
+      } else {
+        throw new Error("Could not validate the transaction receipt");
+      }
     } else {
       throw new Error("txHash is not a hex string");
     }
@@ -66,19 +74,19 @@
   {/if}
   {#if migrationHash && chain?.blockExplorers}
     <div class="migrate__execute-approval">
-      <Icon path={mdiCheckDecagramOutline} />
+      <Icon path={mdiTimerSand} />
       <span>Migration has been submitted</span>
     </div>
-    <div class="migrate__execute-notice">
-      <span
-        >Migration takes some minutes to complete. Your transaction is being
-        executed and you can check it <AppAnchor
+    <Banner title="Migration in progress..." variant="info">
+      <p>
+        Migration takes some minutes to complete. Your transaction is being
+        executed and you can check its status <AppAnchor
           href={`${chain.blockExplorers.default.url}/tx/${migrationHash}`}
           target="_blank"
           rel="noopener noreferrer">here</AppAnchor
-        >.</span
-      >
-    </div>
+        >.
+      </p>
+    </Banner>
   {/if}
   {#if (isLoading || !data || error) && !migrationHash}
     <Button
@@ -95,16 +103,6 @@
     justify-content: center;
     flex-direction: column;
 
-    &-notice {
-      font-size: 0.875em;
-      line-height: 1.3125em;
-      padding: 1em 1.375em;
-      border-radius: 0.675em;
-      border: 1px solid var(--primary-color);
-      margin-top: 0.625em;
-      margin-bottom: 1em;
-    }
-
     &-approval {
       display: flex;
       flex-direction: column;
diff --git a/web-wallet/src/lib/containers/MigrateContract/MigrateContract.svelte b/web-wallet/src/lib/containers/MigrateContract/MigrateContract.svelte
index 6c603081d6..b5c0c8d02d 100644
--- a/web-wallet/src/lib/containers/MigrateContract/MigrateContract.svelte
+++ b/web-wallet/src/lib/containers/MigrateContract/MigrateContract.svelte
@@ -1,7 +1,12 @@
 <svelte:options immutable={true} />
 
 <script>
-  import { mdiArrowLeft, mdiArrowRight, mdiWalletOutline } from "@mdi/js";
+  import {
+    mdiArrowLeft,
+    mdiArrowRight,
+    mdiCheckDecagramOutline,
+    mdiWalletOutline,
+  } from "@mdi/js";
   import { getAccount, switchChain } from "@wagmi/core";
   import { formatUnits, parseUnits } from "viem";
   import { onMount } from "svelte";
@@ -22,6 +27,7 @@
   } from "$lib/components";
   import {
     Button,
+    Card,
     ExclusiveChoice,
     Icon,
     Stepper,
@@ -258,10 +264,10 @@
         )}
       </p>
       <span class="migrate__token-balance">
+        Balance:
         {#if connectedWalletBalance === undefined}
-          Loading Balance...
+          <span>Loading...</span>
         {:else}
-          Balance:
           <span
             >{slashDecimals(
               formatUnits(connectedWalletBalance ?? 0n, ercDecimals)
@@ -320,9 +326,8 @@
   {/if}
 
   {#if walletState.isConnected && isAmountValid && isMigrationInitialized}
-    <div class="migrate__wizard">
-      <Stepper steps={2} activeStep={migrationStep} variant="secondary" />
-
+    <Card gap="small">
+      <Stepper steps={3} activeStep={migrationStep} />
       {#if migrationStep === 0}
         <ApproveMigration
           on:incrementStep={() => migrationStep++}
@@ -336,14 +341,20 @@
           chainContract={tokens[network][selectedChain].contract}
           migrationContract={tokens[network][selectedChain].migrationContract}
         />
-      {:else}
+      {:else if migrationStep === 1}
         <ExecuteMigration
+          on:incrementStep={() => migrationStep++}
           amount={parseUnits(amount.replace(",", "."), ercDecimals)}
           currentAddress={walletState.address ?? ""}
           migrationContract={tokens[network][selectedChain].migrationContract}
         />
+      {:else}
+        <div class="migrate__execute">
+          <Icon path={mdiCheckDecagramOutline} />
+          <p>Migration completed successfully!</p>
+        </div>
       {/if}
-    </div>
+    </Card>
   {/if}
 
   {#if !walletState.isConnected}
@@ -393,6 +404,14 @@
     gap: var(--default-gap);
     padding: 1.25em;
 
+    &__execute {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      gap: var(--default-gap);
+      padding: 2.25em 0;
+    }
+
     &__header {
       display: flex;
       justify-content: space-between;


Test patch: