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

feat(bridge-ui): process message #387

Merged
merged 7 commits into from
Dec 8, 2022
Merged

feat(bridge-ui): process message #387

merged 7 commits into from
Dec 8, 2022

Conversation

cyberhorsey
Copy link
Contributor

@cyberhorsey cyberhorsey commented Dec 8, 2022

Uses "0.01" ETH as generic recommend fee for now. Shadab is working ona corresponding PR for the UI for the transactions, so this is jsut the logic and tests, as well as basi UI for processing fee amounts.

In addition, using the claim feature revealed a bug in the relayer: event needs to be captured to a variable on each loop before the goroutine runs, or else it could have advanced before it runs or else there is a race condition. This leads to signals being represented as the ZeroHash, because the iterator has advanced and there is no next Event, or duplicate events being processed,which is a waste of gas.

In addition, some logs have been moved around to always log the event signal, even if it is Removed or the ZeroHash.

@codecov
Copy link

codecov bot commented Dec 8, 2022

Codecov Report

Merging #387 (544ebc3) into main (fe479c8) will increase coverage by 1.29%.
The diff coverage is 93.75%.

@@            Coverage Diff             @@
##             main     #387      +/-   ##
==========================================
+ Coverage   64.04%   65.33%   +1.29%     
==========================================
  Files          89       95       +6     
  Lines        2492     2585      +93     
  Branches      292      309      +17     
==========================================
+ Hits         1596     1689      +93     
- Misses        828      829       +1     
+ Partials       68       67       -1     
Flag Coverage Δ *Carryforward flag
bridge-ui 100.00% <100.00%> (ø)
protocol 59.00% <ø> (+0.07%) ⬆️ Carriedforward from 2c378bc
relayer 68.34% <33.33%> (-0.01%) ⬇️
ui 100.00% <100.00%> (ø) Carriedforward from 2c378bc

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

Impacted Files Coverage Δ
packages/relayer/indexer/filter_then_subscribe.go 19.75% <0.00%> (-0.51%) ⬇️
packages/relayer/indexer/handle_event.go 52.30% <66.66%> (+2.30%) ⬆️
packages/bridge-ui/src/domain/message.ts 100.00% <100.00%> (ø)
packages/bridge-ui/src/erc20/bridge.ts 100.00% <100.00%> (ø)
packages/bridge-ui/src/eth/bridge.ts 100.00% <100.00%> (ø)
packages/bridge-ui/src/proof/service.ts 100.00% <100.00%> (ø)
...ackages/bridge-ui/src/utils/switchEthereumChain.ts 100.00% <100.00%> (ø)
...es/protocol/contracts/thirdparty/LibMerkleTrie.sol 83.13% <0.00%> (-7.23%) ⬇️
.../protocol/contracts/bridge/libs/LibBridgeRetry.sol 88.88% <0.00%> (-5.56%) ⬇️
... and 8 more

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

@cyberhorsey cyberhorsey merged commit d1781c0 into main Dec 8, 2022
@cyberhorsey cyberhorsey deleted the claim branch December 8, 2022 03:29
@github-actions github-actions bot mentioned this pull request Jan 18, 2023
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