diff --git a/packages/app/playwright/e2e/Bridge.test.ts b/packages/app/playwright/e2e/Bridge.test.ts index 38486cac..7a99b26d 100644 --- a/packages/app/playwright/e2e/Bridge.test.ts +++ b/packages/app/playwright/e2e/Bridge.test.ts @@ -135,6 +135,8 @@ test.describe('Bridge', () => { await page.locator(':nth-match(:text("Done"), 1)').waitFor(); // Check toast success feedback of tx created + // Toast message has delay of 2 seconds + await page.waitForTimeout(2000); await hasText(page, INITIATE_DEPOSIT); await page.locator(':nth-match(:text("Done"), 3)').waitFor(); @@ -215,6 +217,8 @@ test.describe('Bridge', () => { await page.locator(':nth-match(:text("Done"), 1)').waitFor(); // Check toast success feedback of tx created + // Toast message has delay of 2 seconds + await page.waitForTimeout(2000); await hasText(page, INITIATE_WITHDRAW); // check time left feedback @@ -388,6 +392,8 @@ test.describe('Bridge', () => { await page.locator(':nth-match(:text("Done"), 1)').waitFor(); // Check toast success feedback of tx created + // Toast message has delay of 2 seconds + await page.waitForTimeout(2000); await hasText(page, INITIATE_DEPOSIT); await page.locator(':nth-match(:text("Done"), 2)').waitFor(); }); @@ -498,6 +504,8 @@ test.describe('Bridge', () => { await page.locator(':nth-match(:text("Done"), 1)').waitFor(); // Check toast success feedback of tx created + // Toast message has delay of 2 seconds + await page.waitForTimeout(2000); await hasText(page, INITIATE_WITHDRAW); // check time left feedback diff --git a/packages/app/src/systems/Chains/eth/machines/txEthToFuelMachine.tsx b/packages/app/src/systems/Chains/eth/machines/txEthToFuelMachine.tsx index e94ab01c..9738738f 100644 --- a/packages/app/src/systems/Chains/eth/machines/txEthToFuelMachine.tsx +++ b/packages/app/src/systems/Chains/eth/machines/txEthToFuelMachine.tsx @@ -357,10 +357,12 @@ export const txEthToFuelMachine = createMachine( }), notifyEthTxSuccess: (ctx) => { if (ctx.ethTxId && EthTxCache.getTxIsCreated(ctx.ethTxId)) { - toast.success( - 'Deposit successfully initiated. You may now close the popup.', - { duration: 5000 } - ); + setTimeout(() => { + toast.success( + 'Deposit successfully initiated. You may now close the popup.', + { duration: 5000 } + ); + }, 2000); EthTxCache.removeTxCreated(ctx.ethTxId); } }, diff --git a/packages/app/src/systems/Chains/fuel/machines/txFuelToEthMachine.tsx b/packages/app/src/systems/Chains/fuel/machines/txFuelToEthMachine.tsx index 38fe3aef..15b8a40e 100644 --- a/packages/app/src/systems/Chains/fuel/machines/txFuelToEthMachine.tsx +++ b/packages/app/src/systems/Chains/fuel/machines/txFuelToEthMachine.tsx @@ -407,10 +407,12 @@ export const txFuelToEthMachine = createMachine( }, notifyFuelTxSuccess: (ctx) => { if (ctx.fuelTxId && FuelTxCache.getTxIsCreated(ctx.fuelTxId)) { - toast.success( - 'Withdraw successfully initiated. You may now close the popup.', - { duration: 5000 } - ); + setTimeout(() => { + toast.success( + 'Withdraw successfully initiated. You may now close the popup.', + { duration: 5000 } + ); + }, 2000); FuelTxCache.removeTxCreated(ctx.fuelTxId); } },