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

[#21323] fix: wrong networks when asset not available in default account #21689

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

mohsen-ghafouri
Copy link
Contributor

fixes #21323

Summary

The drawer with networks should display the balances of correct account

Areas that maybe impacted

  • Swap asset

Steps to test

  • Go to wallet main page
  • Long-tap on an asset available only second account, and not present in default account
  • Tap swap option.

Result

Simulator.Screen.Recording.-.iPhone.13.-.2024-11-26.at.19.47.35.mp4

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented Nov 26, 2024

Jenkins Builds

Click to see older builds (8)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ af7ccb8 #1 2024-11-26 17:13:55 ~5 min tests 📄log
✔️ af7ccb8 #1 2024-11-26 17:17:41 ~9 min android-e2e 🤖apk 📲
✔️ af7ccb8 #1 2024-11-26 17:18:08 ~9 min ios 📱ipa 📲
✔️ af7ccb8 #1 2024-11-26 17:18:17 ~9 min android 🤖apk 📲
✔️ 1ebbc62 #2 2024-11-27 14:05:54 ~5 min tests 📄log
✔️ 1ebbc62 #2 2024-11-27 14:08:33 ~7 min android-e2e 🤖apk 📲
✔️ 1ebbc62 #2 2024-11-27 14:09:06 ~8 min android 🤖apk 📲
✔️ 1ebbc62 #2 2024-11-27 14:19:03 ~18 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ f977931 #3 2024-11-27 18:22:23 ~4 min tests 📄log
✔️ f977931 #3 2024-11-27 18:26:16 ~8 min android-e2e 🤖apk 📲
✔️ f977931 #3 2024-11-27 18:26:53 ~8 min android 🤖apk 📲
✔️ f977931 #3 2024-11-27 18:29:35 ~11 min ios 📱ipa 📲
✔️ d266453 #5 2024-11-28 06:46:18 ~4 min tests 📄log
✔️ d266453 #5 2024-11-28 06:49:24 ~7 min android-e2e 🤖apk 📲
✔️ d266453 #5 2024-11-28 06:49:51 ~8 min android 🤖apk 📲
✔️ d266453 #5 2024-11-28 06:51:48 ~9 min ios 📱ipa 📲

@status-im-auto
Copy link
Member

75% of end-end tests have passed

Total executed tests: 8
Failed tests: 1
Expected to fail tests: 1
Passed tests: 6
IDs of failed tests: 703133 
IDs of expected to fail tests: 702843 

Failed tests (1)

Click to expand
  • Rerun failed tests

  • Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_profile_switch, id: 703133

    Device 1: Tap on found: Button
    # STEP: Check that removed user is not shown in the list anymore

    critical/chats/test_public_chat_browsing.py:240: in test_restore_multiaccount_with_waku_backup_remove_profile_switch
        self.errors.verify_no_errors()
    base_test_case.py:192: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     zQ3...dWXh5 was not restored as a contact from waku backup!
    E    zQ3...Vacac was not restored as a contact from waku backup!
    E    admin_open was not restored from waku-backup!!
    E    member_open was not restored from waku-backup!!
    E    admin_closed was not restored from waku-backup!!
    E    member_closed was not restored from waku-backup!!
    



    Device sessions

    Expected to fail tests (1)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Skipped due to waku issue on staging fleet]]

    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 TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230
    2. test_wallet_send_eth, id: 727229

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    @Horupa-Olena
    Copy link

    Horupa-Olena commented Nov 28, 2024

    @mohsen-ghafouri Thank you for you PR!

    I tested by cases from table and find next issue for cases №6. Please check it

    ISSUE1: "Select network" drawer displays information for a different account than the one chosen in the "From" drawer.
    Preconditions:
    2 empty account (default keypair)
    2 account with token (import keypair)
    Token - Wrapped Ether.
    0,00026 =0,00014 (first acc, Arb+Opt) + 0,00012 (second acc, Opt)

    Steps:

    1. Longtap on Wrapped Ether on owerview in wallet
    2. Click on "Swap" action in menu
    3. Select the second account with 0.00012 WETH
    4. Observe the information displayed in the "Select network" drawer

    Expected results:

    • The "Select network" drawer should display accurate information about the account chosen in the "From" drawer.
    • If the selected account has tokens on only one network, the "Select network" drawer should not appear, and the user should be redirected to the next step in the swap flow.

    Actual results:
    The "Select network" drawer displays information about a different account, specifically one with tokens on two networks, instead of the chosen account.

    IMG_0077.MP4

    Logs:
    logs (8).zip

    @Horupa-Olena
    Copy link

    @mohsen-ghafouri Thank you for you PR!

    I tested by cases from table and find next issue for cases №6. Please check it

    ISSUE1: "Select network" drawer displays information for a different account than the one chosen in the "From" drawer. Preconditions: 2 empty account (default keypair) 2 account with token (import keypair) Token - Wrapped Ether. 0,00026 =0,00014 (first acc, Arb+Opt) + 0,00012 (second acc, Opt)

    Steps:

    1. Longtap on Wrapped Ether on owerview in wallet
    2. Click on "Swap" action in menu
    3. Select the second account with 0.00012 WETH
    4. Observe the information displayed in the "Select network" drawer

    Expected results:

    • The "Select network" drawer should display accurate information about the account chosen in the "From" drawer.
    • If the selected account has tokens on only one network, the "Select network" drawer should not appear, and the user should be redirected to the next step in the swap flow.

    Actual results: The "Select network" drawer displays information about a different account, specifically one with tokens on two networks, instead of the chosen account.

    IMG_0077.MP4
    Logs: logs (8).zip

    @mohsen-ghafouri If needed, I can help you set up a profile to reproduce the bug on your side, or I can provide you with a seed phrase and backup. However, some setup will still be required, as accounts are currently restored randomly.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Status: IN TESTING
    Development

    Successfully merging this pull request may close these issues.

    Incorrect Select Network appears after navigation back from the changed account
    5 participants