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

feat: add ability to send collectibles from wallet #18473

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

briansztamfater
Copy link
Member

@briansztamfater briansztamfater commented Jan 11, 2024

fixes #16979 #18260

Summary

This PR adds basic events and UI to send a collectible from our wallet



Platforms

  • Android
  • iOS

Areas that maybe impacted

Functional
  • wallet / transactions

Steps to test

  • Login
  • Open wallet
  • Select an account
  • Select "Send" option
  • Enter an address
  • Select a collectible from the Collectibles tab
  • Check transaction confirmation screen is showing correct information
  • Slide to execute transaction
  • Verify "Sending..." page is shown and that the transaction is executed correctly (compare in blockchain explorer such as Etherscan)

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented Jan 11, 2024

Jenkins Builds

Click to see older builds (19)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 4451af2 #1 2024-01-11 18:02:12 ~6 min tests 📄log
✔️ 4451af2 #1 2024-01-11 18:04:31 ~8 min android 🤖apk 📲
✔️ 4451af2 #1 2024-01-11 18:04:36 ~8 min android-e2e 🤖apk 📲
✔️ 4451af2 #1 2024-01-11 18:17:39 ~22 min ios 📱ipa 📲
✔️ eb19ad5 #2 2024-01-11 18:29:27 ~5 min tests 📄log
✔️ eb19ad5 #2 2024-01-11 18:30:51 ~6 min android-e2e 🤖apk 📲
✔️ eb19ad5 #2 2024-01-11 18:31:37 ~7 min android 🤖apk 📲
✔️ 9077ae9 #3 2024-01-11 18:44:20 ~5 min tests 📄log
✔️ 9077ae9 #3 2024-01-11 18:45:39 ~6 min android-e2e 🤖apk 📲
✔️ 9077ae9 #3 2024-01-11 18:46:23 ~7 min android 🤖apk 📲
✔️ 9077ae9 #3 2024-01-11 18:55:23 ~16 min ios 📱ipa 📲
✔️ 9077ae9 #4 2024-01-12 17:20:56 ~5 min tests 📄log
✔️ 9077ae9 #4 2024-01-12 17:21:29 ~6 min ios 📱ipa 📲
✔️ 9077ae9 #4 2024-01-12 17:21:49 ~6 min android 🤖apk 📲
✔️ 9077ae9 #4 2024-01-12 17:23:01 ~8 min android-e2e 🤖apk 📲
✔️ eb3905e #6 2024-01-12 18:27:13 ~5 min tests 📄log
✔️ eb3905e #6 2024-01-12 18:28:35 ~6 min android-e2e 🤖apk 📲
✔️ eb3905e #6 2024-01-12 18:29:04 ~7 min ios 📱ipa 📲
✔️ eb3905e #6 2024-01-12 18:29:34 ~7 min android 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ d655588 #7 2024-01-12 19:00:41 ~5 min tests 📄log
✔️ d655588 #7 2024-01-12 19:01:55 ~6 min ios 📱ipa 📲
✔️ d655588 #7 2024-01-12 19:03:19 ~8 min android-e2e 🤖apk 📲
✔️ d655588 #7 2024-01-12 19:03:20 ~8 min android 🤖apk 📲
✔️ 4cc796a #8 2024-01-16 14:43:41 ~11 min tests 📄log
✔️ 4cc796a #8 2024-01-16 14:44:19 ~11 min ios 📱ipa 📲
✔️ 4cc796a #8 2024-01-16 14:46:28 ~13 min android-e2e 🤖apk 📲
✔️ 4cc796a #8 2024-01-16 14:46:52 ~14 min android 🤖apk 📲

@briansztamfater briansztamfater force-pushed the feat/send-collectible-events-4 branch 2 times, most recently from eb19ad5 to 9077ae9 Compare January 11, 2024 18:38
Copy link
Member

@smohamedjavid smohamedjavid left a comment

Choose a reason for hiding this comment

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

Nice work! @briansztamfater 🚀

src/status_im/subs/wallet/send.cljs Outdated Show resolved Hide resolved
src/status_im/contexts/wallet/send/events.cljs Outdated Show resolved Hide resolved
@@ -40,25 +40,35 @@
(update-in [:wallet :ui :send] dissoc :route)
(update-in [:wallet :ui :send] dissoc :loading-suggested-routes?))}))

(rf/reg-event-fx :wallet/select-send-account-address
(fn [{:keys [db]} [{:keys [address stack-id]}]]
(rf/reg-event-fx :wallet/clean-send-address
Copy link
Member

Choose a reason for hiding this comment

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

Much simpler 🙌

src/status_im/contexts/wallet/send/events.cljs Outdated Show resolved Hide resolved
src/status_im/contexts/wallet/send/events.cljs Outdated Show resolved Hide resolved
@ulisesmac ulisesmac force-pushed the 16978-select-collectible branch from 52b5e99 to 9f59f1b Compare January 12, 2024 00:26
Comment on lines -36 to 52
(when (pos? ethereum)
(when (and ethereum (pos? (:amount ethereum)))
[network-amount
{:network :ethereum
:amount (str ethereum " ETH")
:amount (str (:amount ethereum) " " (or (:token-symbol ethereum) "ETH"))
:divider? (or show-arbitrum? show-optimism?)
:theme theme}])
(when show-optimism?
[network-amount
{:network :optimism
:amount (str optimism " OPT")
:amount (str (:amount optimism) " " (or (:token-symbol optimism) "OPT"))
:divider? show-arbitrum?
:theme theme}])
(when show-arbitrum?
[network-amount
{:network :arbitrum
:amount (str arbitrum " ARB")
:amount (str (:amount arbitrum) " " (or (:token-symbol arbitrum) "ARB"))
:theme theme}])]))
Copy link
Contributor

@OmarBasem OmarBasem Jan 12, 2024

Choose a reason for hiding this comment

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

There seems to be unnecessary duplication here. I think this can be a loop that includes the networks and which ones needs to be shown

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 totally agree @OmarBasem, we can definitely improve this component, but I think that is beyond the scope of this PR so I'll create an issue to keep track of this improvement!

Copy link
Contributor

Choose a reason for hiding this comment

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

yep let's track this in a separate issue 👍

@ulisesmac ulisesmac force-pushed the 16978-select-collectible branch from 0ca7668 to 5d8c349 Compare January 12, 2024 16:56
Base automatically changed from 16978-select-collectible to develop January 12, 2024 17:14
@briansztamfater briansztamfater force-pushed the feat/send-collectible-events-4 branch 2 times, most recently from 0efe7c4 to eb3905e Compare January 12, 2024 18:21
@status-im-auto
Copy link
Member

58% of end-end tests have passed

Total executed tests: 48
Failed tests: 18
Expected to fail tests: 2
Passed tests: 28
IDs of failed tests: 702809,703194,702859,702957,702840,703086,702948,702894,704615,702786,702839,702838,702844,702843,702845,702958,703629,702841 
IDs of expected to fail tests: 703503,702808 

Failed tests (18)

Click to expand
  • Rerun failed tests

  • Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_markdown_support, id: 702809
    Test setup failed: critical/chats/test_public_chat_browsing.py:838: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element
    



    2. test_community_hashtag_links_to_community_channels, id: 702948

    Test setup failed: critical/chats/test_public_chat_browsing.py:838: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element
    



    3. test_community_mentions_push_notification, id: 702786

    Device 2: Find Text by xpath: //android.view.ViewGroup[@content-desc='chat-item']//android.widget.TextView[contains(@text,'https://status.app/c/')]
    Device 2: Wait for element Button for max 120s and click when it is available

    Test setup failed: critical/chats/test_public_chat_browsing.py:838: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    4. test_community_leave, id: 702845

    Test setup failed: critical/chats/test_public_chat_browsing.py:838: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element
    



    5. test_community_join_when_node_owner_offline, id: 703629

    Test setup failed: critical/chats/test_public_chat_browsing.py:838: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element 
    

    [[Can't join a community if admin goes offline, https://github.com//issues/17678]]

    Class TestActivityMultipleDevicePRTwo:

    1. test_activity_center_mentions, id: 702957

    Device 2: Find Text by xpath: //android.view.ViewGroup[@content-desc='chat-item']//android.widget.TextView[contains(@text,'https://status.app/c/')]
    Device 2: Wait for element Button for max 120s and click when it is available

    Test setup failed: activity_center/test_activity_center.py:409: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958

    Test setup failed: activity_center/test_activity_center.py:409: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element
    



    Class TestCommunityMultipleDeviceMerged:

    1. test_community_several_images_send_reply, id: 703194

    Test setup failed: critical/chats/test_public_chat_browsing.py:322: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` 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:322: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` 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:322: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` 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:322: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` 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:322: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element 
    

    [[Message can be missed after unblock: https://github.com//issues/16873]]

    6. test_community_edit_delete_message_when_offline, id: 704615

    Test setup failed: critical/chats/test_public_chat_browsing.py:322: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` 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:322: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` 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 Text by xpath: //android.view.ViewGroup[@content-desc='chat-item']//android.widget.TextView[contains(@text,'https://status.app/c/')]
    Device 2: Wait for element Button for max 120s and click when it is available

    Test setup failed: critical/chats/test_public_chat_browsing.py:322: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` 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:322: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` 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:322: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` 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:322: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:435: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element
    



    Expected to fail tests (2)

    Click to expand

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_offline_pn, id: 702808

    Device 3: Looking for a message by text: message from old member
    Device 3: Looking for a message by text: message from new member

    critical/chats/test_group_chat.py:324: in test_group_chat_offline_pn
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Messages PN was not fetched from offline 
    

    [[Data delivery issue]]

    Device sessions

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

    Passed tests (28)

    Click to expand

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    Device sessions

    2. test_group_chat_mute_chat, id: 703495
    Device sessions

    3. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    4. test_group_chat_reactions, id: 703202
    Device sessions

    5. test_group_chat_join_send_text_messages_push, id: 702807
    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 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 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 TestDeepLinksOneDevice:

    1. test_links_open_universal_links_from_chat, id: 704613
    Device sessions

    2. test_links_deep_links, id: 702775
    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 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

    Comment on lines +25 to +28
    (rf/dispatch [:wallet/clean-scanned-address])
    (rf/dispatch [:wallet/clean-local-suggestions])
    (rf/dispatch [:wallet/clean-send-address])
    (rf/dispatch [:wallet/select-address-tab nil])
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    Maybe we can create a single event and use the :fx key

    @VolodLytvynenko
    Copy link
    Contributor

    Hey @briansztamfater , I still haven't received the Goerli collectibles in my account. Since we don't have a reliable way to get collectibles on the Goerli testnet for now, I suggest merging both PRs: PR #18481 and PR #18473. We can retest the collectibles after implementing Issue #18510 or Issue #18507, where the collectibles use a more stable network to be send/received. Thank you for your work!

    Signed-off-by: Brian Sztamfater <brian@status.im>
    @briansztamfater briansztamfater force-pushed the feat/send-collectible-events-4 branch from d655588 to 4cc796a Compare January 16, 2024 14:32
    @briansztamfater briansztamfater merged commit ac07109 into develop Jan 16, 2024
    6 checks passed
    @briansztamfater briansztamfater deleted the feat/send-collectible-events-4 branch January 16, 2024 14:48
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Archived in project
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    Show collectible information in Transaction Confirmation page
    8 participants