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

Show ENS name only when confirmed #10422

Merged
merged 1 commit into from
Jun 4, 2020

Conversation

jrainville
Copy link
Member

Summary

Fixes #9912

The problem was that the ENS name was added to the list straight when the TX was sent, but the TX could then error and you'd have no idea, plus the name would still display.

Instead, we register the name in a list with the TX hash and watch for changes in transactions, when the TX completes (error or success), we show it in the ENS page.

The look of it is not super pretty, I did with what I know, but feel free to tell me how to improve the look and the code style.

In progress:
image

Success:
image

Review notes

One thing that needs to be improved, and I don't know how, is that the state is only updated when we go on the page itself.

Also, I don't think it's related to my PR, but sometimes, the address that is gotten from :multiaccount/current-account is not correct and it is not even part of my mulriaccount. I think it's also what causes the "unknown address" issue when sending a TX.

Platforms

I only tested in the Android Simulator and in Ropsten.

Areas that maybe impacted

The profile is impacted. When registering the name, you need to go back to the ENS page (or wait on it) for the name on the profile to finally appear.

Steps to test

Register a new ENS name

status: ready

@jrainville jrainville requested a review from a team as a code owner April 23, 2020 17:56
@status-github-bot
Copy link

Pull Request Checklist

  • Docs: Updated the documentation, if affected
  • Docs: Added or updated inline comments explaining intention of the code
  • Tests: Ensured that all new UI elements have been assigned accessibility IDs
  • Tests: Signaled need for E2E tests with label, if applicable
  • Tests: Briefly described what was tested and what platforms were used
  • UI: In case of UI changes, ensured that UI matches Figma
  • UI: In case of UI changes, requested review from a Core UI designer
  • UI: In case of UI changes, included screenshots of implementation

@status-github-bot status-github-bot bot added this to REVIEW in Pipeline for QA Apr 23, 2020
@jrainville jrainville changed the title Fix/show ens name when confirmed Show ENS name only when confirmed Apr 23, 2020
@status-im-auto
Copy link
Member

status-im-auto commented Apr 23, 2020

Jenkins Builds

Click to see older builds (25)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ e7bb352 #1 2020-04-23 18:07:29 ~10 min ios 📦ipa 📲
✔️ e7bb352 #1 2020-04-23 18:11:46 ~15 min android-e2e 📦apk 📲
✔️ e7bb352 #1 2020-04-23 18:11:50 ~15 min android 📦apk 📲
✔️ 4445c70 #2 2020-04-23 20:44:05 ~9 min ios 📦ipa 📲
✔️ 4445c70 #2 2020-04-23 20:49:06 ~14 min android-e2e 📦apk 📲
✔️ 4445c70 #2 2020-04-23 20:49:06 ~14 min android 📦apk 📲
d37e48e #3 2020-04-24 19:17:36 ~8 min android-e2e 📄log
d37e48e #3 2020-04-24 19:18:39 ~9 min ios 📄log
d37e48e #3 2020-04-24 19:20:18 ~11 min android 📄log
ffb6523 #4 2020-05-07 16:11:59 ~2 min android-e2e 📄log
ffb6523 #4 2020-05-07 16:12:10 ~2 min ios 📄log
ffb6523 #4 2020-05-07 16:13:10 ~3 min android 📄log
7c15a43 #5 2020-05-20 18:03:07 ~2 min ios 📄log
7c15a43 #5 2020-05-20 18:18:17 ~17 min android-e2e 📄log
7c15a43 #5 2020-05-20 18:18:35 ~17 min android 📄log
d03486b #6 2020-05-20 20:35:48 ~2 min ios 📄log
d03486b #6 2020-05-20 20:49:53 ~16 min android-e2e 📄log
d03486b #6 2020-05-20 20:49:57 ~16 min android 📄log
✔️ 9e8c4ef #7 2020-05-21 14:01:56 ~8 min android 📦apk 📲
✔️ 9e8c4ef #7 2020-05-21 14:07:25 ~13 min ios 📦ipa 📲
✔️ 9e8c4ef #7 2020-05-21 14:10:21 ~16 min android-e2e 📦apk 📲
✔️ c1dd922 #8 2020-05-22 14:43:34 ~8 min android 📦apk 📲
✔️ c1dd922 #8 2020-05-22 14:49:13 ~13 min ios 📦ipa 📲
✔️ c1dd922 #8 2020-05-22 14:55:20 ~19 min android-e2e 📦apk 📲
c1dd922 #9 2020-06-01 09:28:26 ~14 min ios 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 7eb2245 #10 2020-06-02 19:33:56 ~14 min ios 📦ipa 📲
✔️ 7eb2245 #9 2020-06-02 19:36:34 ~17 min android-e2e 📦apk 📲
✔️ 7eb2245 #9 2020-06-02 19:36:43 ~17 min android 📦apk 📲
✔️ 08ff2ed #10 2020-06-04 11:06:13 ~15 min android 📦apk 📲
✔️ 08ff2ed #10 2020-06-04 11:06:14 ~15 min android-e2e 📦apk 📲

Copy link
Member

@cammellos cammellos 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!
There's a bit to change I think, the view with doseq and dispatches probably we want to refactor, maybe we can go through it and find a way to move the side effects outside the view?

src/status_im/ens/core.cljs Outdated Show resolved Hide resolved
src/status_im/ens/core.cljs Outdated Show resolved Hide resolved
src/status_im/ui/screens/ens/views.cljs Outdated Show resolved Hide resolved
@jrainville
Copy link
Member Author

I fixed and updated. Thanks @cammellos and @flexsurfer

(when (= hash transaction-hash)
; TODO Return from the loop once we find a match
(when (= transaction-success true)
(re-frame/dispatch [:update-ens-tx-state :success username custom-domain? hash])
Copy link
Member

Choose a reason for hiding this comment

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

here are two things, events handlers MUST be pure, re-frame/dispatch is not pure, so you should use :dispatch fx, but we have internal rule to do not use :dispath , so you should use fx/merge here and instead re-frame/dispatch use (update-ens-tx-state cofx ...)

Copy link
Member

Choose a reason for hiding this comment

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

We are getting there, nice work! This is not the easiest of the tasks to start with :)

So, now we basically have an effectful handler (btw any time you see doseq in clojure you know that is used for side effects).

We want to turn this into a pure function, as per what Mr Surfer said.

The way we do this in re-frame is instead of actually run the side-effects in the handler (i.e (re-frame/dispatch []), we return a map with the side effects to run.

So for example if you want to make an HTTP request, you would return from the event-handler some like:

{:db {....} :make-http-request [:param]}

And then register an handler:

(re-frame/reg-fx :make-http-request
  (fn [params] ...))

https://github.com/day8/re-frame/blob/master/docs/Effects.md

In this case you are running side-effects only in order to dispatch other events, and run their event handlers.
As a general rule, we avoid having having event-handlers dispatching if they don't have to, and we instead accumulate the results of other event-handlers. To give you an example:

Say you have:

(fx/defn handle-a
  {:events [::event-a]}
  [cofx]
  (do-stuff-a))

and

(fx/defn handle-b
 {:events [::event-b]}
  [cofx]
 (do-stuff-b))

Which reacts to::event-a and ::event-b.

Then you have a new event ::event-c which needs to run the same logic as both ::event-a and ::event-b.

One way you could do this (and this is what we did before) is to have something like this:

(fx/defn handle-c
  {:events [::event-c]}
 [cofx]
   {:db (modify-db-for-c cofx)
     :dispatch-n [[::event-a] [::event-b]]})

So essentially the handler of ::event-c is further dispatching two events, similarly to the function you have above (the difference is that here is a pure function, and we run the side-effects in an handler which is provided by re-frame).

Eventually we moved to a different pattern, instead of further dispatching, we call the handlers directly and cumulate the changes, so we have something like:

(fx/defn handle-c
  {:events [::event-c]}
 [cofx]
  (fx/merge cofx
                  {:db (modify-db-for-c cofx)
                  (handle-a)
                  (handle-b)))

Which is equivalent (ish) in terms of code. This has some benefits, is more explict, easier to test, easier to follow the logic, and some drawbacks, handlers take longer to run (so perfomance might be an issue, as they don't yeild control for rendering), they couple logic more heavily and adds complexity in accumlating them (fx/merge is our own macro to merge effects).
Regadless, most time for now we use this strategy.

So in your case, I would start by pulling all the objects you are interested in:
instead of:

 (let [registrations (get db :ens/registrations)]
    (doseq [[hash {:keys [state username custom-domain?]}] registrations]
      (when (or (= state :dismissed) (= state :submitted))

you can filter them, and already get those that match the transaction-hash in transfers:

 (let [set-of-transactions-hash (reduce (fn [acc {:keys [hash]}] (conj acc hash)) #{} transfers) 
         registrations (filter #(This function should match against the set, submitted and dismissed) (get db :ens/registrations)]

Which should give the "actionable" transactions (i.e those that match transfers and are dismissed or submitted.

The it's the tricky bit, you want to comulate the fxs.
How we do this is to use the form:

(apply fx/merge cofx [vector of fxs])

apply in clojure works similarly to apply in javascripts, minus the binding as that's not a thing in clojure, but they are effectively the same.

so what you want to do now, is to have a function that handles a single transaction and instead of dispatching calls the right handler:

(fx/defn whatever [cofx transaction] ;; This is an actionable transaction
  (cond 
     (:transaction-success transactions) ;; Is this two conditions mutually exclusive or a transaction (:transaction-success transactions) can be true an :failed ? 
     (fx/merge cofx (ens/update-ens-transaction-state..) (ens/save-username))
     (= :failed (:type transaction)
          (ens/update-ens-transacation-state ...))))

And finally you can comulate those and apply them, so roughly your code woudl be something like:

(let [set-of-transactions-hash (build-a-set-of-transactions-for-fast-loopkup) 
         registrations (filter-only-those-you-are-interested-in)
         fxs (map wathever registrations)]
        (apply fx/merge cofx fxs))

And that should do the tricky, there are other issues that might crop up, depending on how the code is structured. It would also be useful to add a few tests for this function, as it would be pure so you can easily make sure what you get in the db is what you expect.

This is very tricky stuff actually, very brave choice to start with! and sorry if I am too verbose or there's stuff you already know, let me know if you have any question or something does not make sense.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah i couldn't do it better than Mr. Cammellos, thanks

Copy link
Member Author

Choose a reason for hiding this comment

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

@cammellos WOW! What a great explanation. Don't worry about being too verbose everything you said there is useful to me.

Also, it's not exactly my first issue tackled in react-status, but it's definitely the first that is that big haha.

Thanks again. I'm gonna fix it up!

Copy link
Member

@flexsurfer flexsurfer left a comment

Choose a reason for hiding this comment

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

events

@rachelhamlin
Copy link
Contributor

Awesome job @jrainville! This is a really important fix.

@jrainville
Copy link
Member Author

FYI, I just rebased on top of develop, but I wasn't able to test the changes yet, since my testing environment had to be reinstalled.

@errorists
Copy link
Contributor

@jrainville cool! regarding the UI, you can take a browse through these designs here, the pending state for a name is indicated by changing the subtitle prop of the list item to say 'Transaction pending…'

Screenshot 2020-05-08 at 09 44 38

adjacent there you'll find all the states necessary

@churik
Copy link
Member

churik commented May 19, 2020

@jrainville can you please rebase it one more time?
@cammellos @flexsurfer can you please re-review changes?

@jrainville jrainville force-pushed the fix/show-ens-name-when-confirmed branch from ffb6523 to 7c15a43 Compare May 20, 2020 18:00
@jrainville
Copy link
Member Author

Rebased.

Should I do the design changes as @errorists commented in this PR or another one?

@hesterbruikman
Copy link
Contributor

I'd say if you can manage the design changes by Friday, please include it in this PR, else let me know and I'll create a separate issue with your name on it;)

@jrainville
Copy link
Member Author

@flexsurfer fixed in c1dd922
I'll squash once I have your approval

@flexsurfer flexsurfer moved this from REVIEW to E2E Tests in Pipeline for QA May 28, 2020
@status-im-auto
Copy link
Member

98% of end-end tests have passed

Total executed tests: 95
Failed tests: 2
Passed tests: 93

Failed tests (2)

Click to expand
1. test_can_add_existing_ens

Device 1: Looking for an element by text part: 'Username added'
Device 1: Looking for an element by text: 'Ok, got it'

Device 1: 'BaseButton' is not found on the screen

Device sessions

2. test_ens_in_public_and_1_1_chats

Device 1: Tap on EnsCheckName
Device 1: Looking for an element by text: 'Ok, got it'

Device 1: 'BaseButton' is not found on the screen

Device sessions

Passed tests (93)

Click to expand
1. test_decline_transactions_in_1_1_chat
Device sessions

2. test_delete_chats_via_delete_button
Device sessions

3. test_can_see_all_transactions_in_history
Device sessions

4. test_install_pack_and_send_sticker
Device sessions

5. test_login_with_new_account
Device sessions

6. test_timestamp_in_chats
Device sessions

7. test_password_in_logcat_sign_in
Device sessions

8. test_logcat_recovering_account
Device sessions

9. test_public_chat_clear_history
Device sessions

10. test_need_help_section
Device sessions

11. test_send_and_open_links
Device sessions

12. test_mobile_data_usage_popup_stop_syncing
Device sessions

13. test_mobile_data_usage_settings
Device sessions

14. test_create_new_group_chat
Device sessions

15. test_sign_typed_message (TestRail link is not found)
Device sessions

16. test_user_can_switch_network
Device sessions

17. test_mobile_data_usage_popup_continue_syncing
Device sessions

18. test_home_view
Device sessions

19. test_open_google_com_via_open_dapp
Device sessions

20. test_share_contact_code_and_wallet_address
Device sessions

21. test_connection_is_secure
Device sessions

22. test_add_to_contacts
Device sessions

23. test_add_account_to_multiaccount_instance_private_key
Device sessions

24. test_refresh_button_browsing_app_webview
Device sessions

25. test_keycard_send_two_transactions_one_after_another_in_dapp
Device sessions

26. test_transaction_wrong_password_wallet
Device sessions

27. test_public_chat_messaging
Device sessions

28. test_unread_messages_counter_public_chat
Device sessions

29. test_keycard_send_eth_from_wallet_to_address
Device sessions

30. test_keycard_fetching_balance_after_offline
Device sessions

31. test_keycard_send_transaction_from_daap
Device sessions

32. test_text_message_1_1_chat
Device sessions

33. test_can_use_purchased_stickers_on_recovered_account
Device sessions

34. test_open_transaction_on_etherscan
Device sessions

35. test_onboarding_screen_when_requesting_tokens_for_recovered_account
Device sessions

36. test_contact_profile_view
Device sessions

37. test_offline_add_new_group_chat_member
Device sessions

38. test_logcat_backup_recovery_phrase
Device sessions

39. test_start_chat_with_ens
Device sessions

40. test_add_and_remove_contact_from_public_chat
Device sessions

41. test_add_account_to_multiaccount_instance_seed_phrase
Device sessions

42. test_open_blocked_site
Device sessions

43. test_open_chat_by_pasting_public_key
Device sessions

44. test_pair_devices_sync_one_to_one_contacts_public_chat
Device sessions

45. test_keycard_sign_message_from_daap
Device sessions

46. test_send_non_english_message_to_newly_added_contact
Device sessions

47. test_ens_username_recipient
Device sessions

48. test_token_with_more_than_allowed_decimals
Device sessions

49. test_fetch_more_history_in_empty_chat
Device sessions

50. test_open_public_chat_using_deep_link
Device sessions

51. test_switch_users_and_add_new_account
Device sessions

52. test_add_account_to_multiaccount_instance_generate_new
Device sessions

53. test_copy_contact_code_and_wallet_address
Device sessions

54. test_send_transaction_from_daap
Device sessions

55. test_send_two_transactions_one_after_another_in_dapp
Device sessions

56. test_message_marked_as_sent_in_1_1_chat
Device sessions

57. test_add_new_keycard_account_and_login
Device sessions

58. test_long_press_delete_clear_all_dapps
Device sessions

59. test_copy_and_paste_messages
Device sessions

60. test_back_forward_buttons_browsing_website
Device sessions

61. test_password_in_logcat_creating_account
Device sessions

62. test_add_custom_token
Device sessions

63. test_sign_message_from_daap
Device sessions

64. test_dapps_permissions
Device sessions

65. test_request_public_key_status_test_daap
Device sessions

66. test_long_press_to_delete_chat
Device sessions

67. test_log_level_and_fleet
Device sessions

68. test_add_and_delete_watch_only_account_to_multiaccount_instance
Device sessions

69. test_recover_account_from_new_user_seedphrase (TestRail link is not found)
Device sessions

70. test_send_eth_in_1_1_chat
Device sessions

71. test_send_two_transactions_in_batch_in_dapp
Device sessions

72. test_block_user_from_public_chat
Device sessions

73. test_fetching_balance_after_offline
Device sessions

74. test_offline_status
Device sessions

75. test_wallet_set_up
Device sessions

76. test_manage_assets
Device sessions

77. test_offline_messaging_1_1_chat
Device sessions

78. test_account_recovery_with_uppercase_recovery_phrase
Device sessions

79. test_send_token_with_7_decimals
Device sessions

80. test_user_can_see_all_own_assets_after_account_recovering
Device sessions

81. test_pass_phrase_validation
Device sessions

82. test_keycard_can_see_all_transactions_in_history
Device sessions

83. test_keycard_send_two_transactions_in_batch_in_dapp
Device sessions

84. test_send_emoji
Device sessions

85. test_filters_from_daap
Device sessions

86. test_redirect_to_public_chat_tapping_tag_message
Device sessions

87. test_restore_account_from_mnemonic_to_keycard
Device sessions

88. test_send_eth_to_ens_in_chat
Device sessions

89. test_send_eth_from_wallet_to_address
Device sessions

90. test_request_and_receive_stt_in_1_1_chat_offline
Device sessions

91. test_messaging_in_different_networks
Device sessions

92. test_collectible_from_wallet_opens_in_browser_view
Device sessions

93. test_insufficient_funds_wallet_positive_balance
Device sessions

@status-im-auto
Copy link
Member

95% of end-end tests have passed

Total executed tests: 57
Failed tests: 3
Passed tests: 54

Failed tests (3)

Click to expand
1. test_timestamp_in_chats

Device 2: Tap 'Confirm' on native keyboard
Device 2: Wait for ChatMessageInput

The test with session id 35fe2a22be4c46998df4fbd7856897d8 has already finished, and can't receive further commands. For help, please check https://wiki.saucelabs.com/display/DOCS/Common+Error+Messages

Device sessions

2. test_can_add_existing_ens

Device 1: Looking for an element by text part: 'Username added'
Device 1: Looking for an element by text: 'Ok, got it'

Device 1: 'BaseButton' is not found on the screen

Device sessions

3. test_ens_in_public_and_1_1_chats

Device 1: Tap on EnsCheckName
Device 1: Looking for an element by text: 'Ok, got it'

Device 1: 'BaseButton' is not found on the screen

Device sessions

Passed tests (54)

Click to expand
1. test_decline_transactions_in_1_1_chat
Device sessions

2. test_delete_chats_via_delete_button
Device sessions

3. test_login_with_new_account
Device sessions

4. test_password_in_logcat_sign_in
Device sessions

5. test_logcat_recovering_account
Device sessions

6. test_need_help_section
Device sessions

7. test_mobile_data_usage_popup_stop_syncing
Device sessions

8. test_mobile_data_usage_settings
Device sessions

9. test_create_new_group_chat
Device sessions

10. test_user_can_switch_network
Device sessions

11. test_mobile_data_usage_popup_continue_syncing
Device sessions

12. test_home_view
Device sessions

13. test_share_contact_code_and_wallet_address
Device sessions

14. test_add_account_to_multiaccount_instance_private_key
Device sessions

15. test_text_message_1_1_chat
Device sessions

16. test_open_transaction_on_etherscan
Device sessions

17. test_contact_profile_view
Device sessions

18. test_offline_add_new_group_chat_member
Device sessions

19. test_logcat_backup_recovery_phrase
Device sessions

20. test_start_chat_with_ens
Device sessions

21. test_add_and_remove_contact_from_public_chat
Device sessions

22. test_add_account_to_multiaccount_instance_seed_phrase
Device sessions

23. test_open_chat_by_pasting_public_key
Device sessions

24. test_pair_devices_sync_one_to_one_contacts_public_chat
Device sessions

25. test_ens_username_recipient
Device sessions

26. test_fetch_more_history_in_empty_chat
Device sessions

27. test_switch_users_and_add_new_account
Device sessions

28. test_add_account_to_multiaccount_instance_generate_new
Device sessions

29. test_copy_contact_code_and_wallet_address
Device sessions

30. test_message_marked_as_sent_in_1_1_chat
Device sessions

31. test_add_new_keycard_account_and_login
Device sessions

32. test_long_press_delete_clear_all_dapps
Device sessions

33. test_copy_and_paste_messages
Device sessions

34. test_password_in_logcat_creating_account
Device sessions

35. test_add_custom_token
Device sessions

36. test_sign_message_from_daap
Device sessions

37. test_dapps_permissions
Device sessions

38. test_long_press_to_delete_chat
Device sessions

39. test_log_level_and_fleet
Device sessions

40. test_add_and_delete_watch_only_account_to_multiaccount_instance
Device sessions

41. test_recover_account_from_new_user_seedphrase (TestRail link is not found)
Device sessions

42. test_block_user_from_public_chat
Device sessions

43. test_offline_status
Device sessions

44. test_wallet_set_up
Device sessions

45. test_manage_assets
Device sessions

46. test_offline_messaging_1_1_chat
Device sessions

47. test_account_recovery_with_uppercase_recovery_phrase
Device sessions

48. test_user_can_see_all_own_assets_after_account_recovering
Device sessions

49. test_pass_phrase_validation
Device sessions

50. test_send_emoji
Device sessions

51. test_restore_account_from_mnemonic_to_keycard
Device sessions

52. test_send_eth_to_ens_in_chat
Device sessions

53. test_request_and_receive_stt_in_1_1_chat_offline
Device sessions

54. test_collectible_from_wallet_opens_in_browser_view
Device sessions

@status-im-auto
Copy link
Member

94% of end-end tests have passed

Total executed tests: 79
Failed tests: 5
Passed tests: 74

Failed tests (5)

Click to expand
1. test_send_and_open_links

Device 2: Looking for an element by text part: 'Messages'
Device 2: Looking for an element by text part: 'YouTube'

Invalid message: ERROR Internal Server Error

Device sessions

2. test_connection_is_secure

Device 1: Tap on URLEditBoxLockIcon
Device 1: Looking for full text: 'Connection is secure. Make sure you really trust this site before signing transactions or entering personal data.'

Device 1: 'BaseElement' is not found on the screen

Device sessions

3. test_can_add_existing_ens

Device 1: Looking for an element by text part: 'Username added'
Device 1: Looking for an element by text: 'Ok, got it'

Device 1: 'BaseButton' is not found on the screen

Device sessions

4. test_offline_add_new_group_chat_member

Device 3: Wait for OkButton
Device 3: Wait for ContinueButton

The test with session id 3d7a894d0dd647eaa35a63918c18ede4 has already finished, and can't receive further commands. For help, please check https://wiki.saucelabs.com/display/DOCS/Common+Error+Messages; also Unexpected Alert is shown: 'Your phone appe

Device sessions

5. test_ens_in_public_and_1_1_chats

Device 1: Tap on EnsCheckName
Device 1: Looking for an element by text: 'Ok, got it'

Device 1: 'BaseButton' is not found on the screen

Device sessions

Passed tests (74)

Click to expand
1. test_decline_transactions_in_1_1_chat
Device sessions

2. test_delete_chats_via_delete_button
Device sessions

3. test_install_pack_and_send_sticker
Device sessions

4. test_login_with_new_account
Device sessions

5. test_timestamp_in_chats
Device sessions

6. test_password_in_logcat_sign_in
Device sessions

7. test_logcat_recovering_account
Device sessions

8. test_public_chat_clear_history
Device sessions

9. test_need_help_section
Device sessions

10. test_mobile_data_usage_popup_stop_syncing
Device sessions

11. test_mobile_data_usage_settings
Device sessions

12. test_create_new_group_chat
Device sessions

13. test_user_can_switch_network
Device sessions

14. test_mobile_data_usage_popup_continue_syncing
Device sessions

15. test_home_view
Device sessions

16. test_open_google_com_via_open_dapp
Device sessions

17. test_share_contact_code_and_wallet_address
Device sessions

18. test_add_to_contacts
Device sessions

19. test_add_account_to_multiaccount_instance_private_key
Device sessions

20. test_refresh_button_browsing_app_webview
Device sessions

21. test_public_chat_messaging
Device sessions

22. test_unread_messages_counter_public_chat
Device sessions

23. test_keycard_send_eth_from_wallet_to_address
Device sessions

24. test_text_message_1_1_chat
Device sessions

25. test_can_use_purchased_stickers_on_recovered_account
Device sessions

26. test_open_transaction_on_etherscan
Device sessions

27. test_contact_profile_view
Device sessions

28. test_logcat_backup_recovery_phrase
Device sessions

29. test_start_chat_with_ens
Device sessions

30. test_add_and_remove_contact_from_public_chat
Device sessions

31. test_add_account_to_multiaccount_instance_seed_phrase
Device sessions

32. test_open_blocked_site
Device sessions

33. test_open_chat_by_pasting_public_key
Device sessions

34. test_pair_devices_sync_one_to_one_contacts_public_chat
Device sessions

35. test_send_non_english_message_to_newly_added_contact
Device sessions

36. test_ens_username_recipient
Device sessions

37. test_fetch_more_history_in_empty_chat
Device sessions

38. test_open_public_chat_using_deep_link
Device sessions

39. test_switch_users_and_add_new_account
Device sessions

40. test_add_account_to_multiaccount_instance_generate_new
Device sessions

41. test_copy_contact_code_and_wallet_address
Device sessions

42. test_send_transaction_from_daap
Device sessions

43. test_send_two_transactions_one_after_another_in_dapp
Device sessions

44. test_message_marked_as_sent_in_1_1_chat
Device sessions

45. test_add_new_keycard_account_and_login
Device sessions

46. test_copy_and_paste_messages
Device sessions

47. test_back_forward_buttons_browsing_website
Device sessions

48. test_password_in_logcat_creating_account
Device sessions

49. test_add_custom_token
Device sessions

50. test_sign_message_from_daap
Device sessions

51. test_dapps_permissions
Device sessions

52. test_request_public_key_status_test_daap
Device sessions

53. test_long_press_to_delete_chat
Device sessions

54. test_log_level_and_fleet
Device sessions

55. test_add_and_delete_watch_only_account_to_multiaccount_instance
Device sessions

56. test_recover_account_from_new_user_seedphrase (TestRail link is not found)
Device sessions

57. test_send_two_transactions_in_batch_in_dapp
Device sessions

58. test_block_user_from_public_chat
Device sessions

59. test_offline_status
Device sessions

60. test_wallet_set_up
Device sessions

61. test_manage_assets
Device sessions

62. test_offline_messaging_1_1_chat
Device sessions

63. test_account_recovery_with_uppercase_recovery_phrase
Device sessions

64. test_user_can_see_all_own_assets_after_account_recovering
Device sessions

65. test_pass_phrase_validation
Device sessions

66. test_keycard_can_see_all_transactions_in_history
Device sessions

67. test_keycard_send_two_transactions_in_batch_in_dapp
Device sessions

68. test_send_emoji
Device sessions

69. test_redirect_to_public_chat_tapping_tag_message
Device sessions

70. test_restore_account_from_mnemonic_to_keycard
Device sessions

71. test_send_eth_to_ens_in_chat
Device sessions

72. test_request_and_receive_stt_in_1_1_chat_offline
Device sessions

73. test_messaging_in_different_networks
Device sessions

74. test_collectible_from_wallet_opens_in_browser_view
Device sessions

@status-im-auto
Copy link
Member

98% of end-end tests have passed

Total executed tests: 95
Failed tests: 2
Passed tests: 93

Failed tests (2)

Click to expand
1. test_can_add_existing_ens

Device 1: Looking for an element by text part: 'Username added'
Device 1: Looking for an element by text: 'Ok, got it'

Device 1: 'BaseButton' is not found on the screen

Device sessions

2. test_ens_in_public_and_1_1_chats

Device 1: Tap on EnsCheckName
Device 1: Looking for an element by text: 'Ok, got it'

Device 1: 'BaseButton' is not found on the screen

Device sessions

Passed tests (93)

Click to expand
1. test_decline_transactions_in_1_1_chat
Device sessions

2. test_delete_chats_via_delete_button
Device sessions

3. test_can_see_all_transactions_in_history
Device sessions

4. test_install_pack_and_send_sticker
Device sessions

5. test_login_with_new_account
Device sessions

6. test_timestamp_in_chats
Device sessions

7. test_password_in_logcat_sign_in
Device sessions

8. test_logcat_recovering_account
Device sessions

9. test_public_chat_clear_history
Device sessions

10. test_need_help_section
Device sessions

11. test_send_and_open_links
Device sessions

12. test_mobile_data_usage_popup_stop_syncing
Device sessions

13. test_mobile_data_usage_settings
Device sessions

14. test_create_new_group_chat
Device sessions

15. test_sign_typed_message (TestRail link is not found)
Device sessions

16. test_user_can_switch_network
Device sessions

17. test_mobile_data_usage_popup_continue_syncing
Device sessions

18. test_home_view
Device sessions

19. test_open_google_com_via_open_dapp
Device sessions

20. test_share_contact_code_and_wallet_address
Device sessions

21. test_connection_is_secure
Device sessions

22. test_add_to_contacts
Device sessions

23. test_add_account_to_multiaccount_instance_private_key
Device sessions

24. test_refresh_button_browsing_app_webview
Device sessions

25. test_keycard_send_two_transactions_one_after_another_in_dapp
Device sessions

26. test_transaction_wrong_password_wallet
Device sessions

27. test_public_chat_messaging
Device sessions

28. test_unread_messages_counter_public_chat
Device sessions

29. test_keycard_send_eth_from_wallet_to_address
Device sessions

30. test_keycard_fetching_balance_after_offline
Device sessions

31. test_keycard_send_transaction_from_daap
Device sessions

32. test_text_message_1_1_chat
Device sessions

33. test_can_use_purchased_stickers_on_recovered_account
Device sessions

34. test_open_transaction_on_etherscan
Device sessions

35. test_onboarding_screen_when_requesting_tokens_for_recovered_account
Device sessions

36. test_contact_profile_view
Device sessions

37. test_offline_add_new_group_chat_member
Device sessions

38. test_logcat_backup_recovery_phrase
Device sessions

39. test_start_chat_with_ens
Device sessions

40. test_add_and_remove_contact_from_public_chat
Device sessions

41. test_add_account_to_multiaccount_instance_seed_phrase
Device sessions

42. test_open_blocked_site
Device sessions

43. test_open_chat_by_pasting_public_key
Device sessions

44. test_pair_devices_sync_one_to_one_contacts_public_chat
Device sessions

45. test_keycard_sign_message_from_daap
Device sessions

46. test_send_non_english_message_to_newly_added_contact
Device sessions

47. test_ens_username_recipient
Device sessions

48. test_token_with_more_than_allowed_decimals
Device sessions

49. test_fetch_more_history_in_empty_chat
Device sessions

50. test_open_public_chat_using_deep_link
Device sessions

51. test_switch_users_and_add_new_account
Device sessions

52. test_add_account_to_multiaccount_instance_generate_new
Device sessions

53. test_copy_contact_code_and_wallet_address
Device sessions

54. test_send_transaction_from_daap
Device sessions

55. test_send_two_transactions_one_after_another_in_dapp
Device sessions

56. test_message_marked_as_sent_in_1_1_chat
Device sessions

57. test_add_new_keycard_account_and_login
Device sessions

58. test_long_press_delete_clear_all_dapps
Device sessions

59. test_copy_and_paste_messages
Device sessions

60. test_back_forward_buttons_browsing_website
Device sessions

61. test_password_in_logcat_creating_account
Device sessions

62. test_add_custom_token
Device sessions

63. test_sign_message_from_daap
Device sessions

64. test_dapps_permissions
Device sessions

65. test_request_public_key_status_test_daap
Device sessions

66. test_long_press_to_delete_chat
Device sessions

67. test_log_level_and_fleet
Device sessions

68. test_add_and_delete_watch_only_account_to_multiaccount_instance
Device sessions

69. test_recover_account_from_new_user_seedphrase (TestRail link is not found)
Device sessions

70. test_send_eth_in_1_1_chat
Device sessions

71. test_send_two_transactions_in_batch_in_dapp
Device sessions

72. test_block_user_from_public_chat
Device sessions

73. test_fetching_balance_after_offline
Device sessions

74. test_offline_status
Device sessions

75. test_wallet_set_up
Device sessions

76. test_manage_assets
Device sessions

77. test_offline_messaging_1_1_chat
Device sessions

78. test_account_recovery_with_uppercase_recovery_phrase
Device sessions

79. test_send_token_with_7_decimals
Device sessions

80. test_user_can_see_all_own_assets_after_account_recovering
Device sessions

81. test_pass_phrase_validation
Device sessions

82. test_keycard_can_see_all_transactions_in_history
Device sessions

83. test_keycard_send_two_transactions_in_batch_in_dapp
Device sessions

84. test_send_emoji
Device sessions

85. test_filters_from_daap
Device sessions

86. test_redirect_to_public_chat_tapping_tag_message
Device sessions

87. test_restore_account_from_mnemonic_to_keycard
Device sessions

88. test_send_eth_to_ens_in_chat
Device sessions

89. test_send_eth_from_wallet_to_address
Device sessions

90. test_request_and_receive_stt_in_1_1_chat_offline
Device sessions

91. test_messaging_in_different_networks
Device sessions

92. test_collectible_from_wallet_opens_in_browser_view
Device sessions

93. test_insufficient_funds_wallet_positive_balance
Device sessions

@Serhy Serhy moved this from E2E Tests to IN TESTING in Pipeline for QA Jun 1, 2020
@Serhy
Copy link
Contributor

Serhy commented Jun 1, 2020

@jrainville thanks for fix!
There is a regression appeared: on both iOS and Androids I can't assign existing name - nothing happens when I click -> (Next) button when trying to bind ENS name which already assigned to address:
It's all fine in latest nightly develop for the 1st of June

To reproduce:

  1. Open Status and recover the account with ENS name (e.g. you can use this one fashion quality know robust copy neck stand embody entry task orient suggest)
  2. From Profile tap ENS names -> Get Started
  3. Type statuse2e
  4. Tap -> blue button to proceed
    Actual result: Button displayed as active but nothing happens when I press it. No errors in logcat too.

ezgif com-video-to-gif

When I want to register new ENS then it works fine (and -> blue button is actionable in that case)

@Serhy Serhy moved this from IN TESTING to CONTRIBUTOR in Pipeline for QA Jun 1, 2020
@jrainville
Copy link
Member Author

@Serhy I just tested the latest develop and the bug happens there too. So I think the bug is in my PR only because I rebased on top of the regression.
My branch is based on top off c3d14f1, so I assume the regression happens there or before

@Serhy
Copy link
Contributor

Serhy commented Jun 2, 2020

@jrainville hmm, that's possible, yes. I was tested develop based on where it was all fine 9a11412 and just tested latest develop 9d76913 which is also looks good to me.

Could you rebase the very latest develop (and fix conflict) please?

@jrainville
Copy link
Member Author

@Serhy you were right, the issue was indeed in my PR. Somehow, while I tested develop, I probably didn't reset the app correctly.

Anyway, I rebased and fixed the issue. You can test again to confirm.

@Serhy Serhy moved this from CONTRIBUTOR to E2E Tests in Pipeline for QA Jun 3, 2020
@status-im-auto
Copy link
Member

99% of end-end tests have passed

Total executed tests: 95
Failed tests: 1
Passed tests: 94

Failed tests (1)

Click to expand
1. test_need_help_section

Device 1: Wait for AlwaysButton
Device 1: Looking for full text: 'Frequently Asked Questions'

Device 1: 'BaseElement' is not found on the screen

Device sessions

Passed tests (94)

Click to expand
1. test_add_account_to_multiaccount_instance_generate_new
Device sessions

2. test_send_eth_from_wallet_to_address
Device sessions

3. test_onboarding_screen_when_requesting_tokens_for_recovered_account
Device sessions

4. test_keycard_can_see_all_transactions_in_history
Device sessions

5. test_text_message_1_1_chat
Device sessions

6. test_offline_status
Device sessions

7. test_delete_chats_via_delete_button
Device sessions

8. test_add_and_delete_watch_only_account_to_multiaccount_instance
Device sessions

9. test_long_press_delete_clear_all_dapps
Device sessions

10. test_open_public_chat_using_deep_link
Device sessions

11. test_offline_add_new_group_chat_member
Device sessions

12. test_copy_contact_code_and_wallet_address
Device sessions

13. test_add_account_to_multiaccount_instance_private_key
Device sessions

14. test_mobile_data_usage_popup_continue_syncing
Device sessions

15. test_sign_typed_message (TestRail link is not found)
Device sessions

16. test_open_blocked_site
Device sessions

17. test_insufficient_funds_wallet_positive_balance
Device sessions

18. test_collectible_from_wallet_opens_in_browser_view
Device sessions

19. test_create_new_group_chat
Device sessions

20. test_messaging_in_different_networks
Device sessions

21. test_account_recovery_with_uppercase_recovery_phrase
Device sessions

22. test_send_token_with_7_decimals
Device sessions

23. test_password_in_logcat_creating_account
Device sessions

24. test_recover_account_from_new_user_seedphrase
Device sessions

25. test_block_user_from_public_chat
Device sessions

26. test_ens_username_recipient
Device sessions

27. test_ens_in_public_and_1_1_chats
Device sessions

28. test_connection_is_secure
Device sessions

29. test_send_transaction_from_daap
Device sessions

30. test_pair_devices_sync_one_to_one_contacts_public_chat
Device sessions

31. test_login_with_new_account
Device sessions

32. test_send_non_english_message_to_newly_added_contact
Device sessions

33. test_switch_users_and_add_new_account
Device sessions

34. test_mobile_data_usage_popup_stop_syncing
Device sessions

35. test_open_transaction_on_etherscan
Device sessions

36. test_keycard_send_eth_from_wallet_to_address
Device sessions

37. test_request_public_key_status_test_daap
Device sessions

38. test_password_in_logcat_sign_in
Device sessions

39. test_sign_message_from_daap
Device sessions

40. test_back_forward_buttons_browsing_website
Device sessions

41. test_offline_messaging_1_1_chat
Device sessions

42. test_redirect_to_public_chat_tapping_tag_message
Device sessions

43. test_keycard_send_two_transactions_one_after_another_in_dapp
Device sessions

44. test_add_and_remove_contact_from_public_chat
Device sessions

45. test_long_press_to_delete_chat
Device sessions

46. test_copy_and_paste_messages
Device sessions

47. test_log_level_and_fleet
Device sessions

48. test_unread_messages_counter_public_chat
Device sessions

49. test_user_can_see_all_own_assets_after_account_recovering
Device sessions

50. test_transaction_wrong_password_wallet
Device sessions

51. test_user_can_switch_network
Device sessions

52. test_message_marked_as_sent_in_1_1_chat
Device sessions

53. test_send_two_transactions_one_after_another_in_dapp
Device sessions

54. test_mobile_data_usage_settings
Device sessions

55. test_keycard_send_transaction_from_daap
Device sessions

56. test_add_to_contacts
Device sessions

57. test_fetch_more_history_in_empty_chat
Device sessions

58. test_install_pack_and_send_sticker
Device sessions

59. test_keycard_send_two_transactions_in_batch_in_dapp
Device sessions

60. test_keycard_sign_message_from_daap
Device sessions

61. test_contact_profile_view
Device sessions

62. test_manage_assets
Device sessions

63. test_send_two_transactions_in_batch_in_dapp
Device sessions

64. test_timestamp_in_chats
Device sessions

65. test_send_emoji
Device sessions

66. test_can_use_purchased_stickers_on_recovered_account
Device sessions

67. test_decline_transactions_in_1_1_chat
Device sessions

68. test_dapps_permissions
Device sessions

69. test_open_chat_by_pasting_public_key
Device sessions

70. test_send_eth_to_ens_in_chat
Device sessions

71. test_wallet_set_up
Device sessions

72. test_send_transaction_with_custom_token
Device sessions

73. test_home_view
Device sessions

74. test_can_add_existing_ens
Device sessions

75. test_logcat_backup_recovery_phrase
Device sessions

76. test_request_and_receive_stt_in_1_1_chat_offline
Device sessions

77. test_send_eth_in_1_1_chat
Device sessions

78. test_refresh_button_browsing_app_webview
Device sessions

79. test_public_chat_messaging
Device sessions

80. test_add_account_to_multiaccount_instance_seed_phrase
Device sessions

81. test_logcat_recovering_account
Device sessions

82. test_restore_account_from_mnemonic_to_keycard
Device sessions

83. test_add_new_keycard_account_and_login
Device sessions

84. test_open_google_com_via_open_dapp
Device sessions

85. test_pass_phrase_validation
Device sessions

86. test_send_and_open_links
Device sessions

87. test_share_contact_code_and_wallet_address
Device sessions

88. test_can_see_all_transactions_in_history
Device sessions

89. test_token_with_more_than_allowed_decimals
Device sessions

90. test_public_chat_clear_history
Device sessions

91. test_start_chat_with_ens
Device sessions

92. test_filters_from_daap
Device sessions

93. test_fetching_balance_after_offline
Device sessions

94. test_keycard_fetching_balance_after_offline
Device sessions

@Serhy
Copy link
Contributor

Serhy commented Jun 3, 2020

Looks good to me, @jrainville thanks! Tested on iOS13 and Android 9.
While transaction is pending no ENS assigned by default in chat and can't be selected from 'Primary username' list. Same after transaction fails.
Can assign existing ENS and can add new ENS as well.

@Serhy Serhy moved this from E2E Tests to IN TESTING in Pipeline for QA Jun 3, 2020
@Serhy Serhy moved this from IN TESTING to MERGE in Pipeline for QA Jun 3, 2020
@cammellos cammellos force-pushed the fix/show-ens-name-when-confirmed branch from 7eb2245 to 08ff2ed Compare June 4, 2020 10:50
fix: only save the ENS username when the TX is confirmed
feat: show when ens registration are in progress, done or errored
feat: implement new design for the ENS registration
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
@cammellos cammellos merged commit 08ff2ed into develop Jun 4, 2020
Pipeline for QA automation moved this from MERGE to DONE Jun 4, 2020
@cammellos cammellos deleted the fix/show-ens-name-when-confirmed branch June 4, 2020 10:51
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.

Do not show ENS name in profile unless Tx is confirmed
9 participants