Skip to content

Commit 22d31b0

Browse files
authored
fix: add back delay and remove comments (#9)
* add back delay * chore: delete comments
1 parent f181040 commit 22d31b0

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

app/page.tsx

+5-8
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ export default function Bridge() {
436436

437437
// waitToFinalize is buggy, so add a delay to wait before finalizing tx (12 secs for testnet)
438438
// TODO: refactor as env var if withdraw window is changed
439-
// await new Promise((resolve) => setTimeout(resolve, 12000));
439+
await new Promise((resolve) => setTimeout(resolve, 12000));
440440

441441
// Finalize the withdrawal
442442
const finalizeHash = await walletClientL1.finalizeWithdrawal({
@@ -592,19 +592,16 @@ export default function Bridge() {
592592
await handleWithdrawWaitTillReadyToProve();
593593
}
594594

595-
// Prove the withdrawal tx on L2
596-
// if (withdrawStatus === "ready_to_prove") {
597-
// await handleWithdrawProve();
598-
// }
595+
// Skip prove withdrawal tx step as it is manually triggered
599596

597+
// Wait until the prove tx is received
600598
if (withdrawStatus === "proving") {
601599
await handleWithdrawAddProveReceipt();
602600
}
603601

604-
// if (withdrawStatus === "proved") {
605-
// await handleWithdrawFinalize();
606-
// }
602+
// Skip finalize withdrawal tx step as it is manually triggered
607603

604+
// Wait until the finalize tx is received
608605
if (withdrawStatus === "finalizing") {
609606
await handleWithdrawAddFinalizeReceipt();
610607
}

0 commit comments

Comments
 (0)