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

Wallet: Buy Tokens drawer #17654

Merged
merged 5 commits into from
Oct 18, 2023
Merged

Wallet: Buy Tokens drawer #17654

merged 5 commits into from
Oct 18, 2023

Conversation

OmarBasem
Copy link
Contributor

@OmarBasem OmarBasem commented Oct 16, 2023

fixes: #17644

This PR implements "Buy tokens" drawer.

Designs

Demo:

RPReplay-Final1697514385.MP4

@OmarBasem OmarBasem changed the title [WIP] Wallet: buy drawer [WIP] Wallet: Buy Tokens drawer Oct 16, 2023
@status-im-auto
Copy link
Member

status-im-auto commented Oct 16, 2023

Jenkins Builds

Click to see older builds (18)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 9b05708 #1 2023-10-16 14:48:13 ~6 min android 🤖apk 📲
✔️ 9b05708 #1 2023-10-16 14:48:28 ~6 min ios 📱ipa 📲
✔️ 9b05708 #1 2023-10-16 14:50:30 ~8 min android-e2e 🤖apk 📲
✔️ 9b05708 #1 2023-10-16 14:51:36 ~9 min tests 📄log
✔️ 78bc185 #3 2023-10-17 04:03:32 ~5 min android 🤖apk 📲
✔️ 78bc185 #3 2023-10-17 04:03:52 ~6 min android-e2e 🤖apk 📲
✔️ 78bc185 #3 2023-10-17 04:10:29 ~12 min ios 📱ipa 📲
98d3710 #4 2023-10-18 04:27:58 ~32 sec android-e2e 📄log
98d3710 #4 2023-10-18 04:28:01 ~29 sec ios 📄log
98d3710 #4 2023-10-18 04:28:02 ~32 sec android 📄log
98d3710 #4 2023-10-18 04:29:12 ~1 min tests 📄log
98d3710 #5 2023-10-18 06:52:57 ~29 sec ios 📄log
98d3710 #5 2023-10-18 06:53:03 ~30 sec android-e2e 📄log
98d3710 #5 2023-10-18 06:53:03 ~31 sec android 📄log
✔️ a440486 #6 2023-10-18 06:59:00 ~5 min android-e2e 🤖apk 📲
✔️ a440486 #6 2023-10-18 07:00:00 ~6 min ios 📱ipa 📲
✔️ a440486 #6 2023-10-18 07:03:02 ~9 min android 🤖apk 📲
✔️ a440486 #6 2023-10-18 07:03:17 ~9 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ d639f18 #7 2023-10-18 11:00:29 ~5 min android-e2e 🤖apk 📲
✔️ d639f18 #7 2023-10-18 11:00:49 ~6 min android 🤖apk 📲
✔️ d639f18 #7 2023-10-18 11:05:04 ~10 min ios 📱ipa 📲
✔️ d639f18 #7 2023-10-18 11:05:30 ~10 min tests 📄log
✔️ 5cf8711 #8 2023-10-18 11:13:54 ~7 min android-e2e 🤖apk 📲
✔️ 5cf8711 #8 2023-10-18 11:14:01 ~7 min android 🤖apk 📲
✔️ 5cf8711 #8 2023-10-18 11:15:24 ~8 min tests 📄log
✔️ 5cf8711 #8 2023-10-18 11:18:55 ~12 min ios 📱ipa 📲

@OmarBasem OmarBasem changed the title [WIP] Wallet: Buy Tokens drawer Wallet: Buy Tokens drawer Oct 17, 2023
@OmarBasem OmarBasem marked this pull request as ready for review October 17, 2023 03:51
[icons/icon icon
{:size icon-size
:color icon-color}]]))
(if (= (type icon) Keyword)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can use keyword?

(keyword? :x)
;;=> true
(keyword? true)
;;=> false

Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps we can be even stricter and check for icon keywords, i.e :i/* 🤔

Copy link
Contributor Author

@OmarBasem OmarBasem Oct 17, 2023

Choose a reason for hiding this comment

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

@J-Son89 And what if it is not an icon keyword? I am basically checking if it's a keyword to return an icon, otherwise return an image

Copy link
Contributor

Choose a reason for hiding this comment

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

🤷‍♂️ yeah probably not so much value in it. Better to have that checked by some other mechanism that will be less destructive :)

:color icon-color}]]
[rn/image
{:source icon
:style {:width 32 :height 32}}])))
Copy link
Contributor

Choose a reason for hiding this comment

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

icon has prop :size, can we use this instead?

:height "100%"
:justify-content :flex-start})
{:margin-horizontal 12
:flex 1
Copy link
Contributor

Choose a reason for hiding this comment

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

can you give a quick check of other uses of this component to ensure it's not breaking its uses 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

checked it, all fine 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

🙌

@@ -91,7 +91,7 @@
[{:keys [action action-props blur? theme]}]
[rn/view {:style {:margin-left 12}}
(case action
:arrow [icon/icon :i/chevron-right (style/color blur? theme)]
:arrow [icon/icon (or (:icon action-props) :i/chevron-right) (style/color blur? theme)]
Copy link
Contributor

Choose a reason for hiding this comment

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

removing this default might break other uses? perhaps you have to set it as a default value here?

Copy link
Contributor Author

@OmarBasem OmarBasem Oct 17, 2023

Choose a reason for hiding this comment

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

I am not removing anything, I am adding a dynamic icon or a default :)

Copy link
Contributor

Choose a reason for hiding this comment

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

aha! nice :)

:moonpay (js/require "../resources/images/services/Moonpay.png")
:ramp (js/require "../resources/images/services/Ramp.png")})

(defn get-service-image
Copy link
Contributor

@J-Son89 J-Son89 Oct 17, 2023

Choose a reason for hiding this comment

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

resources/get-service is probably fine ( imo 🙂)

@@ -201,3 +201,41 @@
:name "My savings"
:address "0x43c...98d"
:networks [{:name :ethereum :short :eth}]}])

(def buy-tokens-list
[{:title "Ramp"
Copy link
Contributor

Choose a reason for hiding this comment

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

curious where do we actually get this info from?
Is it a predefined list or something we should get from status go? 🤔

Copy link
Contributor Author

@OmarBasem OmarBasem Oct 17, 2023

Choose a reason for hiding this comment

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

It's from the designs

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, I get that. I am wondering if this is a finalized list. If so we can move it out of temp folder.
Additionally if this data is available from status-go then I can create a follow up issue for someone to get this data from the correct point.
Can you check with design/desktop of where the source of this data is?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@J-Son89 the data is stored in status-go. Created an issue #17663

Copy link
Contributor

Choose a reason for hiding this comment

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

awesome, thanks @OmarBasem :D

@status-im-auto
Copy link
Member

86% of end-end tests have passed

Total executed tests: 43
Failed tests: 6
Passed tests: 37
IDs of failed tests: 702732,703495,702786,702846,702731,702808 

Failed tests (6)

Click to expand
  • Rerun failed tests

  • Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    2. test_group_chat_mute_chat, id: 703495

    Device 2: Click until ChatMessageInput by accessibility id: chat-message-input will be presented
    Device 2: Looking for a message by text: Chat is unmuted now

    critical/chats/test_group_chat.py:473: in test_group_chat_mute_chat
        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))]))
     New messages counter near chats tab button is 1 after unmute, but should be 2
    



    Device sessions

    3. 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:309: 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_navigate_to_channel_when_relaunch, id: 702846

    ## Signed in successfully!
    Device 1: Looking for a message by text: some_text

    critical/chats/test_public_chat_browsing.py:81: in test_community_navigate_to_channel_when_relaunch
        self.drivers[0].fail("Not navigated to channel view after reopening app")
    base_test_case.py:179: in fail
        pytest.fail('Device %s: %s' % (self.number, text))
     Device 1: Not navigated to channel view after reopening app
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_mentions_push_notification, id: 702786

    Device 2: Getting PN by 'user_2'
    Device 2: Looking for a message by text: user_2

    critical/chats/test_public_chat_browsing.py:874: in test_community_mentions_push_notification
        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))]))
     Can not edit a message with a mention
    



    Device sessions

    Passed tests (37)

    Click to expand

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    2. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    2. test_group_chat_reactions, id: 703202
    Device sessions

    3. test_group_chat_join_send_text_messages_push, id: 702807
    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 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 TestActivityMultipleDevicePRTwo:

    1. test_activity_center_mentions, id: 702957
    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958
    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 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_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_discovery, id: 703503
    Device sessions

    4. test_community_undo_delete_message, id: 702869
    Device sessions

    5. test_community_mute_community_and_channel, id: 703382
    Device sessions

    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_message_delete, id: 702839
    Device sessions

    7. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    8. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    9. test_community_message_edit, id: 702843
    Device sessions

    10. test_community_unread_messages_badge, id: 702841
    Device sessions

    Copy link

    @Francesca-G Francesca-G left a comment

    Choose a reason for hiding this comment

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

    Looks good ✨

    @OmarBasem OmarBasem merged commit f19ec2a into develop Oct 18, 2023
    2 checks passed
    @OmarBasem OmarBasem deleted the wallet/buy-tokens branch October 18, 2023 11:24
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    Archived in project
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    Wallet: Buy token drawer
    5 participants