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

[Fixes #8066] Added native ENS registration #8317

Merged
merged 1 commit into from
Jun 18, 2019
Merged

[Fixes #8066] Added native ENS registration #8317

merged 1 commit into from
Jun 18, 2019

Conversation

jeluard
Copy link
Contributor

@jeluard jeluard commented May 29, 2019

fixes #8066

Summary

Implement ENS registration according to latest Figma designs.

Note to testers Local names persistency is not part of this PR. Thus initial welcome screen is always the same even if you already registered some names using native registration.

Address and public key will be connected to names, and stateofus names can be be registered.

(superseed #8248)

Test

All screens and registration implemented
Names are persisted
Pixel perfect
Name removal is not part of this PR

status: READY

@jeluard jeluard requested review from antdanchenko, churik and a team as code owners May 29, 2019 16:54
@jeluard jeluard self-assigned this May 29, 2019
@status-github-bot
Copy link

Pull Request Checklist

  • Have you updated the documentation, if impacted (e.g. docs.status.im)?

@status-im-auto
Copy link
Member

status-im-auto commented May 29, 2019

Jenkins Builds

Click to see older builds (90)
Commit #️⃣ Finished (UTC) Duration Platform Result
ad97f02 #1 2019-05-29 17:00:05 ~5 min ios 📄 log
ad97f02 #1 2019-05-29 17:01:06 ~6 min macos 📄 log
ad97f02 #1 2019-05-29 17:01:29 ~7 min linux 📄 log
ad97f02 #1 2019-05-29 17:03:12 ~8 min android 📄 log
ad97f02 #1 2019-05-29 17:04:30 ~9 min windows 📄 log
ad97f02 #1 2019-05-29 17:06:28 ~12 min android-e2e 📄 log
52be7d8 #2 2019-06-03 07:15:56 ~4 min ios 📄 log
52be7d8 #2 2019-06-03 07:16:01 ~4 min linux 📄 log
52be7d8 #2 2019-06-03 07:16:12 ~4 min windows 📄 log
52be7d8 #2 2019-06-03 07:16:29 ~4 min macos 📄 log
52be7d8 #2 2019-06-03 07:19:49 ~8 min android 📄 log
52be7d8 #2 2019-06-03 07:20:42 ~9 min android-e2e 📄 log
4f98f72 #3 2019-06-03 07:47:09 ~3 min ios 📄 log
4f98f72 #3 2019-06-03 07:47:37 ~4 min linux 📄 log
4f98f72 #3 2019-06-03 07:47:52 ~4 min windows 📄 log
4f98f72 #3 2019-06-03 07:47:53 ~4 min macos 📄 log
4f98f72 #3 2019-06-03 07:50:41 ~7 min android-e2e 📄 log
4f98f72 #3 2019-06-03 07:52:23 ~9 min android 📄 log
✔️ 5979cae #5 2019-06-04 15:18:04 ~15 min android 📦 apk
✔️ 5979cae #5 2019-06-04 15:18:26 ~15 min android-e2e 📦 apk
✔️ 5979cae #5 2019-06-04 15:19:21 ~16 min ios 📦 ipa
✔️ 5979cae #5 2019-06-04 15:21:42 ~18 min windows 📦 exe
✔️ 5979cae #5 2019-06-04 15:21:51 ~18 min macos 📦 dmg
✔️ 5979cae #5 2019-06-04 15:22:30 ~19 min linux 📦 App
✔️ 436b36f #6 2019-06-05 13:04:31 ~14 min ios 📦 ipa
✔️ 436b36f #6 2019-06-05 13:05:35 ~15 min android 📦 apk
✔️ 436b36f #6 2019-06-05 13:08:52 ~19 min macos 📦 dmg
✔️ 436b36f #6 2019-06-05 13:10:34 ~20 min windows 📦 exe
✔️ 436b36f #6 2019-06-05 13:10:38 ~21 min android-e2e 📦 apk
✔️ 436b36f #6 2019-06-05 13:12:46 ~23 min linux 📦 App
cc58443 #7 2019-06-06 15:20:05 ~11 min linux 📄 log
cc58443 #7 2019-06-06 15:22:26 ~13 min ios 📄 log
cc58443 #7 2019-06-06 15:22:29 ~13 min android-e2e 📄 log
cc58443 #7 2019-06-06 15:22:40 ~13 min android 📄 log
cc58443 #7 2019-06-06 15:22:59 ~14 min windows 📄 log
cc58443 #7 2019-06-06 15:23:39 ~14 min macos 📄 log
22fae27 #8 2019-06-07 14:11:44 ~5 min ios 📄 log
22fae27 #8 2019-06-07 14:17:35 ~11 min linux 📄 log
22fae27 #8 2019-06-07 14:17:42 ~11 min windows 📄 log
22fae27 #8 2019-06-07 14:17:58 ~11 min android-e2e 📄 log
22fae27 #8 2019-06-07 14:18:20 ~11 min android 📄 log
22fae27 #8 2019-06-07 14:19:48 ~13 min macos 📄 log
✔️ d875598 #9 2019-06-07 15:10:10 ~14 min ios 📦 ipa
✔️ d875598 #9 2019-06-07 15:12:17 ~17 min android-e2e 📦 apk
✔️ d875598 #9 2019-06-07 15:13:19 ~18 min macos 📦 dmg
✔️ d875598 #9 2019-06-07 15:22:00 ~26 min android 📦 apk
d875598 #9 2019-06-07 15:22:00 ~26 min windows 📄 log
✔️ d875598 #9 2019-06-07 15:24:34 ~29 min linux 📦 App
✔️ c907355 #10 2019-06-07 18:26:05 ~15 min android-e2e 📦 apk
✔️ c907355 #10 2019-06-07 18:26:08 ~15 min ios 📦 ipa
✔️ c907355 #10 2019-06-07 18:26:33 ~15 min windows 📦 exe
✔️ c907355 #10 2019-06-07 18:27:23 ~16 min macos 📦 dmg
✔️ c907355 #10 2019-06-07 18:27:53 ~16 min linux 📦 App
✔️ c907355 #10 2019-06-07 18:28:16 ~17 min android 📦 apk
✔️ e8b948d #11 2019-06-11 13:08:46 ~14 min ios 📦 ipa
✔️ e8b948d #11 2019-06-11 13:10:49 ~16 min macos 📦 dmg
✔️ e8b948d #11 2019-06-11 13:12:29 ~17 min android-e2e 📦 apk
✔️ e8b948d #11 2019-06-11 13:14:38 ~19 min android 📦 apk
✔️ e8b948d #11 2019-06-11 13:15:34 ~20 min linux 📦 App
✔️ e8b948d #11 2019-06-11 13:19:56 ~25 min windows 📦 exe
✔️ 91d0265 #12 2019-06-11 15:00:02 ~13 min ios 📦 ipa
✔️ 91d0265 #12 2019-06-11 15:00:51 ~14 min linux 📦 App
✔️ 91d0265 #12 2019-06-11 15:00:54 ~14 min android 📦 apk
✔️ 91d0265 #12 2019-06-11 15:01:58 ~15 min android-e2e 📦 apk
✔️ 91d0265 #12 2019-06-11 15:02:20 ~15 min windows 📦 exe
✔️ 91d0265 #12 2019-06-11 15:04:53 ~18 min macos 📦 dmg
✔️ 8bad5f0 #13 2019-06-11 16:53:58 ~13 min ios 📦 ipa
✔️ 8bad5f0 #13 2019-06-11 16:55:08 ~14 min windows 📦 exe
✔️ 8bad5f0 #13 2019-06-11 16:55:34 ~15 min android-e2e 📦 apk
✔️ 8bad5f0 #13 2019-06-11 16:56:32 ~16 min linux 📦 App
✔️ 8bad5f0 #13 2019-06-11 16:57:13 ~17 min android 📦 apk
✔️ 8bad5f0 #13 2019-06-11 16:57:30 ~17 min macos 📦 dmg
✔️ 7520750 #14 2019-06-12 17:18:00 ~11 min android-e2e 📦 apk
✔️ 7520750 #14 2019-06-12 17:19:07 ~12 min linux 📦 App
✔️ 7520750 #14 2019-06-12 17:19:32 ~12 min ios 📦 ipa
✔️ 7520750 #14 2019-06-12 17:20:00 ~13 min android 📦 apk
✔️ 7520750 #14 2019-06-12 17:20:05 ~13 min windows 📦 exe
✔️ 7520750 #14 2019-06-12 17:20:13 ~13 min macos 📦 dmg
✔️ 13e4669 #15 2019-06-14 08:09:43 ~10 min android 📦 apk
✔️ 13e4669 #15 2019-06-14 08:11:25 ~12 min linux 📦 App
✔️ 13e4669 #15 2019-06-14 08:11:27 ~12 min ios 📦 ipa
✔️ 13e4669 #15 2019-06-14 08:11:32 ~12 min android-e2e 📦 apk
✔️ 13e4669 #15 2019-06-14 08:12:38 ~13 min windows 📦 exe
✔️ 13e4669 #15 2019-06-14 08:14:09 ~15 min macos 📦 dmg
✔️ 36ca7f3 #16 2019-06-14 10:40:34 ~11 min android-e2e 📦 apk
✔️ 36ca7f3 #16 2019-06-14 10:41:15 ~11 min ios 📦 ipa
✔️ 36ca7f3 #16 2019-06-14 10:42:34 ~13 min android 📦 apk
✔️ 36ca7f3 #16 2019-06-14 10:42:34 ~13 min linux 📦 App
✔️ 36ca7f3 #16 2019-06-14 10:43:11 ~13 min windows 📦 exe
✔️ 36ca7f3 #16 2019-06-14 10:45:54 ~16 min macos 📦 dmg
Commit #️⃣ Finished (UTC) Duration Platform Result
a9ee958 #17 2019-06-14 11:49:09 ~8 min macos 📄 log
✔️ a9ee958 #17 2019-06-14 11:51:09 ~10 min android 📦 apk
✔️ a9ee958 #17 2019-06-14 11:52:06 ~11 min linux 📦 App
✔️ a9ee958 #17 2019-06-14 11:52:29 ~12 min ios 📦 ipa
✔️ a9ee958 #17 2019-06-14 11:52:43 ~12 min windows 📦 exe
✔️ a9ee958 #17 2019-06-14 11:53:02 ~12 min android-e2e 📦 apk
a9ee958 #18 2019-06-17 08:24:15 ~3 min ios 📄 log
✔️ a9ee958 #18 2019-06-17 08:32:07 ~11 min android-e2e 📦 apk
✔️ a9ee958 #18 2019-06-17 08:32:12 ~11 min linux 📦 App
✔️ a9ee958 #18 2019-06-17 08:33:00 ~12 min android 📦 apk
✔️ a9ee958 #18 2019-06-17 08:33:25 ~11 min windows 📦 exe
✔️ a9ee958 #18 2019-06-17 08:35:42 ~14 min macos 📦 dmg
a9ee958 #19 2019-06-17 08:54:48 ~3 min ios 📄 log
✔️ a9ee958 #20 2019-06-17 12:10:27 ~10 min ios 📦 ipa
✔️ 950dbf1 #19 2019-06-17 12:48:37 ~11 min android-e2e 📦 apk
✔️ 950dbf1 #19 2019-06-17 12:48:59 ~11 min linux 📦 App
✔️ 950dbf1 #21 2019-06-17 12:49:22 ~12 min ios 📦 ipa
✔️ 950dbf1 #19 2019-06-17 12:49:39 ~12 min android 📦 apk
✔️ 950dbf1 #19 2019-06-17 12:49:45 ~12 min windows 📦 exe
✔️ 950dbf1 #19 2019-06-17 12:52:37 ~15 min macos 📦 dmg

@jeluard jeluard removed request for a team, churik and antdanchenko June 3, 2019 06:55
@jeluard jeluard changed the title [Fixes #8066] Added native ENS registration WIP [Fixes #8066] Added native ENS registration Jun 3, 2019
@jeluard jeluard force-pushed the fix-8066 branch 2 times, most recently from 2b886fa to 5979cae Compare June 4, 2019 15:02
@@ -2149,3 +2152,119 @@
:shake-event
(fn [cofx _]
(logging/show-logs-dialog cofx)))

(re-frame/reg-fx
Copy link
Contributor

Choose a reason for hiding this comment

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

this namespace is only for register-handler-fx, and they should only contain simple events that call a function.
this would belong to ens.core

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

(fn [[registry name cb]]
(ens/get-addr registry name cb)))

(defn- on-resolve [registry custom-domain? username address public-key s]
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

(stateofus/valid-username? username)))

(handlers/register-handler-fx
:ens/set-state
Copy link
Contributor

Choose a reason for hiding this comment

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

note that if you use defn/fx to define the functions used in these events you can avoid declaring them here and simply use the attribute map key like this:

(fx/defn set-state
  {:events [:ens/set-state]}
  [{:keys [db]} state]
 {:db (assoc-state db state)})

(re-frame/reg-sub
:account/usernames
:<- [:account/account]
(fn [acc]
Copy link
Contributor

Choose a reason for hiding this comment

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

use account here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

(str "https://etherscan.io/address/" address))

(views/defview terms []
(views/letsubs [{:keys [contract]} [:get-screen-params :ens-terms]]
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this in get-screen-params here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's how we pass arguments to screens?

Copy link
Contributor

Choose a reason for hiding this comment

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

since @flexsurfer subs PR we stop using any kind of getter subscriptions, just create a simple sub like :ens/terms

Copy link
Member

Choose a reason for hiding this comment

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

i believe for screens it works a little bit different, btw if this is a current screen you can use[:get-screen-params] and it will return data for current screen

:else :main-icons/username))

(defn- icon-wrapper [color icon]
[react/view {:style {:margin-right 10 :width 32 :height 32 :border-radius 25 :align-items :center :justify-content :center
Copy link
Contributor

Choose a reason for hiding this comment

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

could be defined as a style separately or at least not in 1 line so stayl below char limit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe @flexsurfer is in favor of having inline styles

Copy link
Contributor

Choose a reason for hiding this comment

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

I am too but just talking about the layout here

Copy link
Member

Choose a reason for hiding this comment

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

we still don't have any agreement on this, imo it's about balance if it's too noisy it can be moved to styles for sure

@asemiankevich
Copy link
Contributor

asemiankevich commented Jun 5, 2019

@jeluard

  1. can't register 4 char name, also validation error message is misleading
    image

  2. myname.stateofus.eth should be fully underscored
    image

  3. can register a name less than 4 chars if enter a long name first and quickly erase
    image

  4. no Unsufficient funds validation , also gas limit is not fetched
    image

  5. label is broken (can see if cancel transaction)
    image

  6. can register already taken name if i enter some long name first then erase and enter any taken one (for ex nastya)

  7. username added confirmation is shown only when i add name -> see it in list and then tap + button again, expect it right after adding
    image

  8. y symbol is cut in list of usernames
    image

  9. cant remove username

  10. look up on etherscan links are throwing errors

image

image

@jeluard
Copy link
Contributor Author

jeluard commented Jun 5, 2019

@asemiankevich Can you detail more 7. ? Do you always experience that, or only under some condition?

@asemiankevich
Copy link
Contributor

@asemiankevich Can you detail more 7. ? Do you always experience that, or only under some condition?

Steps to reproduce:

  • open status - ens names
  • search for a name you own
  • proceed with the adding name to profile
  • once the name is shown in list -> click + button

Actual result: confirmation screen shown that name was added
Expected result: this confirmation should be shown right after i add a name , not when i am trying to add another one

No special conditions here i think.

@jeluard
Copy link
Contributor Author

jeluard commented Jun 5, 2019

Ah ok thanks!
In this case the bug is that you shouldn't see the confirmation at all, there are no tx here just saving the name locally

@hesterbruikman
Copy link
Contributor

  1. Custom domain gives inaccurate validation. Expect to show "doesn't exist" or "doesn't belong to you". Shows "Letters and numbers only"
    IMG_0117

  2. Updated copy here: https://www.figma.com/file/TNCyHKtR3sx5EL6YznFWUa4O/Profile?node-id=2317%3A50
    Fontsize of the number in the circle is 17
    Slice 2

  3. I find the header suspiciously close to the topbar. It's higher than other Profile items in the same build.

@errorists
Copy link
Contributor

@jeluard can we do something about that top toolbar sitting on top of the OS Status bar? there's no way we can release it with that stuff going on, it should account for the height of status bar in top padding.

@Serhy Serhy self-assigned this Jun 13, 2019
@errorists
Copy link
Contributor

errorists commented Jun 13, 2019

ENS usernames intro screen,

  • the bottom toolbar is still not fixed in position

  • myname.stateofus.eth should be black

Username entry screen:

  • Regression:P username input text is not aligned to the center

IMG_0968

  • missing copy update: in place of the 'username' placeholder it should rather say 'vitalik94' (not joking, check Figma! :P)

  • Missing copy update: 'At least 4 characters. Latin letters, numbers, and lowercase only.'

  • Missing copy update '✓ Username available!'

  • For the 'Continuing will connect this username…' text strings, can we get it bolded like in Figma?

Username checkout screen:

Artboard

  • regression, username text is not aligned to the center

  • this was also correct before, the left margin of terms checkmark is too large, should be a regular 16

ENS settings

Artboard Copy

  • the margins between list items are too wide, actually there should be no margins at all, it's 64 height for each cell.

@Serhy
Copy link
Contributor

Serhy commented Jun 13, 2019

  1. [Android only]: header is too close to devise topbar (it was mentioned in previous comments, sorry if it's in progress):

Screenshot 2019-06-13 at 13 35 45

  1. On the "Terms of name registration" screen a) the 'These terms are guarnteed......' make in bold and b) increase margins on 'Look up on etherscan' (bottom 43 and upper 27) and c) Etherscan (from capital 'E' in Look up on etherscan :

Screenshot 2019-06-13 at 13 58 07

  1. Missing copy update: Agree to Terms of name registration. I understand that my wallet address will be exposed when registering a username. (please mind checkbox be aligned at top-left then - on the same to 'Agree to Terms.....' line)
    Current view:

Screenshot 2019-06-13 at 14 12 40

Expected: https://www.figma.com/file/TNCyHKtR3sx5EL6YznFWUa4O/Profile?node-id=1822%3A945

@jeluard
Copy link
Contributor Author

jeluard commented Jun 13, 2019

@asemiankevich Please provide exact steps to reproduce the issue

@asemiankevich
Copy link
Contributor

asemiankevich commented Jun 14, 2019

@asemiankevich Please provide exact steps to reproduce the issue

i am sorry, @jeluard this happens when you:

  1. open status
  2. get some funds and eth
  3. profile -> ens names
  4. register a name
  5. on next screen where your name appears -> tap it and review details

image

@jeluard
Copy link
Contributor Author

jeluard commented Jun 14, 2019

@errorists @Serhy @asemiankevich All reported issues should be fixed now

@asemiankevich
Copy link
Contributor

asemiankevich commented Jun 17, 2019

@jeluard i found some issues on android, please take a look.

  1. name details are not scrollable (ens names -> add a name -> open its details)
    image

  2. terms of registration copy differs from figma, @errorists expected?
    image

  3. addresses on terms of registration screen are not centered (ens names -> register a name -> tap terms of registration -> scroll to the bottom)
    image

@errorists
Copy link
Contributor

@asemiankevich thanks, looked at the copy, it looks the same to me as with the Figma? The correct string revised by Rachel is 'Agree to Terms of name registration. 
I understand that my wallet address will be publicly connected to my username.

@jeluard
Copy link
Contributor Author

jeluard commented Jun 17, 2019

@asemiankevich I fixed the first issue. I think we can proceed and merge now.

@statustestbot
Copy link

100% of end-end tests have passed

Total executed tests: 47
Failed tests: 0
Passed tests: 47

Passed tests (47)

Click to expand
1. test_block_user_from_public_chat
Device sessions

2. test_filters_from_daap
Device sessions

3. test_copy_and_paste_messages
Device sessions

4. test_send_transaction_from_daap
Device sessions

5. test_request_and_receive_tokens_in_1_1_chat
Device sessions

6. test_deploy_contract_from_daap
Device sessions

7. test_open_transaction_on_etherscan
Device sessions

8. test_public_chat_messaging
Device sessions

9. test_long_press_to_delete_1_1_chat
Device sessions

10. test_password_in_logcat_sign_in
Device sessions

11. test_text_message_1_1_chat
Device sessions

12. test_add_to_contacts
Device sessions

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

14. test_unread_messages_counter_1_1_chat
Device sessions

15. test_logcat_send_transaction_from_daap
Device sessions

16. test_send_message_in_group_chat
Device sessions

17. test_logcat_send_transaction_from_wallet
Device sessions

18. test_send_token_with_7_decimals
Device sessions

19. test_send_eth_from_wallet_to_address
Device sessions

20. test_manage_assets
Device sessions

21. test_logcat_send_transaction_in_1_1_chat
Device sessions

22. test_request_and_receive_eth_in_1_1_chat
Device sessions

23. test_long_press_to_delete_public_chat
Device sessions

24. test_send_emoji
Device sessions

25. test_search_chat_on_home
Device sessions

26. test_logcat_recovering_account
Device sessions

27. test_messaging_in_different_networks
Device sessions

28. test_send_tokens_in_1_1_chat
Device sessions

29. test_network_mismatch_for_send_request_commands
Device sessions

30. test_logcat_sign_message_from_daap
Device sessions

31. test_switch_users_and_add_new_account
Device sessions

32. test_send_stt_from_wallet
Device sessions

33. test_login_with_new_account
Device sessions

34. test_send_eth_from_wallet_to_contact
Device sessions

35. test_add_contact_from_public_chat
Device sessions

36. test_send_two_transactions_one_after_another_in_dapp
Device sessions

37. test_password_in_logcat_creating_account
Device sessions

38. test_backup_recovery_phrase
Device sessions

39. test_offline_status
Device sessions

40. test_open_google_com_via_open_dapp
Device sessions

41. test_unread_messages_counter_public_chat
Device sessions

42. test_sign_message_from_daap
Device sessions

43. test_user_can_remove_profile_picture
Device sessions

44. test_share_contact_code_and_wallet_address
Device sessions

45. test_request_eth_in_wallet
Device sessions

46. test_refresh_button_browsing_app_webview
Device sessions

47. test_backup_recovery_phrase_warning_from_wallet
Device sessions

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[ENS Names] ENS username and name verification screens
10 participants