@@ -436,7 +436,7 @@ export default function Bridge() {
436
436
437
437
// waitToFinalize is buggy, so add a delay to wait before finalizing tx (12 secs for testnet)
438
438
// 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 ) ) ;
440
440
441
441
// Finalize the withdrawal
442
442
const finalizeHash = await walletClientL1 . finalizeWithdrawal ( {
@@ -592,19 +592,16 @@ export default function Bridge() {
592
592
await handleWithdrawWaitTillReadyToProve ( ) ;
593
593
}
594
594
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
599
596
597
+ // Wait until the prove tx is received
600
598
if ( withdrawStatus === "proving" ) {
601
599
await handleWithdrawAddProveReceipt ( ) ;
602
600
}
603
601
604
- // if (withdrawStatus === "proved") {
605
- // await handleWithdrawFinalize();
606
- // }
602
+ // Skip finalize withdrawal tx step as it is manually triggered
607
603
604
+ // Wait until the finalize tx is received
608
605
if ( withdrawStatus === "finalizing" ) {
609
606
await handleWithdrawAddFinalizeReceipt ( ) ;
610
607
}
0 commit comments