status-mobile
status-mobile copied to clipboard
fix(wallet)_: token supported networks
fixes #20988
Summary
This PR fixes the networks/chains supported by the token based on the token list fetched from status-go instead of relying on the balance-per-chain map as status-go returns balance for chains only if there is a positive balance.
Platforms
- Android
- iOS
Areas that may be impacted
Functional
- wallet/transactions
Steps to test
Prerequisites: A wallet account with a token balance on one network
- Open Status
- Navigate to
Wallet > Account > Bridge - Verify the supported networks by each token is displayed below each token
- Upon selecting a token, verify the token supported networks are selectable even if there is no balance on that network/chain
- Navigate to
Wallet > Account > Send - Verify the tokens are displayed correctly with networks supported by the token
- Navigate to the routes generation page and verify
Not availabletext is not shown on the receiver side - Verify the transaction can be performed
status: ready
Jenkins Builds
Click to see older builds (36)
| :grey_question: | Commit | :hash: | Finished (UTC) | Duration | Platform | Result |
|---|---|---|---|---|---|---|
| :x: | 015a2333 | #1 | 2024-10-17 12:13:53 | ~3 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | 015a2333 | #1 | 2024-10-17 12:19:15 | ~8 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | 015a2333 | #1 | 2024-10-17 12:19:48 | ~9 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | 015a2333 | #1 | 2024-10-17 12:19:53 | ~9 min | ios |
:iphone:ipa :calling: |
| :heavy_check_mark: | f59d0c02 | #2 | 2024-10-17 15:19:18 | ~4 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | f59d0c02 | #2 | 2024-10-17 15:23:15 | ~8 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | f59d0c02 | #2 | 2024-10-17 15:23:26 | ~8 min | ios |
:iphone:ipa :calling: |
| :heavy_check_mark: | f59d0c02 | #2 | 2024-10-17 15:23:40 | ~9 min | android |
:robot:apk :calling: |
| :x: | f7dc5359 | #3 | 2024-10-18 18:50:23 | ~3 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | f7dc5359 | #3 | 2024-10-18 18:54:20 | ~7 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | f7dc5359 | #3 | 2024-10-18 18:55:15 | ~8 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | f7dc5359 | #3 | 2024-10-18 18:56:27 | ~9 min | ios |
:iphone:ipa :calling: |
| :heavy_check_mark: | 86c47052 | #4 | 2024-10-18 19:21:12 | ~5 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | 86c47052 | #4 | 2024-10-18 19:24:57 | ~8 min | ios |
:iphone:ipa :calling: |
| :heavy_check_mark: | 86c47052 | #4 | 2024-10-18 19:25:00 | ~9 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | 86c47052 | #4 | 2024-10-18 19:26:50 | ~10 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | e42042e6 | #5 | 2024-10-22 11:09:28 | ~5 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | e42042e6 | #5 | 2024-10-22 11:12:03 | ~7 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | e42042e6 | #5 | 2024-10-22 11:12:56 | ~8 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | e42042e6 | #5 | 2024-10-22 11:13:31 | ~9 min | ios |
:iphone:ipa :calling: |
| :heavy_check_mark: | a910aefd | #6 | 2024-10-22 16:31:44 | ~5 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | a910aefd | #6 | 2024-10-22 16:33:51 | ~7 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | a910aefd | #6 | 2024-10-22 16:34:32 | ~7 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | a910aefd | #6 | 2024-10-22 16:35:37 | ~9 min | ios |
:iphone:ipa :calling: |
| :heavy_check_mark: | c920da64 | #7 | 2024-10-23 11:05:05 | ~4 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | c920da64 | #7 | 2024-10-23 11:08:01 | ~7 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | c920da64 | #7 | 2024-10-23 11:08:27 | ~8 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | c920da64 | #7 | 2024-10-23 11:10:51 | ~10 min | ios |
:iphone:ipa :calling: |
| :x: | 6e59d725 | #8 | 2024-10-23 12:15:38 | ~3 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | 6e59d725 | #8 | 2024-10-23 12:19:41 | ~7 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | 6e59d725 | #8 | 2024-10-23 12:21:09 | ~8 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | 6e59d725 | #8 | 2024-10-23 12:22:40 | ~10 min | ios |
:iphone:ipa :calling: |
| :heavy_check_mark: | 435fb405 | #9 | 2024-10-23 12:28:43 | ~4 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | 435fb405 | #9 | 2024-10-23 12:31:38 | ~7 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | 435fb405 | #9 | 2024-10-23 12:31:59 | ~7 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | 435fb405 | #9 | 2024-10-23 12:33:12 | ~8 min | ios |
:iphone:ipa :calling: |
| :grey_question: | Commit | :hash: | Finished (UTC) | Duration | Platform | Result |
|---|---|---|---|---|---|---|
| :heavy_check_mark: | 6090a534 | #10 | 2024-10-23 16:15:42 | ~4 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | 6090a534 | #10 | 2024-10-23 16:18:45 | ~7 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | 6090a534 | #10 | 2024-10-23 16:20:59 | ~10 min | ios |
:iphone:ipa :calling: |
| :heavy_check_mark: | 6090a534 | #10 | 2024-10-23 16:21:29 | ~10 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | 5330c11f | #11 | 2024-10-23 17:26:27 | ~4 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | 5330c11f | #11 | 2024-10-23 17:28:28 | ~6 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | 5330c11f | #11 | 2024-10-23 17:30:21 | ~8 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | 5330c11f | #11 | 2024-10-23 17:32:20 | ~10 min | ios |
:iphone:ipa :calling: |
hey @smohamedjavid, I noticed this PR adds changes in similar places as this one, just as an FYI.
@clauxx - thanks for the heads up 👍 I guess I missed the context. I was under the impression that we need to display the supported networks below each token as we used to display (depending on the balance-per-chain key). I guess I will change it. Please merge your PR and I will make changes on top of it.
Also, wondering if it's possible to isolate the changes in one place only, for instance: when we get the token data from status-go, can we update
balances-per-chainto include the missing chains? I may be missing context here though, just wondering if the other changes are necessary.
That was my first thought too. I was under the impression that the status-go returns the balance even if it's zero in supported chains for all tokens, but it's different for non-default tokens (ETH SNT STT DAI are default tokens). I was inclined to status-go, but I don't want to introduce any bugs close to release.
I will quickly add the missing chain while we save it to the app-db. I need to ensure the token list (as we depend on it for supported chains for each token) is fetched before we fetch the tokens for each account so that we can add any missing chains in balance-per-chain. I will make a quick update.
hi @smohamedjavid could you please resolve existing conflicts? thanx!
hi @smohamedjavid could you please resolve existing conflicts? thanx!
@VolodLytvynenko - Done 👍
88% of end-end tests have passed
Total executed tests: 8
Failed tests: 1
Expected to fail tests: 0
Passed tests: 7
IDs of failed tests: 702843
Failed tests (1)
Click to expand
Class TestCommunityMultipleDeviceMerged:
| 1. test_community_message_edit, id: 702843 |
Device 1: Device 2: |
Passed tests (7)
Click to expand
Class TestCommunityOneDeviceMerged:
| 1. test_community_copy_and_paste_message_in_chat_input, id: 702742 |
| Device sessions Device 1: |
| 2. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133 |
| Device sessions Device 1: |
Class TestWalletOneDevice:
| 1. test_wallet_add_remove_regular_account, id: 727231 |
| 2. test_wallet_balance_mainnet, id: 740490 |
Class TestOneToOneChatMultipleSharedDevicesNewUi:
| 1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745 |
| Device sessions Device 1: Device 2: |
Class TestWalletMultipleDevice:
| 1. test_wallet_send_asset_from_drawer, id: 727230 |
| 2. test_wallet_send_eth, id: 727229 |
Hi @smohamedjavid thank you for PR. take a look at found issue:
ISSUE 1: Network drawer shows networks with 0 balances
Steps:
- Restore user with assets on a specific network (excluding DAI, ETH, SNT).
- Go to the wallet page.
- Long tap the asset and tap "swap."
Actual result:
The network drawer displays networks where the asset isn't present.
Example: I have Chainlink on Optimism only, but I see Mainnet and Arbitrum in the network selection drawer as well
https://github.com/user-attachments/assets/451e83eb-e0a0-4855-8e29-5330b046c1c4
Expected result:
The drawer should only show networks where the selected asset exists. In case if user has assets only on one network, then current user should be navigated directly to the swap page. See on nightly
https://github.com/user-attachments/assets/c3c33577-c8a8-4522-8d58-4f58cfa42c6a
Devices:
Pixel 7a, Android 13 iPhone 11 Pro Max, iOS 17
@VolodLytvynenko - Thanks for testing the PR 🙏 . The issue 1 should be fixed now. Please retest.
ISSUE 2: 'Not available' shown in TO section if token isn't available on selected network
Steps:
- Restore user with a token available on one or two networks. (However this token should be supported on the all networks. Example: ETH, DAI etc)
- Go to the send flow.
- Try to build a route.
Actual result:
User can't build a bridge route on the send page for a network where the asset isn't available.
Example: In my case the user has DAI on the L1 network, but in the "send to" page, Optimism and Arbitrum are shown as 'Not available' in the TO section.
Expected result:
The networks should be shown as available on send to page in case if user even does not have assets on current networks
OS:
IOS, Android
Devices:
- Pixel 7a, Android 13
- iPhone 11 Pro Max, IOS 17
@VolodLytvynenko - The issue 2 should be fixed now. Please retest. 🙏
62% of end-end tests have passed
Total executed tests: 8
Failed tests: 3
Expected to fail tests: 0
Passed tests: 5
IDs of failed tests: 727231,740490,702843
Failed tests (3)
Click to expand
Class TestWalletOneDevice:
| 1. test_wallet_add_remove_regular_account, id: 727231 |
|
| 2. test_wallet_balance_mainnet, id: 740490 |
|
Class TestCommunityMultipleDeviceMerged:
| 1. test_community_message_edit, id: 702843 |
Device 1: Device 2: |
Passed tests (5)
Click to expand
Class TestWalletMultipleDevice:
| 1. test_wallet_send_asset_from_drawer, id: 727230 |
| 2. test_wallet_send_eth, id: 727229 |
Class TestOneToOneChatMultipleSharedDevicesNewUi:
| 1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745 |
| Device sessions Device 1: Device 2: |
Class TestCommunityOneDeviceMerged:
| 1. test_community_copy_and_paste_message_in_chat_input, id: 702742 |
| Device sessions Device 1: |
| 2. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133 |
| Device sessions Device 1: |
@smohamedjavid Thank you for fixes. Unfortunatly one more place related to this issue is introduced after last commit, however can be considered as follow up
PR_ISSUE 3: Token shown as 'Not available' in "edit preferences" drawer despite being supported
Steps::
- Restore user with a token available on one or two networks. (However this token should be supported on the all networks. Example: ETH, DAI etc)
- Go to the send flow.
- Try to build a route.
- Tap "edit" button to enable "edit preferences" drawer
https://github.com/user-attachments/assets/56fb5350-1735-4269-ae4f-67179fb26c14
Actual result:
The token is shown as 'Not available' in the "edit preferences" drawer, even though the token is supported on the selected networks.
Expected result:
The token should be shown as supported in the "edit preferences" drawer if it is supported on those networks
Devices:
- Pixel 7a, Android 13
- iPhone 11 Pro Max, IOS 17
@VolodLytvynenko - Issue 3 should be fixed now. Please retest. 🙏
Unfortunately can't understand the root cause of this issue. I will send you the user and the assets where this happens
PR_ISSUE 4: 'Not available' still shown in TO section
Actual result:
Devices:
- Pixel 7a, Android 13
- iPhone 11 Pro Max, IOS 17
@VolodLytvynenko - Issue 4 should be fixed now. Please retest 🙏
75% of end-end tests have passed
Total executed tests: 8
Failed tests: 2
Expected to fail tests: 0
Passed tests: 6
IDs of failed tests: 703133,702843
Failed tests (2)
Click to expand
Class TestCommunityOneDeviceMerged:
| 1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133 |
Device 1: |
Class TestCommunityMultipleDeviceMerged:
| 1. test_community_message_edit, id: 702843 |
Device 1: Device 2: |
Passed tests (6)
Click to expand
Class TestWalletOneDevice:
| 1. test_wallet_add_remove_regular_account, id: 727231 |
| 2. test_wallet_balance_mainnet, id: 740490 |
Class TestCommunityOneDeviceMerged:
| 1. test_community_copy_and_paste_message_in_chat_input, id: 702742 |
| Device sessions Device 1: |
Class TestOneToOneChatMultipleSharedDevicesNewUi:
| 1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745 |
| Device sessions Device 1: Device 2: |
Class TestWalletMultipleDevice:
| 1. test_wallet_send_asset_from_drawer, id: 727230 |
| 2. test_wallet_send_eth, id: 727229 |
0% of end-end tests have passed
Total executed tests: 2
Failed tests: 2
Expected to fail tests: 0
Passed tests: 0
IDs of failed tests: 703133,702843
Failed tests (2)
Click to expand
Class TestCommunityMultipleDeviceMerged:
| 1. test_community_message_edit, id: 702843 |
Device 1: Device 2: |
Class TestCommunityOneDeviceMerged:
| 1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133 |
Device 1: |
hi @smohamedjavid thank you for PR. No issues from my side. PR can be merged