Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: withdraw deposit popup #8

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,17 @@ export default function Bridge() {
if (!amount || !isConnected || isLoading) {
return;
}
if (activeTab === "deposit") {
setIsConfirmationOpen(true);
}
if (activeTab === "withdraw") {
switch (withdrawStatus) {
case "ready_to_prove":
handleWithdrawProve();
case "proved":
handleWithdrawFinalize();
default:
handleWithdrawInitiate();
setIsConfirmationOpen(true);
}
return;
}
Expand Down Expand Up @@ -433,7 +436,7 @@ export default function Bridge() {

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we remove the delay, does it mean we might still see wevm/viem#3027?


// Finalize the withdrawal
const finalizeHash = await walletClientL1.finalizeWithdrawal({
Expand Down