-
Notifications
You must be signed in to change notification settings - Fork 254
feat(wallet)_: Add BNB Smart Chain #6466
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
Conversation
Jenkins BuildsClick to see older builds (201)
|
1cdf97f
to
ff97a8b
Compare
We can get away with treating BEP-20 tokens as ERC-20 tokens since they're basically identical, but for correctness we'll probably want to make this difference explicit at some point. |
services/wallet/router/pathprocessor/processor_swap_paraswap.go
Outdated
Show resolved
Hide resolved
services/wallet/router/pathprocessor/processor_swap_paraswap.go
Outdated
Show resolved
Hide resolved
@smohamedjavid I tried swapping DAI to BNB, it did the approval but then I didn't get the actual Swap. Could you try this in mobile? |
ff97a8b
to
cd0d253
Compare
ee6515a
to
87ad407
Compare
I swapped 2 BUSD for 1.998 DAI: Approval TX | Swap TX Then 1.99 DAI to 0.00368 BNB: Approval TX | Swap TX Everything worked as expected and performed on BSC Mainnet. Let me know if I need to try any different/higher amount values. |
@smohamedjavid alright, swap fixed on Desktop, it was a mistake on my side! |
4b78e43
to
3ce5431
Compare
@smohamedjavid I don't see that you've updated this function status-go/services/wallet/token/token.go Line 639 in 4f33989
Also I don't see a function similar to status-go/services/wallet/token/token.go Line 412 in 4f33989
Basically, we should add it to all places where we use |
I see how the native BNB is added, forget the previous comment. |
3ce5431
to
e89a270
Compare
e89a270
to
333643b
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6466 +/- ##
===========================================
+ Coverage 60.40% 60.51% +0.11%
===========================================
Files 832 833 +1
Lines 103779 104359 +580
===========================================
+ Hits 62688 63155 +467
- Misses 33546 33665 +119
+ Partials 7545 7539 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
12e11a0
to
4be80d4
Compare
Signed-off-by: Mohamed Javid <[email protected]>
Signed-off-by: Mohamed Javid <[email protected]>
Signed-off-by: Mohamed Javid <[email protected]>
Signed-off-by: Mohamed Javid <[email protected]>
Signed-off-by: Mohamed Javid <[email protected]>
…ction for the path type
What's changed: - analyzer updated to identify symbol and decimals collisons - before resolving the collision, the duplicate symbols are resolved within each list by skipping other entries - if there is a symbol collision the uniswap tokens list is the source of truth - if there is a decimal collision (the same symbol, but different decimals used) the symbol is updated (e.g. USDC(6), USDC(18))
Since the decimal collision is solved by adding the decimals as postfix to the symbol name an extra mapping is necessary to map those symbols to/from symbols recognized by the price providers.
…mark Changes include: - Replaced postfix for decimals collision, symbols include l1 chain based mark instead of decimals. - Token filtering logic added to ensure that only chains the app knows about are present (otherwise, it cannot guarantee uniqueness without decimals included). - Replaced hardcoded chain ID with a constant for `TestnetChainID` and added to `AllChainIDs`, which fixed tests balancechecker. - Updated no-balance tests for the router that were failing due to the new BSC chain added.
…P Contracts Signed-off-by: Mohamed Javid <[email protected]>
Signed-off-by: Mohamed Javid <[email protected]>
de9756c
to
c5a5910
Compare
…e provided path tx identity
Signed-off-by: Mohamed Javid <[email protected]>
Signed-off-by: Mohamed Javid <[email protected]>
Signed-off-by: Mohamed Javid <[email protected]>
Signed-off-by: Mohamed Javid <[email protected]>
9f98111
to
bbe8e10
Compare
Need some approval to merge 🙏 |
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.
As agreed let's merge all this and continue fixing branching off the develop branch.
needed for status-im/status-mobile#22309
Summary
This PR adds BNB Smart Chain support
Notes
The bridge is supported as Hop doesn't support BSC