-
Notifications
You must be signed in to change notification settings - Fork 249
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_: check if bridge for token exists in ToChainId before returning contract address for FromChainId #6272
base: develop
Are you sure you want to change the base?
Conversation
Jenkins BuildsClick to see older builds (33)
|
fb700ee
to
d33b39e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #6272 +/- ##
========================================
Coverage 61.82% 61.83%
========================================
Files 843 843
Lines 111286 111288 +2
========================================
+ Hits 68807 68815 +8
- Misses 34506 34507 +1
+ Partials 7973 7966 -7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
dd2988e
to
85f3992
Compare
…contract address for FromChainId Signed-off-by: Brian Sztamfater <brian@status.im>
85f3992
to
661a31b
Compare
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.
Looks like a very nice catch! I'd like the expert @saledjenic to chime in before merging, to be sure.
Currently, Hop does not support some tokens on Base such as DAI or USDT, but the router returns a valid route for such transactions, ending on failed transactions and gas wasting for such cases.
This PR adds a check for the bridge contract receiving chain ID before returning the bridge contract for the sender chain ID, in that way we return an error if the token is not supported on Hop for the receiving chain ID.
We have an issue in status-mobile which this PR should partially fix it (proper fix would be to prevent the user to select unsupported tokens for selected chain): status-im/status-mobile#21964