status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.92k stars 984 forks source link

Replace `GetWalletToken` endpoint with `FetchOrGetCachedWalletBalances` #21625

Open vkjr opened 1 week ago

vkjr commented 1 week ago

fixes #20473

Summary

GetWalletToken endpoint in status-go was replaced by FetchOrGetCachedWalletBalances Visible impact - when user drags down wallet screen and triggers refresh, it happens much quicker - fraction of second instead of few seconds.

Review notes

Deprecated GetWalletToken function was packing a big chunk of information together - not only token balances but also their prices and market values. That resulted in data duplication - inside tokens we had the same information about prices and market values as we already have in re-frame db under [:wallet :tokens :prices-per-token] and [:wallet :tokens :market-values-per-token]. Moreover, in time that information became out of sync, because data under [:wallet :tokens ...] never updated after wallet initialisation while data inside token structure updated regularly.

This PR replaces the endpoint and removes the data duplication.

Token structures fetched with FetchOrGetCachedWalletBalances do not have information about prices and market values. But this information can be found under [:wallet :tokens :prices-per-token] and [:wallet :tokens :market-values-per-token], so big amount of small changes is a result of necessity to pass another structures with prices and market values apart from token itself.

When FetchOrGetCachedWalletBalances finishes successfully we now additionally request prices and market values for those tokens that exist in wallet to have an up-to-date data after user triggered refresh.

Testing notes

From user perspective this PR should't change anything except the speed of wallet refresh when user drags screen down. It is faster now.

Platforms

Areas that maybe impacted

Functional

Steps to test

status: ready

status-im-auto commented 1 week ago

Jenkins Builds

Click to see older builds (51) | :grey_question: | Commit | :hash: | Finished (UTC) | Duration | Platform | Result | |-|-|-|-|-|-|-| | :x: | c35437b1 | [#1](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/1/) | 2024-11-14 13:12:21 | ~3 min | `tests` | [:page_facing_up:`log`](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/1/consoleText) | | :heavy_check_mark: | c35437b1 | [#1](https://ci.status.im/job/status-mobile/job/prs/job/ios/job/PR-21625/1/) | 2024-11-14 13:18:10 | ~9 min | `ios` | [:iphone:`ipa`](https://i.diawi.com/5yHPCy) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fi.diawi.com%2F5yHPCy)| | :heavy_check_mark: | c35437b1 | [#1](https://ci.status.im/job/status-mobile/job/prs/job/android-e2e/job/PR-21625/1/) | 2024-11-14 13:18:17 | ~9 min | `android-e2e` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241114-130901-c35437-pr21625-x86_64.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241114-130901-c35437-pr21625-x86_64.apk)| | :heavy_check_mark: | c35437b1 | [#1](https://ci.status.im/job/status-mobile/job/prs/job/android/job/PR-21625/1/) | 2024-11-14 13:18:43 | ~9 min | `android` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241114-130901-c35437-pr21625-arm64-v8a.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241114-130901-c35437-pr21625-arm64-v8a.apk)| | | | | | | | | | :x: | f445964f | [#3](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/3/) | 2024-11-14 13:30:35 | ~2 min | `tests` | [:page_facing_up:`log`](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/3/consoleText) | | :heavy_check_mark: | f445964f | [#3](https://ci.status.im/job/status-mobile/job/prs/job/android-e2e/job/PR-21625/3/) | 2024-11-14 13:36:15 | ~8 min | `android-e2e` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241114-132801-f44596-pr21625-x86_64.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241114-132801-f44596-pr21625-x86_64.apk)| | :heavy_check_mark: | f445964f | [#3](https://ci.status.im/job/status-mobile/job/prs/job/android/job/PR-21625/3/) | 2024-11-14 13:36:50 | ~8 min | `android` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241114-132801-f44596-pr21625-arm64-v8a.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241114-132801-f44596-pr21625-arm64-v8a.apk)| | :heavy_check_mark: | f445964f | [#3](https://ci.status.im/job/status-mobile/job/prs/job/ios/job/PR-21625/3/) | 2024-11-14 13:37:25 | ~9 min | `ios` | [:iphone:`ipa`](https://i.diawi.com/rCRJTH) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fi.diawi.com%2FrCRJTH)| | | | | | | | | | :x: | c44b9bd8 | [#4](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/4/) | 2024-11-14 14:27:29 | ~2 min | `tests` | [:page_facing_up:`log`](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/4/consoleText) | | :heavy_check_mark: | c44b9bd8 | [#4](https://ci.status.im/job/status-mobile/job/prs/job/android-e2e/job/PR-21625/4/) | 2024-11-14 14:31:33 | ~6 min | `android-e2e` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241114-142433-c44b9b-pr21625-x86_64.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241114-142433-c44b9b-pr21625-x86_64.apk)| | :heavy_check_mark: | c44b9bd8 | [#4](https://ci.status.im/job/status-mobile/job/prs/job/android/job/PR-21625/4/) | 2024-11-14 14:32:49 | ~8 min | `android` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241114-142433-c44b9b-pr21625-arm64-v8a.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241114-142433-c44b9b-pr21625-arm64-v8a.apk)| | :heavy_check_mark: | c44b9bd8 | [#4](https://ci.status.im/job/status-mobile/job/prs/job/ios/job/PR-21625/4/) | 2024-11-14 14:33:32 | ~8 min | `ios` | [:iphone:`ipa`](https://i.diawi.com/Efn8KH) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fi.diawi.com%2FEfn8KH)| | | | | | | | | | :heavy_check_mark: | 97794c91 | [#5](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/5/) | 2024-11-14 15:03:24 | ~4 min | `tests` | [:page_facing_up:`log`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241114-145828-97794c-pr21625-tests.log) | | :heavy_check_mark: | 97794c91 | [#5](https://ci.status.im/job/status-mobile/job/prs/job/android-e2e/job/PR-21625/5/) | 2024-11-14 15:07:08 | ~8 min | `android-e2e` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241114-145823-97794c-pr21625-x86_64.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241114-145823-97794c-pr21625-x86_64.apk)| | :heavy_check_mark: | 97794c91 | [#5](https://ci.status.im/job/status-mobile/job/prs/job/android/job/PR-21625/5/) | 2024-11-14 15:07:45 | ~9 min | `android` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241114-145823-97794c-pr21625-arm64-v8a.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241114-145823-97794c-pr21625-arm64-v8a.apk)| | :heavy_check_mark: | 97794c91 | [#5](https://ci.status.im/job/status-mobile/job/prs/job/ios/job/PR-21625/5/) | 2024-11-14 15:08:12 | ~9 min | `ios` | [:iphone:`ipa`](https://i.diawi.com/peFG7V) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fi.diawi.com%2FpeFG7V)| | | | | | | | | | :heavy_check_mark: | ff364b35 | [#6](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/6/) | 2024-11-14 16:22:25 | ~4 min | `tests` | [:page_facing_up:`log`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241114-161734-ff364b-pr21625-tests.log) | | :heavy_check_mark: | ff364b35 | [#6](https://ci.status.im/job/status-mobile/job/prs/job/ios/job/PR-21625/6/) | 2024-11-14 16:26:18 | ~8 min | `ios` | [:iphone:`ipa`](https://i.diawi.com/Fm73vc) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fi.diawi.com%2FFm73vc)| | :heavy_check_mark: | ff364b35 | [#6](https://ci.status.im/job/status-mobile/job/prs/job/android-e2e/job/PR-21625/6/) | 2024-11-14 16:26:22 | ~8 min | `android-e2e` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241114-161729-ff364b-pr21625-x86_64.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241114-161729-ff364b-pr21625-x86_64.apk)| | :heavy_check_mark: | ff364b35 | [#6](https://ci.status.im/job/status-mobile/job/prs/job/android/job/PR-21625/6/) | 2024-11-14 16:26:53 | ~9 min | `android` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241114-161729-ff364b-pr21625-arm64-v8a.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241114-161729-ff364b-pr21625-arm64-v8a.apk)| | | | | | | | | | :x: | cf8da961 | [#7](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/7/) | 2024-11-18 12:23:51 | ~3 min | `tests` | [:page_facing_up:`log`](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/7/consoleText) | | :heavy_check_mark: | cf8da961 | [#7](https://ci.status.im/job/status-mobile/job/prs/job/android/job/PR-21625/7/) | 2024-11-18 12:28:01 | ~7 min | `android` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241118-122042-cf8da9-pr21625-arm64-v8a.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241118-122042-cf8da9-pr21625-arm64-v8a.apk)| | :heavy_check_mark: | cf8da961 | [#7](https://ci.status.im/job/status-mobile/job/prs/job/android-e2e/job/PR-21625/7/) | 2024-11-18 12:28:19 | ~7 min | `android-e2e` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241118-122042-cf8da9-pr21625-x86_64.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241118-122042-cf8da9-pr21625-x86_64.apk)| | :heavy_check_mark: | cf8da961 | [#7](https://ci.status.im/job/status-mobile/job/prs/job/ios/job/PR-21625/7/) | 2024-11-18 12:29:55 | ~9 min | `ios` | [:iphone:`ipa`](https://i.diawi.com/g7HMc9) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fi.diawi.com%2Fg7HMc9)| | | | | | | | | | :x: | 0f3cfeb4 | [#8](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/8/) | 2024-11-18 12:44:23 | ~2 min | `tests` | [:page_facing_up:`log`](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/8/consoleText) | | :heavy_check_mark: | 0f3cfeb4 | [#8](https://ci.status.im/job/status-mobile/job/prs/job/android-e2e/job/PR-21625/8/) | 2024-11-18 12:49:34 | ~7 min | `android-e2e` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241118-124137-0f3cfe-pr21625-x86_64.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241118-124137-0f3cfe-pr21625-x86_64.apk)| | :heavy_check_mark: | 0f3cfeb4 | [#8](https://ci.status.im/job/status-mobile/job/prs/job/android/job/PR-21625/8/) | 2024-11-18 12:50:06 | ~8 min | `android` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241118-124139-0f3cfe-pr21625-arm64-v8a.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241118-124139-0f3cfe-pr21625-arm64-v8a.apk)| | :heavy_check_mark: | 0f3cfeb4 | [#8](https://ci.status.im/job/status-mobile/job/prs/job/ios/job/PR-21625/8/) | 2024-11-18 12:51:00 | ~9 min | `ios` | [:iphone:`ipa`](https://i.diawi.com/cXrM7K) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fi.diawi.com%2FcXrM7K)| | | | | | | | | | :x: | c7083135 | [#10](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/10/) | 2024-11-19 12:31:47 | ~2 min | `tests` | [:page_facing_up:`log`](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/10/consoleText) | | :heavy_check_mark: | c7083135 | [#10](https://ci.status.im/job/status-mobile/job/prs/job/android-e2e/job/PR-21625/10/) | 2024-11-19 12:36:54 | ~7 min | `android-e2e` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241119-122918-c70831-pr21625-x86_64.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241119-122918-c70831-pr21625-x86_64.apk)| | | | | | | | | | :heavy_check_mark: | be811d93 | [#11](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/11/) | 2024-11-19 12:42:26 | ~4 min | `tests` | [:page_facing_up:`log`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241119-123748-be811d-pr21625-tests.log) | | :heavy_check_mark: | be811d93 | [#11](https://ci.status.im/job/status-mobile/job/prs/job/android-e2e/job/PR-21625/11/) | 2024-11-19 12:45:40 | ~7 min | `android-e2e` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241119-123743-be811d-pr21625-x86_64.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241119-123743-be811d-pr21625-x86_64.apk)| | :heavy_check_mark: | be811d93 | [#11](https://ci.status.im/job/status-mobile/job/prs/job/android/job/PR-21625/11/) | 2024-11-19 12:46:16 | ~8 min | `android` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241119-123743-be811d-pr21625-arm64-v8a.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241119-123743-be811d-pr21625-arm64-v8a.apk)| | :heavy_check_mark: | be811d93 | [#11](https://ci.status.im/job/status-mobile/job/prs/job/ios/job/PR-21625/11/) | 2024-11-19 12:47:34 | ~9 min | `ios` | [:iphone:`ipa`](https://i.diawi.com/9pzLnU) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fi.diawi.com%2F9pzLnU)| | | | | | | | | | :heavy_check_mark: | 0721455c | [#12](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/12/) | 2024-11-21 13:02:04 | ~12 min | `tests` | [:page_facing_up:`log`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241121-124933-072145-pr21625-tests.log) | | :heavy_check_mark: | 0721455c | [#12](https://ci.status.im/job/status-mobile/job/prs/job/android/job/PR-21625/12/) | 2024-11-21 13:02:39 | ~13 min | `android` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241121-124928-072145-pr21625-arm64-v8a.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241121-124928-072145-pr21625-arm64-v8a.apk)| | :heavy_check_mark: | 0721455c | [#12](https://ci.status.im/job/status-mobile/job/prs/job/android-e2e/job/PR-21625/12/) | 2024-11-21 13:03:30 | ~14 min | `android-e2e` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241121-124928-072145-pr21625-x86_64.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241121-124928-072145-pr21625-x86_64.apk)| | :heavy_check_mark: | 0721455c | [#12](https://ci.status.im/job/status-mobile/job/prs/job/ios/job/PR-21625/12/) | 2024-11-21 13:03:51 | ~14 min | `ios` | [:iphone:`ipa`](https://i.diawi.com/wNyu5W) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fi.diawi.com%2FwNyu5W)| | | | | | | | | | :heavy_check_mark: | 041e48c4 | [#13](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/13/) | 2024-11-21 14:30:21 | ~6 min | `tests` | [:page_facing_up:`log`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241121-142323-041e48-pr21625-tests.log) | | :heavy_check_mark: | 041e48c4 | [#13](https://ci.status.im/job/status-mobile/job/prs/job/android-e2e/job/PR-21625/13/) | 2024-11-21 14:31:52 | ~8 min | `android-e2e` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241121-142319-041e48-pr21625-x86_64.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241121-142319-041e48-pr21625-x86_64.apk)| | :heavy_check_mark: | 041e48c4 | [#13](https://ci.status.im/job/status-mobile/job/prs/job/android/job/PR-21625/13/) | 2024-11-21 14:32:37 | ~9 min | `android` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241121-142323-041e48-pr21625-arm64-v8a.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241121-142323-041e48-pr21625-arm64-v8a.apk)| | :heavy_check_mark: | 041e48c4 | [#13](https://ci.status.im/job/status-mobile/job/prs/job/ios/job/PR-21625/13/) | 2024-11-21 14:35:00 | ~11 min | `ios` | [:iphone:`ipa`](https://i.diawi.com/skdLrL) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fi.diawi.com%2FskdLrL)| | | | | | | | | | :heavy_check_mark: | 1538fb47 | [#14](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/14/) | 2024-11-21 15:07:36 | ~4 min | `tests` | [:page_facing_up:`log`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241121-150253-1538fb-pr21625-tests.log) | | :heavy_check_mark: | 1538fb47 | [#14](https://ci.status.im/job/status-mobile/job/prs/job/android-e2e/job/PR-21625/14/) | 2024-11-21 15:11:38 | ~8 min | `android-e2e` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241121-150249-1538fb-pr21625-x86_64.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241121-150249-1538fb-pr21625-x86_64.apk)| | :heavy_check_mark: | 1538fb47 | [#14](https://ci.status.im/job/status-mobile/job/prs/job/ios/job/PR-21625/14/) | 2024-11-21 15:11:45 | ~8 min | `ios` | [:iphone:`ipa`](https://i.diawi.com/q4wgvS) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fi.diawi.com%2Fq4wgvS)| | :heavy_check_mark: | 1538fb47 | [#14](https://ci.status.im/job/status-mobile/job/prs/job/android/job/PR-21625/14/) | 2024-11-21 15:12:12 | ~9 min | `android` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241121-150249-1538fb-pr21625-arm64-v8a.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241121-150249-1538fb-pr21625-arm64-v8a.apk)| | | | | | | | | | :heavy_check_mark: | 30b74b89 | [#15](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/15/) | 2024-11-25 14:28:12 | ~4 min | `tests` | [:page_facing_up:`log`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241125-142316-30b74b-pr21625-tests.log) | | :heavy_check_mark: | 30b74b89 | [#15](https://ci.status.im/job/status-mobile/job/prs/job/android-e2e/job/PR-21625/15/) | 2024-11-25 14:32:04 | ~8 min | `android-e2e` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241125-142311-30b74b-pr21625-x86_64.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241125-142311-30b74b-pr21625-x86_64.apk)| | :heavy_check_mark: | 30b74b89 | [#15](https://ci.status.im/job/status-mobile/job/prs/job/ios/job/PR-21625/15/) | 2024-11-25 14:32:19 | ~9 min | `ios` | [:iphone:`ipa`](https://i.diawi.com/KhYrC1) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fi.diawi.com%2FKhYrC1)| | :heavy_check_mark: | 30b74b89 | [#15](https://ci.status.im/job/status-mobile/job/prs/job/android/job/PR-21625/15/) | 2024-11-25 14:32:29 | ~9 min | `android` | [:robot:`apk`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241125-142311-30b74b-pr21625-arm64-v8a.apk) [:calling:](https://chart.apis.google.com/chart?cht=qr&chs=400x400&chld=L%7C%0A1&chl=https%3A%2F%2Fstatus-im-mobile-prs.ams3.cdn.digitaloceanspaces.com%2FStatusIm-Mobile-241125-142311-30b74b-pr21625-arm64-v8a.apk)| | | | | | | | | | :heavy_check_mark: | 921bbf6b | [#16](https://ci.status.im/job/status-mobile/job/prs/job/tests/job/PR-21625/16/) | 2024-11-25 16:49:10 | ~4 min | `tests` | [:page_facing_up:`log`](https://status-im-mobile-prs.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-241125-164428-921bbf-pr21625-tests.log) |
:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:heavy_check_mark: 205271ff #17 2024-11-25 16:55:07 ~4 min tests :page_facing_up:log
:heavy_check_mark: e43a0fb4 #18 2024-11-25 17:01:01 ~4 min tests :page_facing_up:log
:heavy_check_mark: e43a0fb4 #18 2024-11-25 17:03:48 ~7 min android :robot:apk :calling:
:heavy_check_mark: e43a0fb4 #18 2024-11-25 17:04:34 ~8 min android-e2e :robot:apk :calling:
:heavy_check_mark: e43a0fb4 #18 2024-11-25 17:05:28 ~8 min ios :iphone:ipa :calling:
VolodLytvynenko commented 6 days ago

hi @vkjr could you please rebase and resolve existing conflicts? thanx

status-im-auto commented 6 days ago

62% of end-end tests have passed

Total executed tests: 8
Failed tests: 2
Expected to fail tests: 1
Passed tests: 5
IDs of failed tests: 727231,740490 
IDs of expected to fail tests: 702843 

Failed tests (2)

Click to expand
  • Rerun failed tests

  • Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231

    # STEP: Adding new regular account
    Device 1: Find `Button` by `accessibility id`: `add-account`

    ``` critical/test_wallet.py:255: in test_wallet_add_remove_regular_account self.wallet_view.add_regular_account(account_name=new_account_name) ../views/wallet_view.py:161: in add_regular_account self.add_account_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: `add-account` 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_balance_mainnet, id: 740490

    ## Signed in successfully!
    Device 1: Find `WalletTab` by `accessibility id`: `wallet-stack-tab`

    ``` critical/test_wallet.py:220: in test_wallet_balance_mainnet self.sign_in_view.wallet_tab.click() ../views/base_element.py:90: in click element = self.find_element() ../views/base_element.py:79: in find_element raise NoSuchElementException( Device 1: WalletTab by accessibility id: `wallet-stack-tab` 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 ```

    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 (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

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    2. test_restore_multiaccount_with_waku_backup_remove_profile_switch, id: 703133
    Device sessions

    vkjr commented 6 days ago

    @VolodLytvynenko, conflicts resolved

    VolodLytvynenko commented 6 days ago

    Hi @vkjr thank you for PR. Take a look at found issue

    PR_ISSUE 1: The balances are not refreshed after the fiat change

    Steps:

    1. Go to profile -> select Language and currency -> select any currency

    Actual result:

    The balances are not updated. (see on screen. 26 USDT estimated as 26 RUB) image

    Expected result:

    Fiat is converted to the selected one

    OS:

    IOS, Android

    Devices:

    smohamedjavid commented 6 days ago

    @vkjr - we need to update the following event as well. Fetch only the prices and market values on currency change.

    https://github.com/status-im/status-mobile/blob/a1e3bb3bd6906c8b74f0f9ded660e9f9d8a8095e/src/status_im/contexts/profile/settings/events.cljs#L146-L149

    vkjr commented 6 days ago

    @VolodLytvynenko, thanks for finding, will fix it.

    vkjr commented 6 days ago

    @smohamedjavid, thanks! I believe this should already work because :wallet/get-wallet-token-for-all-accounts will trigger :wallet/get-wallet-token-for-account and when that calls succeeded fetching of prices and market values will be triggered. Or do you mean something else?

    smohamedjavid commented 6 days ago

    @smohamedjavid, thanks! I believe this should already work because :wallet/get-wallet-token-for-all-accounts will trigger :wallet/get-wallet-token-for-account and when that calls succeeded fetching of prices and market values will be triggered. Or do you mean something else?

    @vkjr - I meant we call the wallet/get-wallet-token-for-all-accounts event in the profile.settings/update-currency event because the currency prices have been nested inside the token data, and we had to fetch again for any other selected currency (including USD - handled by status-go).

    With these PR changes, we can fetch only token prices and market values for the selected currency and USD instead of the whole token data because if the user casually changes the currency multiple times, it will request the whole token data for all those times (pretty heavy for mobile).

    vkjr commented 6 days ago

    @smohamedjavid, ah, now I see your point, thanks!

    vkjr commented 4 days ago

    @VolodLytvynenko, fixed the issue, could you please check? Thanks!

    status-im-auto commented 4 days ago

    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: 727230 
    IDs of expected to fail tests: 702843 

    Failed tests (1)

    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.11999 ETH`

    ``` critical/test_wallet.py:189: in test_wallet_send_asset_from_drawer 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))])) Sender balance is not updated on Etherscan, it is 0.3601 but expected to be 0.3602 ```

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

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    2. test_restore_multiaccount_with_waku_backup_remove_profile_switch, id: 703133
    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_eth, id: 727229
    VolodLytvynenko commented 3 days ago

    Hi @vkjr Hi @vkjr, unfortunately, the issue is still reproducible. However, it only occurs after re-login or when the app returns from the background.

    PR_ISSUE 1: Balances shown in USD after fiat currency change and relogin or background

    Steps:

    1. Go to profile -> select Language and currency -> select any other fiat
    2. Relogin or send the app to the background.
    3. Return to the app.

    Actual result:

    Balances are displayed in USD instead of the selected fiat currency. Correct fiat conversion occurs only after a manual wallet refresh.

    https://github.com/user-attachments/assets/b1c348c5-7732-47c2-8888-6996637c5338

    Expected result:

    Fiat is converted to the selected one

    OS:

    IOS, Android

    Devices:

    Logs:

    logs (2).zip

    vkjr commented 6 hours ago

    @ilmotta, thanks for the review notes, they are addressed

    vkjr commented 6 hours ago

    @VolodLytvynenko, issue fixed, could you please check one more time? 🙏

    status-im-auto commented 5 hours ago

    88% of end-end tests have passed

    Total executed tests: 8
    Failed tests: 0
    Expected to fail tests: 1
    Passed tests: 7
    IDs of expected to fail tests: 702843 

    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 (7)

    Click to expand

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    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_profile_switch, id: 703133
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    2. test_wallet_balance_mainnet, id: 740490

    Class TestWalletMultipleDevice:

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