status-mobile
status-mobile copied to clipboard
fix(wallet): Collectibles not fetched for new and recovered accounts
fixes #18613
Summary
This PR fixes collectibles not fetched for newly added or recovered accounts.
Review notes
When we call the wallet_getCollectiblesAsync RPC, it returns the cached data from the DB. For the newly added address, the collectible is not fetched for those addresses and is not cached in the DB. So, immediately we get an empty response with an updating state and the last fetched timestamp (which would be -1 for those addresses).
status-go fetches the collectibles in the background and signals the client with wallet-collectibles-ownership-update-*. When the mobile receives it, it checks for any added (cached in the DB) collectibles and requests for collectibles for that chain id. The wallet-collectibles-ownership-update-* sends only the contract address and token ID of the collectibles added/updated/removed. Later, we can check for updated or removed collectibles and act on them accordingly on the mobile.
Another problem is that when the accounts (apart from the default wallet account) are added from the backup data, they do not initiate the collectable fetching in the status-go which is fixed in this PR: https://github.com/status-im/status-go/pull/5739
The status-go fix is to send an event on adding/removing accounts from processing the backed-up data to initiate collectibles fetch in the background.
Platforms
- Android
- iOS
Steps to test
- Open Status
- Recover a profile with wallet accounts with collectibles
- Verify the collectibles are fetched
status: ready
Jenkins Builds
Click to see older builds (36)
| :grey_question: | Commit | :hash: | Finished (UTC) | Duration | Platform | Result |
|---|---|---|---|---|---|---|
| :heavy_check_mark: | 9587c72f | #1 | 2024-08-05 17:33:33 | ~4 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | 9587c72f | #1 | 2024-08-05 17:36:36 | ~7 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | 9587c72f | #1 | 2024-08-05 17:37:01 | ~7 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | 9587c72f | #1 | 2024-08-05 17:38:15 | ~9 min | ios |
:iphone:ipa :calling: |
| :heavy_check_mark: | 168a981a | #2 | 2024-08-05 19:16:19 | ~3 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | 168a981a | #2 | 2024-08-05 19:19:28 | ~7 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | 168a981a | #2 | 2024-08-05 19:19:48 | ~7 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | 168a981a | #2 | 2024-08-05 19:21:55 | ~9 min | ios |
:iphone:ipa :calling: |
| :heavy_check_mark: | a66e8ae0 | #3 | 2024-08-05 19:32:22 | ~4 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | a66e8ae0 | #3 | 2024-08-05 19:34:25 | ~6 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | a66e8ae0 | #3 | 2024-08-05 19:34:59 | ~7 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | a66e8ae0 | #3 | 2024-08-05 19:43:58 | ~16 min | ios |
:iphone:ipa :calling: |
| :heavy_check_mark: | ffbdd433 | #5 | 2024-08-06 21:13:11 | ~4 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | ffbdd433 | #5 | 2024-08-06 21:15:47 | ~6 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | ffbdd433 | #5 | 2024-08-06 21:16:25 | ~7 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | ffbdd433 | #5 | 2024-08-06 21:18:11 | ~9 min | ios |
:iphone:ipa :calling: |
| :x: | 27d6649c | #7 | 2024-08-07 20:15:14 | ~3 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | 27d6649c | #7 | 2024-08-07 20:17:54 | ~6 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | 27d6649c | #7 | 2024-08-07 20:20:21 | ~8 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | 27d6649c | #7 | 2024-08-07 20:21:23 | ~10 min | ios |
:iphone:ipa :calling: |
| :x: | 1e902624 | #8 | 2024-08-07 20:51:09 | ~2 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | 1e902624 | #8 | 2024-08-07 20:55:42 | ~7 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | 1e902624 | #8 | 2024-08-07 20:56:14 | ~7 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | 1e902624 | #8 | 2024-08-07 20:57:27 | ~8 min | ios |
:iphone:ipa :calling: |
| :heavy_check_mark: | 26278521 | #9 | 2024-08-08 20:48:01 | ~4 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | 26278521 | #9 | 2024-08-08 20:49:27 | ~6 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | 26278521 | #9 | 2024-08-08 20:51:11 | ~7 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | 26278521 | #9 | 2024-08-08 20:53:32 | ~10 min | ios |
:iphone:ipa :calling: |
| :x: | 5baf1825 | #10 | 2024-08-20 10:14:39 | ~3 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | 5baf1825 | #10 | 2024-08-20 10:18:47 | ~7 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | 5baf1825 | #10 | 2024-08-20 10:18:52 | ~7 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | 5baf1825 | #10 | 2024-08-20 10:28:30 | ~17 min | ios |
:iphone:ipa :calling: |
| :heavy_check_mark: | b13a3fd0 | #11 | 2024-08-20 11:27:06 | ~4 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | b13a3fd0 | #11 | 2024-08-20 11:30:11 | ~7 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | b13a3fd0 | #11 | 2024-08-20 11:31:06 | ~8 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | b13a3fd0 | #11 | 2024-08-20 11:32:30 | ~9 min | ios |
:iphone:ipa :calling: |
| :grey_question: | Commit | :hash: | Finished (UTC) | Duration | Platform | Result |
|---|---|---|---|---|---|---|
| :heavy_check_mark: | 72886def | #12 | 2024-08-28 10:46:57 | ~4 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | 72886def | #12 | 2024-08-28 10:49:03 | ~6 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | 72886def | #12 | 2024-08-28 10:50:47 | ~8 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | 72886def | #12 | 2024-08-28 10:54:55 | ~12 min | ios |
:iphone:ipa :calling: |
| :heavy_check_mark: | 94476d3b | #13 | 2024-08-30 19:37:55 | ~5 min | tests |
:page_facing_up:log |
| :heavy_check_mark: | 94476d3b | #13 | 2024-08-30 19:40:11 | ~7 min | android-e2e |
:robot:apk :calling: |
| :heavy_check_mark: | 94476d3b | #13 | 2024-08-30 19:41:28 | ~8 min | android |
:robot:apk :calling: |
| :heavy_check_mark: | 94476d3b | #13 | 2024-08-30 19:44:55 | ~12 min | ios |
:iphone:ipa :calling: |
57% of end-end tests have passed
Total executed tests: 7
Failed tests: 3
Expected to fail tests: 0
Passed tests: 4
IDs of failed tests: 727230,702745,727229
Failed tests (3)
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 1: Device 2: |
Passed tests (4)
Click to expand
Class TestWalletOneDevice:
| 1. test_wallet_add_remove_regular_account, id: 727231 |
| Device sessions Device 1: |
Class TestCommunityMultipleDeviceMerged:
| 1. test_community_message_edit, id: 702843 |
| Device sessions Device 1: Device 2: |
Class TestCommunityOneDeviceMerged:
| 1. test_community_copy_and_paste_message_in_chat_input, id: 702742 |
| Device sessions Device 1: |
| 2. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133 |
| Device sessions Device 1: |
hi @smohamedjavid thank you for PR. Usually the collectibles are fetched, but not all. I can share in DM the seed phrase of a user that has such a collectibles.
ISSUE 1: Incomplete fetching of collectibles after user is restored
Steps:
- Restore user
- Check collectibles
Actual result:
https://github.com/user-attachments/assets/b85af491-a578-4343-9504-0eb4265be68a
Expected result:
Collectibles are fetched after account is restored
Additional info:
Note 1: Previously, refreshing the wallet or relogging resolved such issues, but currently, only relogging helps.
Note 2: This issue seems to affect collectibles on the testnet. It’s unclear if it’s related to specific collectibles or networks.
Note 3: The same issue is reproducible on the desktop platform. (waited ~20 minutes, but collectibles were shown in loading state)
Mobile logs:
Desktop logs:
@VolodLytvynenko - Thanks for testing the PR 🙏
The issue should be fixed now. The fix includes a status-go update.
Hey @smohamedjavid, unfortunately, I wasn't able to check this PR. yesterday just came back from vacations. I'll take a look at it today. Could you please rebase the current PR and the Status Go PR here?
@VolodLytvynenko - No worries. I have rebased both PRs 👍
94% of end-end tests have passed
Total executed tests: 51
Failed tests: 3
Expected to fail tests: 0
Passed tests: 48
IDs of failed tests: 703495,702839,702838
Failed tests (3)
Click to expand
Class TestCommunityMultipleDeviceMerged:
| 1. test_community_message_delete, id: 702839 |
Device 1: Device 2: |
| 2. test_community_message_send_check_timestamps_sender_username, id: 702838 |
Device 1: Device 2: |
Class TestGroupChatMultipleDeviceMergedNewUI:
| 1. test_group_chat_mute_chat, id: 703495 |
Device 1: Device 2: Device 3: |
Passed tests (48)
Click to expand
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
| 1. test_1_1_chat_delete_via_long_press_relogin, id: 702784 |
| Device sessions Device 1: Device 2: |
| 2. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783 |
| Device sessions Device 1: Device 2: |
| 3. test_1_1_chat_mute_chat, id: 703496 |
| Device sessions Device 1: Device 2: |
Class TestActivityMultipleDevicePR:
| 1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947 |
| Device sessions Device 1: Device 2: |
Class TestDeepLinksOneDevice:
| 1. test_links_open_universal_links_from_chat, id: 704613 |
| Device sessions Device 1: |
| 2. test_links_deep_links_profile, id: 702775 |
| Device sessions Device 1: |
| 3. test_deep_links_communities, id: 739307 |
| Device sessions Device 1: |
Class TestOneToOneChatMultipleSharedDevicesNewUi:
| 1. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782 |
| Device sessions Device 1: Device 2: |
| 2. test_1_1_chat_text_message_delete_push_disappear, id: 702733 |
| Device sessions Device 1: Device 2: |
| 3. test_1_1_chat_push_emoji, id: 702813 |
| Device sessions Device 1: Device 2: |
| 4. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745 |
| Device sessions Device 1: Device 2: |
| 5. test_1_1_chat_edit_message, id: 702855 |
| Device sessions Device 1: Device 2: |
| 6. test_1_1_chat_send_image_save_and_share, id: 703391 |
| Device sessions Device 1: Device 2: |
| 7. test_1_1_chat_pin_messages, id: 702731 |
| Device sessions Device 1: Device 2: |
| 8. test_1_1_chat_message_reaction, id: 702730 |
| Device sessions Device 1: Device 2: |
Class TestWalletMultipleDevice:
| 1. test_wallet_send_asset_from_drawer, id: 727230 |
| 2. test_wallet_send_eth, id: 727229 |
Class TestGroupChatMultipleDeviceMergedNewUI:
| 1. test_group_chat_pin_messages, id: 702732 |
| Device sessions Device 1: Device 2: Device 3: |
| 2. test_group_chat_send_image_save_and_share, id: 703297 |
| Device sessions Device 1: Device 2: Device 3: |
| 3. test_group_chat_reactions, id: 703202 |
| Device sessions Device 1: Device 2: Device 3: |
| 4. test_group_chat_join_send_text_messages_push, id: 702807 |
| Device sessions Device 1: Device 2: Device 3: |
| 5. test_group_chat_offline_pn, id: 702808 |
| Device sessions Device 1: Device 2: Device 3: |
Class TestWalletOneDevice:
| 1. test_wallet_add_remove_regular_account, id: 727231 |
| Device sessions Device 1: |
Class TestCommunityMultipleDeviceMergedTwo:
| 1. test_community_markdown_support, id: 702809 |
| Device sessions Device 1: Device 2: |
| 2. test_community_hashtag_links_to_community_channels, id: 702948 |
| Device sessions Device 1: Device 2: |
| 3. test_community_mentions_push_notification, id: 702786 |
| Device sessions Device 1: Device 2: |
| 4. test_community_leave, id: 702845 |
| Device sessions Device 1: Device 2: |
| 5. test_community_join_when_node_owner_offline, id: 703629 |
| Device sessions Device 1: Device 2: |
Class TestCommunityMultipleDeviceMerged:
| 1. test_community_several_images_send_reply, id: 703194 |
| Device sessions Device 1: Device 2: |
| 2. test_community_one_image_send_reply, id: 702859 |
| Device sessions Device 1: Device 2: |
| 3. test_community_emoji_send_copy_paste_reply, id: 702840 |
| Device sessions Device 1: Device 2: |
| 4. test_community_mark_all_messages_as_read, id: 703086 |
| Device sessions Device 1: Device 2: |
| 5. test_community_contact_block_unblock_offline, id: 702894 |
| Device sessions Device 1: Device 2: |
| 6. test_community_edit_delete_message_when_offline, id: 704615 |
| Device sessions Device 1: Device 2: |
| 7. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844 |
| Device sessions Device 1: Device 2: |
| 8. test_community_message_edit, id: 702843 |
| Device sessions Device 1: Device 2: |
| 9. test_community_unread_messages_badge, id: 702841 |
| Device sessions Device 1: Device 2: |
Class TestActivityMultipleDevicePRTwo:
| 1. test_activity_center_mentions, id: 702957 |
| Device sessions Device 1: Device 2: |
| 2. test_activity_center_admin_notification_accept_swipe, id: 702958 |
| Device sessions Device 1: Device 2: |
Class TestCommunityOneDeviceMerged:
| 1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133 |
| Device sessions Device 1: |
| 2. test_community_copy_and_paste_message_in_chat_input, id: 702742 |
| Device sessions Device 1: |
| 3. test_community_discovery, id: 703503 |
| Device sessions Device 1: |
| 4. test_community_undo_delete_message, id: 702869 |
| Device sessions Device 1: |
| 5. test_community_navigate_to_channel_when_relaunch, id: 702846 |
| Device sessions Device 1: |
| 6. test_community_mute_community_and_channel, id: 703382 |
| Device sessions Device 1: |
Class TestActivityCenterContactRequestMultipleDevicePR:
| 1. test_add_contact_field_validation, id: 702777 |
| Device sessions Device 1: Device 2: |
| 2. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851 |
| Device sessions Device 1: Device 2: |
| 3. test_activity_center_contact_request_decline, id: 702850 |
| Device sessions Device 1: Device 2: |
@smohamedjavid Thank you for PR. No issues from my side. PR is ready to be merged