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

fix: show network card with zero value on the sender side if the router does not return a route for that network #20152

Merged
merged 1 commit into from
May 27, 2024

Conversation

briansztamfater
Copy link
Member

@briansztamfater briansztamfater commented May 22, 2024

fixes #20143

Summary

This PR implements showing network cards with 0 value on the sender side if the account has balance for that token that network when the router does not return a route for that network.

Some examples:

User has ETH on Mainnet, Optimism and Arbitrum
ethavailableonethoptarb.mp4
User has SNT only on Mainnet
sntavailableoneth.mp4

Platforms

  • Android
  • iOS

Areas that maybe impacted

Functional
  • wallet / transactions

Steps to test

  • Open Status
  • Log in
  • Go to wallet
  • Select an account
  • Tap on Send button
  • Select an address
  • Select a token that has balance in many networks
  • Enter a valid amount
  • If router does not return a route for that network, network should still be shown on the sender side with 0 value

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented May 22, 2024

Jenkins Builds

Click to see older builds (30)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 3bca8c9 #1 2024-05-22 15:01:57 ~4 min tests 📄log
✔️ 3bca8c9 #1 2024-05-22 15:07:34 ~9 min ios 📱ipa 📲
✔️ 3bca8c9 #1 2024-05-22 15:08:43 ~11 min android-e2e 🤖apk 📲
✔️ 3bca8c9 #1 2024-05-22 15:08:51 ~11 min android 🤖apk 📲
✔️ 26e2539 #3 2024-05-22 18:08:44 ~4 min tests 📄log
✔️ 26e2539 #3 2024-05-22 18:11:43 ~7 min android-e2e 🤖apk 📲
✔️ 26e2539 #3 2024-05-22 18:12:56 ~8 min android 🤖apk 📲
✔️ 26e2539 #3 2024-05-22 18:13:47 ~9 min ios 📱ipa 📲
✔️ e2c9e69 #4 2024-05-22 18:24:02 ~3 min tests 📄log
✔️ 425614f #6 2024-05-22 18:32:56 ~3 min tests 📄log
✔️ f3a532f #7 2024-05-22 18:43:19 ~5 min tests 📄log
✔️ f3a532f #7 2024-05-22 18:45:37 ~7 min android-e2e 🤖apk 📲
✔️ f3a532f #7 2024-05-22 18:45:43 ~7 min android 🤖apk 📲
✔️ f3a532f #7 2024-05-22 18:47:44 ~9 min ios 📱ipa 📲
✔️ 31c85a1 #8 2024-05-22 18:59:24 ~4 min tests 📄log
✔️ 31c85a1 #8 2024-05-22 19:02:50 ~7 min android 🤖apk 📲
✔️ 31c85a1 #8 2024-05-22 19:03:27 ~8 min android-e2e 🤖apk 📲
✔️ 31c85a1 #8 2024-05-22 19:04:54 ~9 min ios 📱ipa 📲
✔️ b1422d5 #9 2024-05-23 14:05:20 ~4 min tests 📄log
✔️ b1422d5 #9 2024-05-23 14:11:39 ~10 min ios 📱ipa 📲
✔️ b1422d5 #9 2024-05-23 14:11:45 ~10 min android-e2e 🤖apk 📲
✔️ b1422d5 #9 2024-05-23 14:11:48 ~10 min android 🤖apk 📲
✔️ c210884 #11 2024-05-23 15:06:12 ~4 min tests 📄log
✔️ c210884 #11 2024-05-23 15:08:40 ~7 min android-e2e 🤖apk 📲
✔️ c210884 #11 2024-05-23 15:08:52 ~7 min android 🤖apk 📲
✔️ c210884 #11 2024-05-23 15:11:12 ~9 min ios 📱ipa 📲
✔️ 09410c4 #12 2024-05-24 13:20:25 ~3 min tests 📄log
✔️ 09410c4 #12 2024-05-24 13:23:50 ~7 min android-e2e 🤖apk 📲
✔️ 09410c4 #12 2024-05-24 13:23:59 ~7 min android 🤖apk 📲
✔️ 09410c4 #12 2024-05-24 13:28:48 ~12 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
96a5b6c #13 2024-05-27 09:15:27 ~3 min tests 📄log
✔️ 96a5b6c #13 2024-05-27 09:21:15 ~9 min ios 📱ipa 📲
✔️ 96a5b6c #13 2024-05-27 09:22:18 ~10 min android-e2e 🤖apk 📲
✔️ 96a5b6c #13 2024-05-27 09:22:23 ~10 min android 🤖apk 📲
✔️ 9f5b0aa #14 2024-05-27 14:56:05 ~3 min tests 📄log
✔️ 9f5b0aa #14 2024-05-27 14:59:42 ~7 min android-e2e 🤖apk 📲
✔️ 9f5b0aa #14 2024-05-27 14:59:46 ~7 min android 🤖apk 📲
✔️ 9f5b0aa #14 2024-05-27 15:02:14 ~9 min ios 📱ipa 📲

@briansztamfater briansztamfater force-pushed the fix/show-zero-value-routes branch 4 times, most recently from e2c9e69 to 083b43f Compare May 22, 2024 18:24
@briansztamfater briansztamfater changed the title [WIP] fix: show network card with zero value on the sender side if the router fix: show network card with zero value on the sender side if the router May 22, 2024
@briansztamfater briansztamfater marked this pull request as ready for review May 22, 2024 18:28
@briansztamfater briansztamfater force-pushed the fix/show-zero-value-routes branch 3 times, most recently from f3a532f to 31c85a1 Compare May 22, 2024 18:54
(fn [{:keys [db]} [address]]
{:db (assoc-in db [:wallet :current-viewing-account-address] address)}))
(fn [{:keys [db]} [{:keys [address network-details update-balance?]}]]
(let [current-token (-> db :wallet :ui :send :token)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm I would like to push back against this change. We're taking a very simple and effective method and coupling it with some send related logic.
Can we handle this some other way? - maybe just a separate event being fired for this particular action? 🤔

cc @smohamedjavid

Copy link
Contributor

@ulisesmac ulisesmac May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@J-Son89 @briansztamfater

According to the comment in this event:

;; When switching accounts, if there is a selected token we need to update
;; it to reflect balances of the new account

Seems more as a task for a subscription, the subscription that extracts the token from
[:wallet :ui :send :token]
could also receive the current-viewing-account and add the extra data needed.

wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense, will try to refactor this and let you know!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this logic, send the updated token from subscription to :wallet/get-suggested-routes event

@ulisesmac
Copy link
Contributor

Hey @briansztamfater
In your example
User has ETH on Mainnet, Optimism and Arbitrum
I have a two questions:

  1. Why do we show Mainnet and Optimism as pressable cards if they show 0? and what means that after pressing them they become disabled?

  2. Why when pressing Optimism on the sender side it enables Optimism on the recipient side if on the sender it becomes disabled?

(fn [{:keys [db]} [address]]
{:db (assoc-in db [:wallet :current-viewing-account-address] address)}))
(fn [{:keys [db]} [{:keys [address network-details update-balance?]}]]
(let [current-token (-> db :wallet :ui :send :token)
Copy link
Contributor

@ulisesmac ulisesmac May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@J-Son89 @briansztamfater

According to the comment in this event:

;; When switching accounts, if there is a selected token we need to update
;; it to reflect balances of the new account

Seems more as a task for a subscription, the subscription that extracts the token from
[:wallet :ui :send :token]
could also receive the current-viewing-account and add the extra data needed.

wdyt?

Comment on lines 83 to 89
(filter (fn [[_ {:keys [raw-balance]}]]
(or (not only-with-balance?)
(and only-with-balance?
(and (money/bignumber? raw-balance)
(money/greater-than raw-balance (money/bignumber "0")))))))
(filter (fn [[_ {:keys [chain-id]}]]
(not (contains? disabled-set chain-id))))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can only use one and in the filter condition:

(filter (fn [[_ {:keys [raw-balance]}]]
            (or (not only-with-balance?)
                (and only-with-balance?
                     (money/bignumber? raw-balance)
                     (money/greater-than raw-balance (money/bignumber "0"))))))

Have you consider extending the filter below instead of creating a new one? I think performing two filters is more expensive 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I've considered that option, thought that it was more "readable" even if it is a bit less performant, but I have no strong opinion on this tbh, I will change it to have only one filter :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can create two functions to make it more readable, something like

(filter (fn [my-data]
          (and (check-conditions-1 my-data)
               (check-conditions-2 my-data)))

If you take this approach, just make sure to provide good names :)

Comment on lines 366 to 386
(filter
#(not= bridge-to-chain-id %)
sender-token-available-networks-for-suggested-routes)
sender-token-available-networks-for-suggested-routes)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comment, consider using remove instead of filter + not + predicate.

Comment on lines 347 to 399
sender-token-available-networks-for-suggested-routes
(when token
(send-utils/token-available-networks-for-suggested-routes {:balances-per-chain
balances-per-chain
:disabled-chain-ids
disabled-from-chain-ids}))
disabled-from-chain-ids
:only-with-balance? true}))
receiver-token-available-networks-for-suggested-routes
(when token
(send-utils/token-available-networks-for-suggested-routes {:balances-per-chain
balances-per-chain
:disabled-chain-ids
disabled-from-chain-ids
:only-with-balance? false}))
token-networks-ids (when token (mapv #(:chain-id %) (:networks token)))
sender-network-values (when token-available-networks-for-suggested-routes
sender-network-values (when sender-token-available-networks-for-suggested-routes
(send-utils/loading-network-amounts
{:valid-networks (if (= transaction-type :tx/bridge)
(filter
#(not= bridge-to-chain-id %)
token-available-networks-for-suggested-routes)
token-available-networks-for-suggested-routes)
{:valid-networks
(if (= transaction-type :tx/bridge)
(filter
#(not= bridge-to-chain-id %)
sender-token-available-networks-for-suggested-routes)
sender-token-available-networks-for-suggested-routes)
:disabled-chain-ids disabled-from-chain-ids
:receiver-networks receiver-networks
:receiver-networks receiver-networks
:token-networks-ids token-networks-ids
:tx-type transaction-type
:receiver? false}))
receiver-network-values (when token-available-networks-for-suggested-routes
:tx-type transaction-type
:receiver? false}))
receiver-network-values (when receiver-token-available-networks-for-suggested-routes
(send-utils/loading-network-amounts
{:valid-networks (if (= transaction-type :tx/bridge)
(filter
#(= bridge-to-chain-id %)
token-available-networks-for-suggested-routes)
token-available-networks-for-suggested-routes)
{:valid-networks
(if (= transaction-type :tx/bridge)
(filter
#(= bridge-to-chain-id %)
receiver-token-available-networks-for-suggested-routes)
receiver-token-available-networks-for-suggested-routes)
Copy link
Contributor

@ulisesmac ulisesmac May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function/event looks very complex, it'd be great if we solve this problem in smaller functions with meaningful names, I know this is out of scope of this PR, but IMO this function needs to be refactored to be easier to understand and maintain.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, we should even write tests for these events. Will file an issue for it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created #20162

@briansztamfater
Copy link
Member Author

briansztamfater commented May 22, 2024

Hey @briansztamfater In your example User has ETH on Mainnet, Optimism and Arbitrum I have a two questions:

  1. Why do we show Mainnet and Optimism as pressable cards if they show 0? and what means that after pressing them they become disabled?
  2. Why when pressing Optimism on the sender side it enables Optimism on the recipient side if on the sender it becomes disabled?

Hey @ulisesmac, let me answer those questions!

  1. After implementing Implement Send page > Long tap to edit amount send through an specific network #16974, we will have the ability to long press the cards to lock an specific amount. If user has balance for that network, even if the routes does not include that network, we need to show it with 0 value so user could long press it to lock an amount and re-calculate routes.
  2. Currently, when disabling a network on the sender side, we show 0 value on the receiver side, as shown for example in this Figma design. We are currently in talks with @xAlisher reviewing the expected behavior for the routes UI, so this may or may not change. We can raise a new PR with the changes if expected behavior changes.

@briansztamfater briansztamfater changed the title fix: show network card with zero value on the sender side if the router fix: show network card with zero value on the sender side if the router does not return a route for that network May 22, 2024
@briansztamfater
Copy link
Member Author

Hey @briansztamfater In your example User has ETH on Mainnet, Optimism and Arbitrum I have a two questions:

  1. Why do we show Mainnet and Optimism as pressable cards if they show 0? and what means that after pressing them they become disabled?
  2. Why when pressing Optimism on the sender side it enables Optimism on the recipient side if on the sender it becomes disabled?

Hey @ulisesmac, let me answer those questions!

  1. After implementing Implement Send page > Long tap to edit amount send through an specific network #16974, we will have the ability to long press the cards to lock an specific amount. If user has balance for that network, even if the routes does not include that network, we need to show it with 0 value so user could long press it to lock an amount and re-calculate routes.
  2. Currently, when disabling a network on the sender side, we show 0 value on the receiver side, as shown for example in this Figma design. We are currently in talks with @xAlisher reviewing the expected behavior for the routes UI, so this may or may not change. We can raise a new PR with the changes if expected behavior changes.

FYI, regarding question 2, we talked today with Alisher and cards in the receiver side with 0 won't be shown anymore, but will raise a separate PR with all the discussed changes once they are 100% defined and represented in designs 👍 .

@briansztamfater briansztamfater force-pushed the fix/show-zero-value-routes branch 3 times, most recently from c18403e to c210884 Compare May 23, 2024 15:01
@briansztamfater
Copy link
Member Author

briansztamfater commented May 23, 2024

@J-Son89 @ulisesmac just addressed the comments, can you please re-check?

Copy link
Contributor

@ulisesmac ulisesmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation and for adressing the comments @briansztamfater

Looks good

@briansztamfater briansztamfater moved this from REVIEW to E2E Tests in Pipeline for QA May 23, 2024
@status-im-auto
Copy link
Member

67% of end-end tests have passed

Total executed tests: 52
Failed tests: 14
Expected to fail tests: 3
Passed tests: 35
IDs of failed tests: 727230,703194,702859,702840,703086,702894,704615,727229,702839,702838,702844,702843,727232,702841 
IDs of expected to fail tests: 703495,703503,702807 

Failed tests (14)

Click to expand
  • Rerun failed tests

  • Class TestCommunityMultipleDeviceMerged:

    1. test_community_several_images_send_reply, id: 703194
    Test setup failed: critical/chats/test_public_chat_browsing.py:323: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:425: in join_community
        self.community_status_joined.wait_for_visibility_of_element(60)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Text by accessibility id:`status-tag-positive` is not found on the screen after wait_for_visibility_of_element
    



    2. test_community_one_image_send_reply, id: 702859

    Test setup failed: critical/chats/test_public_chat_browsing.py:323: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:425: in join_community
        self.community_status_joined.wait_for_visibility_of_element(60)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Text by accessibility id:`status-tag-positive` is not found on the screen after wait_for_visibility_of_element
    



    3. test_community_emoji_send_copy_paste_reply, id: 702840

    Test setup failed: critical/chats/test_public_chat_browsing.py:323: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:425: in join_community
        self.community_status_joined.wait_for_visibility_of_element(60)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Text by accessibility id:`status-tag-positive` is not found on the screen after wait_for_visibility_of_element
    



    4. test_community_mark_all_messages_as_read, id: 703086

    Test setup failed: critical/chats/test_public_chat_browsing.py:323: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:425: in join_community
        self.community_status_joined.wait_for_visibility_of_element(60)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Text by accessibility id:`status-tag-positive` is not found on the screen after wait_for_visibility_of_element
    



    5. test_community_contact_block_unblock_offline, id: 702894

    Test setup failed: critical/chats/test_public_chat_browsing.py:323: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:425: in join_community
        self.community_status_joined.wait_for_visibility_of_element(60)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Text by accessibility id:`status-tag-positive` is not found on the screen after wait_for_visibility_of_element
    



    6. test_community_edit_delete_message_when_offline, id: 704615

    Test setup failed: critical/chats/test_public_chat_browsing.py:323: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:425: in join_community
        self.community_status_joined.wait_for_visibility_of_element(60)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Text by accessibility id:`status-tag-positive` is not found on the screen after wait_for_visibility_of_element
    



    7. test_community_message_delete, id: 702839

    Test setup failed: critical/chats/test_public_chat_browsing.py:323: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:425: in join_community
        self.community_status_joined.wait_for_visibility_of_element(60)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Text by accessibility id:`status-tag-positive` is not found on the screen after wait_for_visibility_of_element
    



    8. test_community_message_send_check_timestamps_sender_username, id: 702838

    Device 2: Find LogInButton by accessibility id: login-button
    Device 2: Tap on found: LogInButton

    Test setup failed: critical/chats/test_public_chat_browsing.py:323: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:425: in join_community
        self.community_status_joined.wait_for_visibility_of_element(60)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Text by accessibility id:`status-tag-positive` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    9. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844

    Test setup failed: critical/chats/test_public_chat_browsing.py:323: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:425: in join_community
        self.community_status_joined.wait_for_visibility_of_element(60)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Text by accessibility id:`status-tag-positive` is not found on the screen after wait_for_visibility_of_element
    



    10. test_community_message_edit, id: 702843

    Test setup failed: critical/chats/test_public_chat_browsing.py:323: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:425: in join_community
        self.community_status_joined.wait_for_visibility_of_element(60)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Text by accessibility id:`status-tag-positive` is not found on the screen after wait_for_visibility_of_element
    



    11. test_community_unread_messages_badge, id: 702841

    Test setup failed: critical/chats/test_public_chat_browsing.py:323: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:425: in join_community
        self.community_status_joined.wait_for_visibility_of_element(60)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Text by accessibility id:`status-tag-positive` is not found on the screen after wait_for_visibility_of_element
    



    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    critical/test_wallet.py:119: in test_wallet_send_asset_from_drawer
        self.wallet_view.navigate_back_to_wallet_view()
     'TestWalletMultipleDevice' object has no attribute 'wallet_view'
    



    2. test_wallet_send_eth, id: 727229

    Device 1: Tap on found: LogInButton
    Device 1: Find Button by accessibility id: done

    critical/test_wallet.py:111: in test_wallet_send_eth
        self.wallet_1.send_asset(address=self.receiver['address'], asset_name='Ether', amount=amount_to_send)
    ../views/wallet_view.py:100: in send_asset
        self.confirm_transaction()
    ../views/wallet_view.py:88: in confirm_transaction
        self.done_button.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 accessibility id: `done` 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
    



    Class TestWalletOneDevice:

    1. test_wallet_add_remove_watch_only_account, id: 727232

    Device 1: Text is 0x8d2413447ff297d30bdc475f6d5cb00254685aae
    Device 1: Click system back button

    critical/test_wallet.py:213: in test_wallet_add_remove_watch_only_account
        self.home_view.driver.fail(
    base_test_case.py:178: in fail
        pytest.fail('Device %s: %s' % (self.number, text))
     Device 1: Incorrect address '0x8d2413447ff297d30bdc475f6d5cb00254685aae' is shown when swiping between accounts, expected one is '0x8d2413447ff297d30bdc475f6d5cb00254685aae'
    



    Device sessions

    Expected to fail tests (3)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_discovery, id: 703503

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Curated communities not loading, https://github.com//issues/17852]]

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_mute_chat, id: 703495

    # STEP: Change device time so chat will be unmuted by timer
    Device 2: Long press on ChatElement

    critical/chats/test_group_chat.py:466: in test_group_chat_mute_chat
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Chat is still muted after timeout 
    

    [[Chat is not unmuted after expected time: https://github.com//issues/19627]]

    Device sessions

    2. test_group_chat_join_send_text_messages_push, id: 702807

    Device 2: Find Text by xpath: //*[starts-with(@text,'Hey, admin!')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='message-status']/android.widget.TextView
    Device 2: Text is Sent

    critical/chats/test_group_chat.py:97: in test_group_chat_join_send_text_messages_push
        self.chats[1].chat_element_by_text(message_to_admin).wait_for_status_to_be('Delivered', timeout=120)
    ../views/chat_view.py:225: in wait_for_status_to_be
        raise TimeoutException("Message status was not changed to %s, it's %s" % (expected_status, current_status))
     Message status was not changed to Delivered, it's Sent 
    

    [[Issue with a message status - Sent instead of Delivered, https://github.com//issues/20126]]

    Device sessions

    Passed tests (35)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    3. test_community_undo_delete_message, id: 702869
    Device sessions

    4. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    5. test_community_mute_community_and_channel, id: 703382
    Device sessions

    Class TestDeepLinksOneDevice:

    1. test_links_open_universal_links_from_chat, id: 704613
    Device sessions

    2. test_links_deep_links, id: 702775
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    2. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    3. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_add_contact_field_validation, id: 702777
    Device sessions

    2. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    3. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_markdown_support, id: 702809
    Device sessions

    2. test_community_hashtag_links_to_community_channels, id: 702948
    Device sessions

    3. test_community_mentions_push_notification, id: 702786
    Device sessions

    4. test_community_leave, id: 702845
    Device sessions

    5. test_community_join_when_node_owner_offline, id: 703629
    Device sessions

    Class TestActivityMultipleDevicePRTwo:

    1. test_activity_center_mentions, id: 702957
    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    2. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    3. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    4. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    5. test_1_1_chat_edit_message, id: 702855
    Device sessions

    6. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    7. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    8. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_navigation_jump_to, id: 702936
    Device sessions

    2. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    Device sessions

    2. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    3. test_group_chat_reactions, id: 703202
    Device sessions

    4. test_group_chat_offline_pn, id: 702808
    Device sessions

    (defn token-available-networks-for-suggested-routes
    [{:keys [balances-per-chain disabled-chain-ids]}]
    [{:keys [balances-per-chain disabled-chain-ids only-with-balance?]}]
    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    I would say only-with-balance is not very clear. What is the purpose of this variable ? 🤔

    (let [wallet-address (get-in db [:wallet :current-viewing-account-address])
    token (get-in db [:wallet :ui :send :token])
    token (or updated-token (get-in db [:wallet :ui :send :token]))
    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    do we need both token and updated-token? why not just one of these? 🤔

    @mariia-skrypnyk mariia-skrypnyk moved this from E2E Tests to IN TESTING in Pipeline for QA May 27, 2024
    @mariia-skrypnyk mariia-skrypnyk self-assigned this May 27, 2024
    @status-im-auto
    Copy link
    Member

    79% of end-end tests have passed

    Total executed tests: 14
    Failed tests: 3
    Expected to fail tests: 0
    Passed tests: 11
    
    IDs of failed tests: 727230,727232,727229 
    

    Failed tests (3)

    Click to expand
  • Rerun failed tests

  • Class TestWalletOneDevice:

    1. test_wallet_add_remove_watch_only_account, id: 727232

    Device 1: `Text` is `0x8d2413447ff297d30bdc475f6d5cb00254685aae`
    Device 1: Click system back button

    critical/test_wallet.py:213: in test_wallet_add_remove_watch_only_account
        self.home_view.driver.fail(
    base_test_case.py:178: in fail
        pytest.fail('Device %s: %s' % (self.number, text))
     Device 1: Incorrect address '0x8d2413447ff297d30bdc475f6d5cb00254685aae' is shown when swiping between accounts, expected one is '0x8d2413447ff297d30bdc475f6d5cb00254685aae'
    



    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    critical/test_wallet.py:119: in test_wallet_send_asset_from_drawer
        self.wallet_view.navigate_back_to_wallet_view()
     'TestWalletMultipleDevice' object has no attribute 'wallet_view'
    



    2. test_wallet_send_eth, id: 727229

    Device 1: Swiping right on element SlideButton
    Device 1: Find SlideButton by xpath: //*[@resource-id='slide-button-track']

    critical/test_wallet.py:111: in test_wallet_send_eth
        self.wallet_1.send_asset(address=self.receiver['address'], asset_name='Ether', amount=amount_to_send)
    ../views/wallet_view.py:100: in send_asset
        self.confirm_transaction()
    ../views/wallet_view.py:87: in confirm_transaction
        self.slide_and_confirm_with_password()
    ../views/wallet_view.py:81: in slide_and_confirm_with_password
        self.slide_button_track.slide()
    ../views/base_view.py:257: in slide
        self.swipe_right_on_element(width_percentage=1.3, start_x=100)
    ../views/base_element.py:308: in swipe_right_on_element
        location, size = self.get_element_coordinates()
    ../views/base_element.py:294: in get_element_coordinates
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: SlideButton by xpath: `//*[@resource-id='slide-button-track']` 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
    



    Passed tests (11)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    2. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    3. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    4. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    5. test_community_unread_messages_badge, id: 702841
    Device sessions

    6. test_community_message_delete, id: 702839
    Device sessions

    7. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    8. test_community_edit_delete_message_when_offline, id: 704615
    Device sessions

    9. test_community_one_image_send_reply, id: 702859
    Device sessions

    10. test_community_message_edit, id: 702843
    Device sessions

    11. test_community_several_images_send_reply, id: 703194
    Device sessions

    @mariia-skrypnyk
    Copy link

    Hi @briansztamfater !

    Thanks for your PR.
    I've tested and cards with zero looks good on both platforms.

    Failed e2e are not related, you can merge your PR.

    @mariia-skrypnyk mariia-skrypnyk moved this from IN TESTING to MERGE in Pipeline for QA May 27, 2024
    …er does not return a route for that network
    
    Signed-off-by: Brian Sztamfater <brian@status.im>
    @briansztamfater briansztamfater merged commit ca81bfe into develop May 27, 2024
    6 checks passed
    Pipeline for QA automation moved this from MERGE to DONE May 27, 2024
    @briansztamfater briansztamfater deleted the fix/show-zero-value-routes branch May 27, 2024 15:15
    jo-mut pushed a commit that referenced this pull request May 28, 2024
    …er does not return a route for that network (#20152)
    
    Signed-off-by: Brian Sztamfater <brian@status.im>
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Status: DONE
    Development

    Successfully merging this pull request may close these issues.

    If route is found but doesn't use balance from a valid network, the network card is not shown
    6 participants