status-mobile icon indicating copy to clipboard operation
status-mobile copied to clipboard

feat: trigger swap transactions

Open briansztamfater opened this issue 1 year ago • 1 comments

fixes #20381 fixes #20344

Summary

This PR integrates swaps transactions actually triggering after user confirms the transaction. Also adds proper toasts notifications as per designs.

https://github.com/user-attachments/assets/ae5b0be9-575c-437c-b57e-b2c88a43cf13

Platforms

  • Android
  • iOS
Functional
  • wallet / transactions

Steps to test

  • Open Status
  • Login
  • Go to wallet
  • Select an account
  • Select Swap option
  • Select a ERC20 token on Select asset to pay screen
  • Enter a valid amount
  • Wait for swap proposal to appear
  • Tap on "Review swap"
  • Slide to execute the transction
  • Enter password
  • Swap modal should be dismissed and toast should be shown
  • Wait for the swap transaction to be confirmed / failed and proper toasts are shown

status: wip

briansztamfater avatar Aug 28 '24 03:08 briansztamfater

Jenkins Builds

Click to see older builds (60)
:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:x: c1313801 #2 2024-08-28 03:54:26 ~2 min tests :page_facing_up:log
:heavy_check_mark: c1313801 #2 2024-08-28 03:59:22 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: c1313801 #2 2024-08-28 03:59:52 ~7 min android :robot:apk :calling:
:heavy_check_mark: c1313801 #2 2024-08-28 04:02:23 ~10 min ios :iphone:ipa :calling:
:heavy_check_mark: dfcf773c #3 2024-08-28 18:09:51 ~4 min tests :page_facing_up:log
:heavy_check_mark: dfcf773c #3 2024-08-28 18:12:49 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: dfcf773c #3 2024-08-28 18:13:12 ~7 min android :robot:apk :calling:
:heavy_check_mark: dfcf773c #3 2024-08-28 18:15:01 ~9 min ios :iphone:ipa :calling:
:heavy_check_mark: 4b44668d #4 2024-08-29 12:21:49 ~4 min tests :page_facing_up:log
:heavy_check_mark: 4b44668d #4 2024-08-29 12:25:46 ~8 min android-e2e :robot:apk :calling:
:heavy_check_mark: 4b44668d #4 2024-08-29 12:26:12 ~9 min android :robot:apk :calling:
:heavy_check_mark: 4b44668d #4 2024-08-29 12:26:47 ~9 min ios :iphone:ipa :calling:
:x: 698a8ec6 #5 2024-08-29 13:08:54 ~3 min tests :page_facing_up:log
:heavy_check_mark: 698a8ec6 #5 2024-08-29 13:12:04 ~6 min android :robot:apk :calling:
:heavy_check_mark: 698a8ec6 #5 2024-08-29 13:13:15 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 698a8ec6 #5 2024-08-29 13:15:39 ~10 min ios :iphone:ipa :calling:
:x: 538d2a7a #6 2024-08-30 04:34:37 ~3 min tests :page_facing_up:log
:heavy_check_mark: 538d2a7a #6 2024-08-30 04:37:59 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 538d2a7a #6 2024-08-30 04:39:58 ~9 min android :robot:apk :calling:
:heavy_check_mark: 538d2a7a #6 2024-08-30 04:41:41 ~10 min ios :iphone:ipa :calling:
:x: 40088e56 #7 2024-09-02 04:52:12 ~2 min tests :page_facing_up:log
:heavy_check_mark: 40088e56 #7 2024-09-02 04:56:52 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 40088e56 #7 2024-09-02 04:57:56 ~8 min android :robot:apk :calling:
:heavy_check_mark: 40088e56 #7 2024-09-02 04:59:35 ~10 min ios :iphone:ipa :calling:
:x: a87a51b7 #8 2024-09-02 14:10:52 ~2 min tests :page_facing_up:log
:heavy_check_mark: bd3111b7 #9 2024-09-02 14:25:10 ~10 min ios :iphone:ipa :calling:
:heavy_check_mark: bd3111b7 #9 2024-09-02 14:25:55 ~11 min android-e2e :robot:apk :calling:
:x: bd3111b7 #9 2024-09-02 14:28:58 ~14 min tests :page_facing_up:log
:heavy_check_mark: bd3111b7 #9 2024-09-02 14:29:04 ~14 min android :robot:apk :calling:
:x: 184e9fe7 #10 2024-09-02 20:41:23 ~3 min tests :page_facing_up:log
:heavy_check_mark: 184e9fe7 #10 2024-09-02 20:44:36 ~6 min android-e2e :robot:apk :calling:
:heavy_check_mark: 184e9fe7 #10 2024-09-02 20:47:33 ~9 min android :robot:apk :calling:
:heavy_check_mark: 184e9fe7 #10 2024-09-02 20:47:58 ~9 min ios :iphone:ipa :calling:
:x: 066230f3 #11 2024-09-03 13:23:47 ~2 min tests :page_facing_up:log
:heavy_check_mark: 066230f3 #11 2024-09-03 13:28:51 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 066230f3 #11 2024-09-03 13:29:10 ~7 min android :robot:apk :calling:
:heavy_check_mark: 066230f3 #11 2024-09-03 13:31:06 ~9 min ios :iphone:ipa :calling:
:x: 1b58b9cb #12 2024-09-03 15:30:13 ~2 min tests :page_facing_up:log
:heavy_check_mark: 1b58b9cb #12 2024-09-03 15:35:31 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 1b58b9cb #12 2024-09-03 15:35:51 ~7 min android :robot:apk :calling:
:heavy_check_mark: 1b58b9cb #12 2024-09-03 15:38:53 ~10 min ios :iphone:ipa :calling:
:x: 6c6e4e18 #13 2024-09-03 17:10:40 ~3 min tests :page_facing_up:log
:heavy_check_mark: 6c6e4e18 #13 2024-09-03 17:14:31 ~6 min android :robot:apk :calling:
:heavy_check_mark: 6c6e4e18 #13 2024-09-03 17:15:50 ~8 min android-e2e :robot:apk :calling:
:heavy_check_mark: 6c6e4e18 #13 2024-09-03 17:17:16 ~9 min ios :iphone:ipa :calling:
:x: 0ae3d1bc #15 2024-09-03 19:05:11 ~2 min tests :page_facing_up:log
:heavy_check_mark: 0ae3d1bc #15 2024-09-03 19:09:33 ~6 min android :robot:apk :calling:
:heavy_check_mark: 0ae3d1bc #15 2024-09-03 19:10:02 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 981100fb #16 2024-09-03 19:15:07 ~4 min tests :page_facing_up:log
:heavy_check_mark: 981100fb #16 2024-09-03 19:18:23 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 981100fb #16 2024-09-03 19:18:47 ~7 min android :robot:apk :calling:
:heavy_check_mark: 981100fb #16 2024-09-03 19:20:44 ~9 min ios :iphone:ipa :calling:
:heavy_check_mark: ffde94fc #17 2024-09-03 20:08:18 ~4 min tests :page_facing_up:log
:heavy_check_mark: ffde94fc #17 2024-09-03 20:10:38 ~6 min android-e2e :robot:apk :calling:
:heavy_check_mark: ffde94fc #17 2024-09-03 20:11:10 ~6 min android :robot:apk :calling:
:heavy_check_mark: ffde94fc #17 2024-09-03 20:14:27 ~10 min ios :iphone:ipa :calling:
:heavy_check_mark: 85c05f18 #18 2024-09-04 15:49:32 ~4 min tests :page_facing_up:log
:heavy_check_mark: 85c05f18 #18 2024-09-04 15:52:55 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 85c05f18 #18 2024-09-04 15:53:17 ~7 min android :robot:apk :calling:
:heavy_check_mark: 85c05f18 #18 2024-09-04 15:55:50 ~10 min ios :iphone:ipa :calling:
:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:heavy_check_mark: 9940f3c7 #21 2024-09-04 17:02:38 ~4 min tests :page_facing_up:log
:heavy_check_mark: 9940f3c7 #21 2024-09-04 17:04:30 ~6 min android-e2e :robot:apk :calling:
:heavy_check_mark: 9940f3c7 #21 2024-09-04 17:06:26 ~8 min android :robot:apk :calling:
:heavy_check_mark: 9940f3c7 #21 2024-09-04 17:10:52 ~12 min ios :iphone:ipa :calling:
:heavy_check_mark: f12e0e57 #22 2024-09-06 14:20:19 ~4 min tests :page_facing_up:log
:heavy_check_mark: f12e0e57 #22 2024-09-06 14:22:20 ~6 min android-e2e :robot:apk :calling:
:heavy_check_mark: f12e0e57 #22 2024-09-06 14:23:12 ~7 min android :robot:apk :calling:
:heavy_check_mark: f12e0e57 #22 2024-09-06 14:26:18 ~10 min ios :iphone:ipa :calling:

status-im-auto avatar Aug 28 '24 03:08 status-im-auto

71% of end-end tests have passed

Total executed tests: 7
Failed tests: 2
Expected to fail tests: 0
Passed tests: 5
IDs of failed tests: 727230,727229 

Failed tests (2)

Click to expand
  • Rerun failed tests

  • Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    # STEP: Getting ETH amount in the wallet of the sender before transaction
    Device 1: Find `Button` by `xpath`: `//android.view.ViewGroup[contains(@content-desc,'Account 1')]`
    critical/test_wallet.py:164: in test_wallet_send_asset_from_drawer
        sender_balance, receiver_balance, eth_amount_sender, eth_amount_receiver = self._get_balances_before_tx()
    critical/test_wallet.py:43: in _get_balances_before_tx
        self.wallet_1.get_account_element().click()
    ../views/base_element.py:90: in click
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: Button by xpath: `//android.view.ViewGroup[contains(@content-desc,'Account 1')]` is not found on the screen; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
    



    2. test_wallet_send_eth, id: 727229

    Expected amount of confirmations is 7, in fact 80533
    No valid JSON response from Etherscan: Expecting value: line 1 column 1 (char 0)
    critical/test_wallet.py:142: in test_wallet_send_eth
        self.network_api.wait_for_confirmation_of_transaction(address=self.sender['wallet_address'],
    ../support/api/network_api.py:123: in wait_for_confirmation_of_transaction
        transaction = self.get_transactions(address)[0]
     'NoneType' object is not subscriptable
    



    Passed tests (5)

    Click to expand

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    2. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Device sessions

    status-im-auto avatar Aug 29 '24 07:08 status-im-auto

    hi @briansztamfater could you please rebase the current PR? thanx

    VolodLytvynenko avatar Aug 29 '24 08:08 VolodLytvynenko

    @briansztamfater should the swap feature still be feature-flagged? In the latest build, I had to manually enable it in the feature flags to see the swap option

    VolodLytvynenko avatar Aug 29 '24 08:08 VolodLytvynenko

    PR_ISSUE 1: "Something went wrong, please try again later" Error message shown after entering valid value to swap

    Steps:

    1. Go to swap page
    2. Enter valid available value

    Actual result:

    'Something went wrong, please try again later' error message is shown image

    Expected result:

    The user should be able to proceed to the swap confirmation page after entering a valid amount.

    OS:

    IOS, Android

    Devices:

    • Pixel 7a, Android 13
    • iPhone 11 Pro Max, IOS 17

    Logs

    logs (9).zip

    VolodLytvynenko avatar Aug 29 '24 08:08 VolodLytvynenko

    @briansztamfater I think some commits might be missing in the latest build because the swap UI looks completely different from what was shown in the demo compared with the latest build where the issue is found. Could you please check?

    VolodLytvynenko avatar Aug 29 '24 08:08 VolodLytvynenko

    @briansztamfater should the swap feature still be feature-flagged? In the latest build, I had to manually enable it in the feature flags to see the swap option

    We should remove it at some point, I'll raise a new PR removing the flag 👍

    About issue 1, please try again, I have just updated the code. As we don't have a way (yet) to select the asset to receive, I hardcoded USDT for testing purposes, but SNT should be the default, which is a token available for all users. If you don't have USDT in your tokens list that may cause problems for now. Once #21140 is done that should be fine.

    briansztamfater avatar Aug 29 '24 12:08 briansztamfater

    Also I will rebase, it will take some time as there is some PR chaining so I need to rebase the dependant PRs first

    briansztamfater avatar Aug 29 '24 12:08 briansztamfater

    71% of end-end tests have passed

    Total executed tests: 7
    Failed tests: 2
    Expected to fail tests: 0
    Passed tests: 5
    
    IDs of failed tests: 727230,727229 
    

    Failed tests (2)

    Click to expand
  • Rerun failed tests

  • Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    Device 2: Find `Text` by `xpath`: `//android.view.ViewGroup[@content-desc='container']/android.widget.TextView[@text='Ether']/../android.widget.TextView[3]`
    Device 2: `Text` is `0.04239 ETH`
    critical/test_wallet.py:190: in test_wallet_send_asset_from_drawer
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Sender balance is not updated on Etherscan, it is 0.4471 but expected to be 0.4473
    



    2. test_wallet_send_eth, id: 727229

    Device 2: Find Text by xpath: //android.view.ViewGroup[@content-desc='container']/android.widget.TextView[@text='Ether']/../android.widget.TextView[3]
    Device 2: Text is 0.04229 ETH
    critical/test_wallet.py:159: in test_wallet_send_eth
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Sender balance is not updated on Etherscan, it is 0.4474 but expected to be 0.4475
    



    Passed tests (5)

    Click to expand

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    2. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Device sessions

    status-im-auto avatar Aug 29 '24 15:08 status-im-auto

    @briansztamfater thank you for clarification. Unfortunately I am blocked to test the swap flow fully due status go issue .

    Only some UI issues are found:

    ISSUE 2: [Android] Device's native keyboard appears on Swap page

    Steps:

    Go to the swap page within the app on an Android device.

    Actual result:

    The device's native keyboard automatically opens, resulting in two keyboards being displayed: the app's keyboard and the device's native keyboard. image

    Expected result:

    Only the app's keyboard should be displayed, without triggering the device's native keyboard. image

    ENV:

    Pixel 7a, Android 13

    VolodLytvynenko avatar Aug 29 '24 17:08 VolodLytvynenko

    ISSUE 3: Max value balances not updating according to selected account

    Steps:

    1. Recover a user with at least 2 accounts.
    2. Navigate to the swap page.
    3. Select a different account on the swap page.

    Actual result:

    The max value balances displayed do not update to reflect the newly selected account's balances

    https://github.com/user-attachments/assets/59ddf14b-336d-4f14-8943-c33091d98388

    Expected result:

    The max balances should update to reflect the selected account's available funds on the swap page.

    VolodLytvynenko avatar Aug 29 '24 17:08 VolodLytvynenko

    @briansztamfater Not sure if issue 2 and issue 3 are within the scope of this PR. If not, I'll create them separately.

    VolodLytvynenko avatar Aug 29 '24 17:08 VolodLytvynenko

    @VolodLytvynenko thanks for testing! Issue 3 is out of scope of this PR. Can work on issue 2 at the meantime, until status-go issue is fixed and the whole flow could be tested.

    briansztamfater avatar Aug 29 '24 17:08 briansztamfater

    @VolodLytvynenko updated status-go version which includes changes in https://github.com/status-im/status-go/pull/5784

    briansztamfater avatar Aug 30 '24 04:08 briansztamfater

    @VolodLytvynenko issue 2 should be fixed now

    briansztamfater avatar Sep 02 '24 04:09 briansztamfater

    86% of end-end tests have passed

    Total executed tests: 7
    Failed tests: 1
    Expected to fail tests: 0
    Passed tests: 6
    
    IDs of failed tests: 727229 
    

    Failed tests (1)

    Click to expand
  • Rerun failed tests

  • Class TestWalletMultipleDevice:

    1. test_wallet_send_eth, id: 727229

    Device 2: Find `Text` by `xpath`: `//android.view.ViewGroup[@content-desc='container']/android.widget.TextView[@text='Ether']/../android.widget.TextView[3]`
    Device 2: `Text` is `0.04399 ETH`
    critical/test_wallet.py:159: in test_wallet_send_eth
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Sender balance is not updated on Etherscan, it is 0.4453 but expected to be 0.4454
    



    Passed tests (6)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    2. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843
    Device sessions

    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

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    status-im-auto avatar Sep 02 '24 10:09 status-im-auto

    hi @briansztamfater Thank you for fixes! Unfortunately, I can't complete the transaction. I keep encountering an "insufficient balance" error toast every time, even though my account has enough tokens.

    It seems we may be calculating the fee incorrectly. In MetaMask, the fee for an ETH -> SNT transaction is estimated at $17, while in Status, it's $3. My account has $5 (0.0021 ETH) for fees, which should be enough, but our fee calculation might be off. image

    Additionally, I can't confirm this transaction on other L2 networks, which would be cheaper, because the default SNT for receiving has low liquidity on L2 networks. As a result, there are no quotes available (the same behavior it both MetaMask and Status Desktop), leading to the "something went wrong" message on mobile. image

    I suggest either temporary changing the receiving token to one with higher liquidity, like DAI or USDC, which would reduce the transaction fee to around $0.05, or merging this PR as it is and rechecking the feature once we can manually change the receiving tokens. WDYT?

    VolodLytvynenko avatar Sep 02 '24 20:09 VolodLytvynenko

    @VolodLytvynenko thanks for testing and the valuable feedback. I've set DAI as the default token for now. I just tried locally and could swap USDT/DAI without any issues. Please let me know if swaps work this way, and we can try to figure out other issues in follow up PRs

    briansztamfater avatar Sep 02 '24 20:09 briansztamfater

    71% of end-end tests have passed

    Total executed tests: 7
    Failed tests: 2
    Expected to fail tests: 0
    Passed tests: 5
    
    IDs of failed tests: 727230,727229 
    

    Failed tests (2)

    Click to expand
  • Rerun failed tests

  • Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230
    critical/test_wallet.py:163: in test_wallet_send_asset_from_drawer
        self.wallet_1.navigate_back_to_wallet_view()
    ../views/base_view.py:455: in navigate_back_to_wallet_view
        while not element.is_element_displayed(1) and counter <= attempts:
    ../views/base_element.py:221: in is_element_displayed
        return self.wait_for_visibility_of_element(sec, ignored_exceptions=ignored_exceptions)
    ../views/base_element.py:145: in wait_for_visibility_of_element
        .until(expected_conditions.visibility_of_element_located((self.by, self.locator)))
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py:86: in until
        value = method(self._driver)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/support/expected_conditions.py:152: in _predicate
        return _element_if_visible(driver.find_element(*locator))
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/appium/webdriver/webdriver.py:409: in find_element
        return self.execute(RemoteCommand.FIND_ELEMENT, {'using': by, 'value': value})['value']
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:345: in execute
        self.error_handler.check_response(response)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:122: in check_response
        raise exception_class(msg=message, stacktrace=format_stacktrace(stacktrace))
     An unknown server-side error occurred while processing the command. Original error: 'POST /element' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details
    E   Stacktrace:
    E   UnknownError: An unknown server-side error occurred while processing the command. Original error: 'POST /element' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details
    E       at UIA2Proxy.command (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/jsonwp-proxy/proxy.js:355:13)
    E       at processTicksAndRejections (node:internal/process/task_queues:95:5)
    E       at AndroidUiautomator2Driver.helpers.doFindElementOrEls (/mnt/sauce/appium/appium-v2.0.0/appium_home/linux/node_modules/appium-uiautomator2-driver/lib/commands/find.js:30:10)
    E       at doFind (/mnt/sauce/appium/appium-v2.0.0/appium_home/linux/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/find.js:36:17)
    E       at wrappedCondFn (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/basedriver/commands/timeout.ts:137:14)
    E       at spin (/mnt/sauce/appium/appium-v2.0.0/node_modules/asyncbox/lib/asyncbox.js:221:20)
    E       at waitForCondition (/mnt/sauce/appium/appium-v2.0.0/node_modules/asyncbox/lib/asyncbox.js:238:10)
    E       at AndroidUiautomator2Driver.implicitWaitForCondition (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/basedriver/commands/timeout.ts:139:12)
    E       at AndroidUiautomator2Driver.findElOrEls (/mnt/sauce/appium/appium-v2.0.0/appium_home/linux/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/find.js:60:5)
    E       at AndroidUiautomator2Driver.findElOrElsWithProcessing (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/basedriver/commands/find.ts:60:12)
    E       at AndroidUiautomator2Driver.findElement (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/basedriver/commands/find.ts:75:12)
    



    2. test_wallet_send_eth, id: 727229

    Device 1: Tap on found: Button
    Device 1: Find Button by accessibility id: network-dropdown
    critical/test_wallet.py:129: in test_wallet_send_eth
        self.wallet_1.select_network(network_name='Arbitrum')
    ../views/wallet_view.py:105: in select_network
        self.network_drop_down.click()
    ../views/base_element.py:90: in click
        element = self.find_element()
    ../views/base_element.py:84: in find_element
        raise exception
    ../views/base_element.py:77: in find_element
        return self.driver.find_element(self.by, self.locator)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/appium/webdriver/webdriver.py:409: in find_element
        return self.execute(RemoteCommand.FIND_ELEMENT, {'using': by, 'value': value})['value']
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:345: in execute
        self.error_handler.check_response(response)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:122: in check_response
        raise exception_class(msg=message, stacktrace=format_stacktrace(stacktrace))
     An unknown server-side error occurred while processing the command. Original error: 'POST /element' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details
    E   Stacktrace:
    E   UnknownError: An unknown server-side error occurred while processing the command. Original error: 'POST /element' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details
    E       at UIA2Proxy.command (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/jsonwp-proxy/proxy.js:355:13)
    E       at processTicksAndRejections (node:internal/process/task_queues:95:5)
    E       at AndroidUiautomator2Driver.helpers.doFindElementOrEls (/mnt/sauce/appium/appium-v2.0.0/appium_home/linux/node_modules/appium-uiautomator2-driver/lib/commands/find.js:30:10)
    E       at doFind (/mnt/sauce/appium/appium-v2.0.0/appium_home/linux/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/find.js:36:17)
    E       at wrappedCondFn (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/basedriver/commands/timeout.ts:137:14)
    E       at spin (/mnt/sauce/appium/appium-v2.0.0/node_modules/asyncbox/lib/asyncbox.js:221:20)
    E       at waitForCondition (/mnt/sauce/appium/appium-v2.0.0/node_modules/asyncbox/lib/asyncbox.js:238:10)
    E       at AndroidUiautomator2Driver.implicitWaitForCondition (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/basedriver/commands/timeout.ts:139:12)
    E       at AndroidUiautomator2Driver.findElOrEls (/mnt/sauce/appium/appium-v2.0.0/appium_home/linux/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/find.js:60:5)
    E       at AndroidUiautomator2Driver.findElOrElsWithProcessing (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/basedriver/commands/find.ts:60:12)
    E       at AndroidUiautomator2Driver.findElement (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/basedriver/commands/find.ts:75:12)
    



    Passed tests (5)

    Click to expand

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    2. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Device sessions

    status-im-auto avatar Sep 03 '24 07:09 status-im-auto

    50% of end-end tests have passed

    Total executed tests: 2
    Failed tests: 1
    Expected to fail tests: 0
    Passed tests: 1
    
    IDs of failed tests: 727230 
    

    Failed tests (1)

    Click to expand
  • Rerun failed tests

  • Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    Device 1: Tap on found: LogInButton
    ## Signed in successfully!
    critical/test_wallet.py:178: in test_wallet_send_asset_from_drawer
        self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
    critical/test_wallet.py:86: in _check_balances_after_tx
        self.loop.run_until_complete(
    /usr/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
        return future.result()
    __init__.py:52: in run_in_parallel
        returns.append(await k)
    /usr/lib/python3.10/concurrent/futures/thread.py:58: in run
        result = self.fn(*self.args, **self.kwargs)
    ../views/base_view.py:712: in reopen_app
        sign_in_view.sign_in(password)
    ../views/sign_in_view.py:312: in sign_in
        self.password_input.wait_for_visibility_of_element(10)
    ../views/base_element.py:145: in wait_for_visibility_of_element
        .until(expected_conditions.visibility_of_element_located((self.by, self.locator)))
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py:86: in until
        value = method(self._driver)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/support/expected_conditions.py:152: in _predicate
        return _element_if_visible(driver.find_element(*locator))
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/support/expected_conditions.py:175: in _element_if_visible
        return element if element.is_displayed() == visibility else False
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/appium/webdriver/webelement.py:81: in is_displayed
        return self._execute(Command.IS_ELEMENT_DISPLAYED)['value']
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py:395: in _execute
        return self._parent.execute(command, params)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:345: in execute
        self.error_handler.check_response(response)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:122: in check_response
        raise exception_class(msg=message, stacktrace=format_stacktrace(stacktrace))
     An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up
    E   Stacktrace:
    E   UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up
    E       at UIA2Proxy.command (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/jsonwp-proxy/proxy.js:355:13)
    E       at processTicksAndRejections (node:internal/process/task_queues:95:5)
    E       at AndroidUiautomator2Driver.commands.getAttribute (/mnt/sauce/appium/appium-v2.0.0/appium_home/linux/node_modules/appium-uiautomator2-driver/lib/commands/element.js:17:10)
    E       at AndroidUiautomator2Driver.commands.elementDisplayed (/mnt/sauce/appium/appium-v2.0.0/appium_home/linux/node_modules/appium-uiautomator2-driver/lib/commands/element.js:21:17)
    



    Passed tests (1)

    Click to expand

    Class TestWalletMultipleDevice:

    1. test_wallet_send_eth, id: 727229

    status-im-auto avatar Sep 03 '24 10:09 status-im-auto

    Thank you for PR, no issues from my side, except this UI lower priority ones that can be considered as follow ups

    ISSUE 4: Incorrect placement of max value and incorrect button label on swap approval page

    Steps:

    1. Go to the swap page.
    2. Select an ERC20 token.
    3. Enter a valid value.
    4. Tap the "Approve" button.

    Actual Result:

    The "Max Value" is located in the wrong place on the approval page. The button label says "Slide to swap" instead of "Slide to sign." image

    Expected Result:

    The "Max Value" should be correctly placed according to the design. The button label should correctly say "Slide to sign" on the approval page. image

    VolodLytvynenko avatar Sep 03 '24 13:09 VolodLytvynenko

    Awesome @VolodLytvynenko, just fixed Issue 4 too :) Waiting for an approval from the dev side now. blocked label can be removed, right?

    briansztamfater avatar Sep 03 '24 13:09 briansztamfater

    ISSUE 5: The input and receiving value not properly rounded

    Steps:

    1. Go to the swap page and select ETH.
    2. Enter a minimum value, such as 0.0000000001 ETH.

    ###Actual Result:

    • The input value of 0.0000000001 ETH is less than $0.01 USD and is displayed without proper rounding.
    • The receiving value is displayed in an incorrect format, such as 2.4712412341234e-7, without proper rounding. image

    Expected Result:

    Potential solutions:

    • Crypto values should be rounded so that the final decimal place always represents a value between $0.01 and $0.10 USD, ensuring that small values are displayed appropriately. OR
    • The token value should be rounded to the "maximum number of decimal places" as specified in https://github.com/status-im/status-mobile/issues/18244

    Examples:

    • If the user enters a fiat value resulting in a token value with more than the allowed decimal places (e.g., 0.37 USD which equals 0.0001001... ETH), and taps the "show in token" button, the value in the input field should become 0.0001 ETH.)
    • When ETH is priced at $365, four decimal places should be used for ETH because 0.0001 ETH = $0.036 USD, which is between $0.01 and $0.10 USD

    VolodLytvynenko avatar Sep 03 '24 14:09 VolodLytvynenko

    @briansztamfater Should the swap transaction be included in the activity tab in the scope of this PR? Currently, swap transactions are not showing at all there.

    Actual result:

    image

    Expected result:

    https://www.figma.com/design/AD2JSKg0I8dZcylyiGa62O/Swap-for-Mobile?node-id=54-48281&node-type=INSTANCE&m=dev

    VolodLytvynenko avatar Sep 03 '24 14:09 VolodLytvynenko

    blocked label can be removed, right?

    yes. just removed it. thanx

    VolodLytvynenko avatar Sep 03 '24 14:09 VolodLytvynenko

    @briansztamfater Should the swap transaction be included in the activity tab in the scope of this PR? Currently, swap transactions are not showing at all there.

    Actual result:

    image

    Expected result:

    https://www.figma.com/design/AD2JSKg0I8dZcylyiGa62O/Swap-for-Mobile?node-id=54-48281&node-type=INSTANCE&m=dev

    Definitely not included in the scope of this PR. We have an issue for it #20345, and we should also check with the team how the changes in the Activity implementation will affect how we display swaps transactions.

    Will take a look at issue 5 👍

    briansztamfater avatar Sep 03 '24 14:09 briansztamfater

    @VolodLytvynenko issue 5 should be fixed 👍

    briansztamfater avatar Sep 03 '24 15:09 briansztamfater

    @briansztamfater You mentioned earlier that if a user doesn't have a receiving token (in our case DAI), some errors might occur. Is this the issue shown on record?

    https://github.com/user-attachments/assets/f53993da-74ae-4402-a71d-eb9f9e193e97

    Logs:

    Status-debug-logs.zip

    VolodLytvynenko avatar Sep 03 '24 16:09 VolodLytvynenko

    @briansztamfater You mentioned earlier that if a user doesn't have a receiving token (in our case DAI), some errors might occur. Is this the issue shown on record?

    dai.mp4

    Logs:

    Status-debug-logs.zip

    @briansztamfater Facing this error even when DAI is present in account. I will share this user in DM

    ISSUE 6: "undefined is not a function" error is shown after an attempt to swap ERC20 token

    Steps:

    1. Select erc20 token during swap
    2. Tap "approve" button

    Actual result:

    image

    Additional info:

    Perhaps the issue is related to the fee. I tested a scenario where the user doesn't have enough ETH to cover the fee or has too little ETH, which could be causing this problem.

    VolodLytvynenko avatar Sep 03 '24 16:09 VolodLytvynenko

    @VolodLytvynenko issue should be fixed now, seems I introduced the bug with the last fix 😅 Let me know how testing goes now!

    briansztamfater avatar Sep 03 '24 17:09 briansztamfater