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(wallet): native share should point to opensea link #20222

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

J-Son89
Copy link
Contributor

@J-Son89 J-Son89 commented May 28, 2024

fixes: #20223

This pr updates the native share for the collectibles in wallet so that the url it points to is for the Open Sea link
e.g https://opensea.io/assets/ethereum/0xa342f5d851e866e18ff98f351f2c6637f4478db5/93539746106169265185984122850742147987924040810729814653747710597909889193997

This has four points of entry. Home Page, Account Page, Collectible overview page, lightbox in collectible overview page.

Home Page:

Account Page:

In lightbox:

In overview page:

@status-im-auto
Copy link
Member

status-im-auto commented May 28, 2024

Jenkins Builds

Click to see older builds (45)
Commit #️⃣ Finished (UTC) Duration Platform Result
4924f3c #1 2024-05-28 22:46:35 ~4 min tests 📄log
✔️ 4924f3c #1 2024-05-28 22:51:12 ~8 min android-e2e 🤖apk 📲
✔️ 4924f3c #1 2024-05-28 22:51:17 ~8 min android 🤖apk 📲
✔️ 4924f3c #1 2024-05-28 22:53:13 ~10 min ios 📱ipa 📲
✔️ 905a7d9 #3 2024-05-28 22:59:58 ~4 min tests 📄log
✔️ 905a7d9 #2 2024-05-28 23:02:56 ~7 min android-e2e 🤖apk 📲
✔️ 905a7d9 #2 2024-05-28 23:02:58 ~7 min android 🤖apk 📲
✔️ 905a7d9 #2 2024-05-28 23:06:08 ~10 min ios 📱ipa 📲
✔️ b3575e1 #4 2024-06-05 10:31:59 ~4 min tests 📄log
✔️ b3575e1 #3 2024-06-05 10:35:27 ~8 min android-e2e 🤖apk 📲
✔️ b3575e1 #3 2024-06-05 10:35:34 ~8 min android 🤖apk 📲
✔️ b3575e1 #3 2024-06-05 10:37:17 ~9 min ios 📱ipa 📲
9678ffb #5 2024-06-05 19:34:38 ~2 min tests 📄log
✔️ 9678ffb #4 2024-06-05 19:39:53 ~8 min android-e2e 🤖apk 📲
✔️ 9678ffb #4 2024-06-05 19:40:02 ~8 min android 🤖apk 📲
✔️ 9678ffb #4 2024-06-05 19:41:29 ~9 min ios 📱ipa 📲
✔️ 933bec3 #6 2024-06-05 20:23:28 ~4 min tests 📄log
✔️ 933bec3 #5 2024-06-05 20:26:32 ~7 min android 🤖apk 📲
✔️ 933bec3 #5 2024-06-05 20:26:41 ~7 min android-e2e 🤖apk 📲
✔️ 933bec3 #5 2024-06-05 20:29:58 ~11 min ios 📱ipa 📲
✔️ 21f7870 #7 2024-06-07 18:49:20 ~4 min tests 📄log
✔️ 21f7870 #6 2024-06-07 18:51:07 ~6 min android-e2e 🤖apk 📲
✔️ 21f7870 #6 2024-06-07 18:52:27 ~7 min android 🤖apk 📲
✔️ 21f7870 #6 2024-06-07 18:57:43 ~13 min ios 📱ipa 📲
8422de0 #8 2024-06-09 20:15:49 ~4 min tests 📄log
✔️ 8422de0 #7 2024-06-09 20:19:51 ~8 min android-e2e 🤖apk 📲
✔️ 8422de0 #7 2024-06-09 20:19:55 ~8 min android 🤖apk 📲
✔️ 8422de0 #7 2024-06-09 20:25:22 ~13 min ios 📱ipa 📲
✔️ a7ac971 #9 2024-06-11 14:27:49 ~4 min tests 📄log
✔️ a7ac971 #8 2024-06-11 14:29:38 ~6 min android 🤖apk 📲
✔️ a7ac971 #8 2024-06-11 14:30:33 ~7 min android-e2e 🤖apk 📲
✔️ a7ac971 #8 2024-06-11 14:38:14 ~14 min ios 📱ipa 📲
✔️ 89e0798 #10 2024-06-17 13:44:21 ~3 min tests 📄log
✔️ 89e0798 #9 2024-06-17 13:47:45 ~7 min android-e2e 🤖apk 📲
✔️ 89e0798 #9 2024-06-17 13:47:51 ~7 min android 🤖apk 📲
✔️ 89e0798 #9 2024-06-17 13:50:20 ~9 min ios 📱ipa 📲
✔️ 2ec9bc3 #10 2024-06-21 15:29:30 ~9 min ios 📱ipa 📲
✔️ df9101c #11 2024-06-21 15:43:50 ~9 min ios 📱ipa 📲
✔️ df9101c #11 2024-06-21 15:52:07 ~17 min android-e2e 🤖apk 📲
df9101c #12 2024-06-21 15:54:50 ~20 min tests 📄log
✔️ df9101c #11 2024-06-21 15:54:59 ~20 min android 🤖apk 📲
✔️ b2b89e2 #13 2024-06-24 16:44:22 ~4 min tests 📄log
✔️ b2b89e2 #12 2024-06-24 16:45:45 ~6 min android 🤖apk 📲
✔️ b2b89e2 #12 2024-06-24 16:47:00 ~7 min android-e2e 🤖apk 📲
✔️ b2b89e2 #12 2024-06-24 16:53:04 ~13 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ d6992e6 #14 2024-06-24 21:20:08 ~3 min tests 📄log
✔️ d6992e6 #13 2024-06-24 21:23:33 ~7 min android-e2e 🤖apk 📲
✔️ d6992e6 #13 2024-06-24 21:23:37 ~7 min android 🤖apk 📲
✔️ d6992e6 #13 2024-06-24 21:26:05 ~9 min ios 📱ipa 📲
✔️ de86ad8 #15 2024-06-25 14:49:57 ~3 min tests 📄log
✔️ de86ad8 #14 2024-06-25 14:52:12 ~6 min android-e2e 🤖apk 📲
✔️ de86ad8 #14 2024-06-25 14:52:24 ~6 min android 🤖apk 📲
✔️ de86ad8 #14 2024-06-25 14:55:53 ~9 min ios 📱ipa 📲

@J-Son89 J-Son89 force-pushed the jc/opensea-share branch from 4924f3c to 905a7d9 Compare May 28, 2024 22:55
:chain-id chain-id
:token-id token-id
:contract-address contract-address
}])
Copy link
Contributor

Choose a reason for hiding this comment

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

Trailing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, addressed

:token-id token-id
:contract-address
contract-address
}])}])}])))
Copy link
Contributor

Choose a reason for hiding this comment

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

Trailing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, addressed

{:options
{:title title
:subject title
:message uri}}]]}))

(rf/reg-event-fx :wallet/share-collectible
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that in-sheet? as an argument adds unnecessary knowledge about the outer context to this event. Instead we can pass dispatch-timeout and make decision of selecting dispatch vs dispatch-later based on it. And :hide-bottom-sheet could be called outside, where knowledge about UI details exist. This will make :wallet/share-collectible more flexible.
Wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, that's a good point! will adjust to that!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm on reviewing this, I think one thing to consider is that in-sheet? will hide the bottom sheet.
But anyway I see there is only one use of this function and it's in a bottom sheet, so I'll just remove that parameter altogether :)

address (get-in id [:contract-id :address])]
(let [chain-id (get-in id [:contract-id :chain-id])
token-id (:token-id id)
contract-address (get-in id [:contract-id :address])]
(rf/dispatch [:show-bottom-sheet
{:content (fn []
[options-drawer/view
Copy link
Contributor

@vkjr vkjr Jun 5, 2024

Choose a reason for hiding this comment

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

In few places parameters chain-id, token-id and contract-address are all extracted from one id param before passing to options-drawer/view. Instead we can pass just id and make the extraction inside options-drawer/view to reduce text repetition. This will also reduce surface for changes if structure of id will change in a future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for the great suggestions! Will update :)

@J-Son89 J-Son89 force-pushed the jc/opensea-share branch 2 times, most recently from 9678ffb to 933bec3 Compare June 5, 2024 20:18
@status-im-auto
Copy link
Member

84% of end-end tests have passed

Total executed tests: 51
Failed tests: 5
Expected to fail tests: 3
Passed tests: 43
Not executed tests: 1
IDs of not executed tests: 702936 
IDs of failed tests: 727230,702948,727229,702731,703629 
IDs of expected to fail tests: 703495,703503,727232 

Not executed tests (1)

Click to expand
  • Rerun not executed tests
  • Failed tests (5)

    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 `WalletTab` by `accessibility id`: `wallet-stack-tab`

    critical/test_wallet.py:120: 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:41: in _get_balances_before_tx
        self.wallet_1.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
    



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

    1. test_1_1_chat_pin_messages, id: 702731

    Device 1: Find Button by xpath: //*[@content-desc='pins-count']//android.widget.TextView
    Device 2: Find Button by xpath: //*[@content-desc='pins-count']//android.widget.TextView

    critical/chats/test_1_1_public_chats.py:270: in test_1_1_chat_pin_messages
        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))]))
     Pinned messages count is 2 but should be 3 for user 2
    



    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_hashtag_links_to_community_channels, id: 702948

    Device 2: Find Text by xpath: //android.view.ViewGroup[@content-desc='chat-item']//android.widget.TextView[contains(@text,'#cats')]
    Device 2: Looking for a message by text: it is just a message text

    critical/chats/test_public_chat_browsing.py:1098: in test_community_hashtag_links_to_community_channels
        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))]))
     Message in community channel is not visible for user before join
    



    Device sessions

    2. test_community_join_when_node_owner_offline, id: 703629

    Device 2: Looking for community: 'open community'
    Device 2: Click until Text by accessibility id: community-description-text will be presented

    critical/chats/test_public_chat_browsing.py:1184: in test_community_join_when_node_owner_offline
        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))]))
     not
    



    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

    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:214: 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' 
    

    [[Missing networks in account address, https://github.com//issues/20166]]

    Device sessions

    Passed tests (43)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_several_images_send_reply, id: 703194
    Device sessions

    2. test_community_one_image_send_reply, id: 702859
    Device sessions

    3. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    4. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    5. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    6. test_community_edit_delete_message_when_offline, id: 704615
    Device sessions

    7. test_community_message_delete, id: 702839
    Device sessions

    8. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    9. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    10. test_community_message_edit, id: 702843
    Device sessions

    11. test_community_unread_messages_badge, id: 702841
    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 TestActivityMultipleDevicePR:

    1. 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_join_send_text_messages_push, id: 702807
    Device sessions

    5. test_group_chat_offline_pn, id: 702808
    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 TestCommunityMultipleDeviceMergedTwo:

    1. test_community_markdown_support, id: 702809
    Device sessions

    2. test_community_mentions_push_notification, id: 702786
    Device sessions

    3. test_community_leave, id: 702845
    Device sessions

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

    1. test_activity_center_mentions, id: 702957
    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958
    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_message_reaction, id: 702730
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    @pavloburykh pavloburykh self-assigned this Jun 10, 2024
    @pavloburykh
    Copy link
    Contributor

    Hey @J-Son89! Thank you for the PR. Please take a look at the issue

    ISSUE 1 After selecting app for sharing collectible link - it is opened within Status app (Android)

    Android only. Reproduced on Samsung Galaxy A52, Android 12

    Steps:

    1. Open native share for the collectibles
    2. Select app for sharing
    3. See if selected app has been opened in separate tab or within Status app

    Actual result: app is opened within Status app

    screencast.2024-06-10.13-23-15.mp4

    Expected result: app should be opened in separate tab. Below is an example of sharing community link.

    sharing.comm.link.mp4

    @J-Son89
    Copy link
    Contributor Author

    J-Son89 commented Jun 10, 2024

    thanks @pavloburykh - was not aware of this. Will address! 🙏

    @J-Son89 J-Son89 force-pushed the jc/opensea-share branch from 8422de0 to a7ac971 Compare June 11, 2024 14:23
    @pavloburykh
    Copy link
    Contributor

    thanks @pavloburykh - was not aware of this. Will address! 🙏

    thank you @J-Son89! Please, ping me up once PR is ready for re-test.

    @J-Son89 J-Son89 force-pushed the jc/opensea-share branch from a7ac971 to 89e0798 Compare June 17, 2024 13:40
    @J-Son89
    Copy link
    Contributor Author

    J-Son89 commented Jun 17, 2024

    @pavloburykh issue 1 should be addressed now. Apologies for the delay.

    @pavloburykh
    Copy link
    Contributor

    @J-Son89 thank you for the fixes. Please take a look at the new issue.

    ISSUE 2 IOS crashes when sending collectible via longtap menu

    IOS ONLY Reproducing on iPhoneX, IOS 16.7.7

    Steps:

    1. Open Home Page or Account Page
    2. Go to Collectibles tab
    3. Longtap on any collectible
    4. Tap "Share collectible"
    5. Observe the result

    Actual result: app crashes

    telegram-cloud-document-2-5445185058564493526.mp4

    @VolodLytvynenko
    Copy link
    Contributor

    @J-Son89 thank you for the fixes. Please take a look at the new issue.

    ISSUE 2 IOS crashes when sending collectible via longtap menu

    IOS ONLY Reproducing on iPhoneX, IOS 16.7.7

    Steps:

    1. Open Home Page or Account Page
    2. Go to Collectibles tab
    3. Longtap on any collectible
    4. Tap "Share collectible"
    5. Observe the result

    Actual result: app crashes

    telegram-cloud-document-2-5445185058564493526.mp4

    Can't reproduce it on iPhone 11 Pro max, IOS 17.5.1. Collectibles are shared without crash for me

    @qoqobolo
    Copy link
    Contributor

    Can't reproduce ISSUE 2 either (iPhone SE, iOS 17.5.1)

    @J-Son89 J-Son89 force-pushed the jc/opensea-share branch 3 times, most recently from df9101c to b2b89e2 Compare June 24, 2024 16:39
    @J-Son89 J-Son89 force-pushed the jc/opensea-share branch from b2b89e2 to d6992e6 Compare June 24, 2024 21:15
    @pavloburykh
    Copy link
    Contributor

    @J-Son89 thank you! The issue is fixed for me. Ready for merge.

    @J-Son89 J-Son89 merged commit fd3a21a into develop Jun 25, 2024
    6 checks passed
    @J-Son89 J-Son89 deleted the jc/opensea-share branch June 25, 2024 14:56
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    Wallet - Share collectible should link to opensea
    10 participants