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(bridge-ui): pending transactions custom store with better error handling #13581

Merged
merged 11 commits into from
Apr 19, 2023

Conversation

jscriptcoder
Copy link
Contributor

@jscriptcoder jscriptcoder commented Apr 9, 2023

I refactored the part around pending transaction list and added the logic into a custom store that exposes the add() method, and takes care of removing the transaction when it's minded, resolving or rejecting depending on the status of the receipt. We were not informing the user of any failure for the transaction. This changes also fix that

TODO: Better error message, and maybe provide the user with a link to etherscan pointing to the failed transaction for more details.

@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Merging #13581 (1bf0635) into main (a3b7498) will increase coverage by 0.45%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main   #13581      +/-   ##
==========================================
+ Coverage   36.13%   36.58%   +0.45%     
==========================================
  Files         124      126       +2     
  Lines        3778     3805      +27     
  Branches      502      504       +2     
==========================================
+ Hits         1365     1392      +27     
  Misses       2321     2321              
  Partials       92       92              
Flag Coverage Δ *Carryforward flag
bridge-ui 94.55% <100.00%> (+0.35%) ⬆️
eventindexer ∅ <ø> (∅) Carriedforward from 190c452
protocol 0.00% <ø> (ø) Carriedforward from 190c452
relayer 62.53% <ø> (ø) Carriedforward from 190c452
ui 100.00% <ø> (ø) Carriedforward from 190c452

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
packages/bridge-ui/src/store/transactions.ts 100.00% <100.00%> (ø)
packages/bridge-ui/src/utils/Deferred.ts 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jscriptcoder jscriptcoder enabled auto-merge April 19, 2023 13:21
@jscriptcoder jscriptcoder added this pull request to the merge queue Apr 19, 2023
Merged via the queue into main with commit 394a9d1 Apr 19, 2023
@jscriptcoder jscriptcoder deleted the pending_transactions_custom_store branch April 19, 2023 13:35
@github-actions github-actions bot mentioned this pull request Apr 19, 2023
@github-actions github-actions bot mentioned this pull request Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants