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: zkevm tx confirmation callback #3676

Merged
merged 4 commits into from
Jul 13, 2023

Conversation

garethfuller
Copy link
Collaborator

@garethfuller garethfuller commented Jul 10, 2023

Description

It's possible that zkevm rpc state mismatches/caching are causing problems with submitting transactions before approvals are finalized. Like we had already done for Polygon PoS, this PR introduces a 10 confirmation wait before we consider a tx finalized on zkevm.

Additionally, txListener was being used at two levels in several flows, we only need to listen in BalActionSteps and then emit the events to be handled at a higher level. This has been refactored where relevant.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

  • Test zkevm transactions

Checklist:

  • I have performed a self-review of my own code
  • I have requested at least 1 review (If the PR is significant enough, use best judgement here)
  • I have commented my code where relevant, particularly in hard-to-understand areas
  • If package-lock.json has changes, it was intentional.
  • The base of this PR is master if hotfix, develop if not

@vercel
Copy link

vercel bot commented Jul 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
beta-app-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 13, 2023 10:17am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
app-v2 ⬜️ Ignored (Inspect) Jul 13, 2023 10:17am

@garethfuller garethfuller marked this pull request as draft July 11, 2023 19:07
@garethfuller
Copy link
Collaborator Author

There is some additional logic that needs to be fixed here.

@garethfuller garethfuller merged commit 68ddff7 into master Jul 13, 2023
@garethfuller garethfuller deleted the fix/zkevm-tx-confirmation-callback branch July 13, 2023 10:22
joehquak referenced this pull request in Sobal/frontend-v2 Jul 30, 2023
* fix: Wait for 10 confirmations on zkevm

* refactor: Use BalActionStep success/fail events

* chore: Fix tests

* chore: Move notification trigger to action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants