-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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): fix claim eth message processed #13656
fix(bridge-ui): fix claim eth message processed #13656
Conversation
Codecov Report
@@ Coverage Diff @@
## major_protocol_upgrade_alpha3 #13656 +/- ##
=================================================================
+ Coverage 44.82% 44.88% +0.05%
=================================================================
Files 132 132
Lines 3527 3529 +2
Branches 361 362 +1
=================================================================
+ Hits 1581 1584 +3
+ Misses 1845 1844 -1
Partials 101 101
*This pull request uses carry forward flags. Click here to find out more.
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -100,7 +100,7 @@ export class ETHBridge implements Bridge { | |||
opts.msgHash, | |||
); | |||
|
|||
if (messageStatus === MessageStatus.Done) { | |||
if ([MessageStatus.Done, MessageStatus.Failed].includes(messageStatus)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not mistaken when MessageStatus.Failed
is the status, then it is not processed yet. There need to be a 'releaseEther()'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Claimed called after releaseEther it's fine i guess - donno when / how automatized it is on the relayer side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should then throw a different error message here?, In the UI when the status is Failed we show the Release button, claiming will no longer be available, so theoretically the user shouldn't be able to call this function when messageStatus is Failed... Let me make that change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, yes, so basically its kinda not possible for regular users, so then has not too much effect anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a change to throw different error when the message has failed. One could argue though that the message has failed and therefore already processed, but I might be wrong here. @cyberhorsey, what do you think?
In V2 I'd like to use error codes instead of messages
Fixed message already processed when claiming ETH