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 #8248

Closed
wants to merge 40 commits into from
Closed

[Fixes #8066] Added native ENS registration #8248

wants to merge 40 commits into from

Conversation

jeluard
Copy link
Contributor

@jeluard jeluard commented May 21, 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.

status: WIP

@jeluard jeluard requested review from yenda and flexsurfer May 21, 2019 12:36
@jeluard jeluard requested review from antdanchenko, churik and a team as code owners May 21, 2019 12:36
@jeluard jeluard self-assigned this May 21, 2019
@status-github-bot
Copy link

status-github-bot bot commented May 21, 2019

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 21, 2019

Jenkins Builds

Click to see older builds (23)
Commit #️⃣ Finished (UTC) Duration Platform Result
fdfc033 #1 2019-05-21 12:51:44 ~15 min android 📄 log
fdfc033 #1 2019-05-21 12:51:44 ~15 min linux 📄 log
fdfc033 #1 2019-05-21 12:52:09 ~15 min macos 📄 log
fdfc033 #1 2019-05-21 12:52:36 ~15 min windows 📄 log
fdfc033 #1 2019-05-21 12:52:52 ~16 min android-e2e 📄 log
✔️ 6b0d4d2 #2 2019-05-21 13:15:57 ~17 min macos 📦 dmg
✔️ 6b0d4d2 #2 2019-05-21 13:16:10 ~17 min android 📦 apk
✔️ 6b0d4d2 #2 2019-05-21 13:17:12 ~18 min android-e2e 📦 apk
✔️ 6b0d4d2 #2 2019-05-21 13:17:17 ~18 min linux 📦 App
✔️ 6b0d4d2 #2 2019-05-21 13:18:21 ~20 min windows 📦 exe
✔️ 6b0d4d2 #2 2019-05-21 13:21:07 ~22 min ios 📦 ipa
✔️ d106198 #3 2019-05-21 13:41:40 ~16 min linux 📦 App
✔️ d106198 #3 2019-05-21 13:43:49 ~18 min android 📦 apk
✔️ d106198 #3 2019-05-21 13:44:00 ~19 min android-e2e 📦 apk
✔️ d106198 #3 2019-05-21 13:46:03 ~21 min macos 📦 dmg
✔️ d106198 #3 2019-05-21 13:47:42 ~22 min windows 📦 exe
✔️ d106198 #3 2019-05-21 13:49:20 ~24 min ios 📦 ipa
fd8b250 #4 2019-05-22 15:18:46 ~31 sec android 📄 log
fd8b250 #4 2019-05-22 15:18:47 ~34 sec android-e2e 📄 log
fd8b250 #4 2019-05-22 15:18:48 ~31 sec ios 📄 log
fd8b250 #4 2019-05-22 15:18:56 ~33 sec linux 📄 log
fd8b250 #4 2019-05-22 15:18:56 ~32 sec macos 📄 log
fd8b250 #4 2019-05-22 15:18:58 ~29 sec windows 📄 log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ a6bd0fc #5 2019-05-22 15:37:16 ~16 min linux 📦 App
✔️ a6bd0fc #5 2019-05-22 15:37:16 ~17 min android-e2e 📦 apk
✔️ a6bd0fc #5 2019-05-22 15:38:36 ~18 min windows 📦 exe
✔️ a6bd0fc #5 2019-05-22 15:40:00 ~19 min macos 📦 dmg
✔️ a6bd0fc #5 2019-05-22 15:40:17 ~20 min android 📦 apk
✔️ a6bd0fc #5 2019-05-22 15:44:11 ~23 min ios 📦 ipa
1dd84fa #6 2019-05-29 16:46:56 ~33 sec android 📄 log
1dd84fa #6 2019-05-29 16:46:56 ~36 sec android-e2e 📄 log
1dd84fa #6 2019-05-29 16:46:56 ~32 sec ios 📄 log
1dd84fa #6 2019-05-29 16:47:03 ~36 sec windows 📄 log

@status-im-auto
Copy link
Member

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
fdfc033 #1 2019-05-21 12:51:44 ~15 min android 📄 log
fdfc033 #1 2019-05-21 12:51:44 ~15 min linux 📄 log

@errorists
Copy link
Contributor

errorists commented May 21, 2019

👏 Great 👏 work 👏 @jeluard

All of the issues I could find, if you run into trouble with using fontWeight, try asking @yenda, he's the typography master 👑

Group


Group


Group 2


Artboard


Group 5


Group 4

(defn- subdomain [username]
(str username "." domain))

(def registrars
Copy link
Contributor

@yenda yenda May 21, 2019

Choose a reason for hiding this comment

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

do we actually need this?

(ens/owner "0x112234455c3a32fd11230c42e7bccd4a84e02010" "stateofus.eth" println)
0x11d9f481effd20d76cee832559bd9aca25405841

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, will drop it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually it's something we need to check statically and pretty often so doesn't appear to be worth the hassle and perf cost.

Copy link
Contributor

Choose a reason for hiding this comment

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

what do you mean we need to check it statically? what if we change the contract address for stateofus.eth?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well same as if we change any contract address?

Copy link
Contributor

Choose a reason for hiding this comment

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

@decanus do you have any recommendation here? Should we rather rely on hardcoded contract addresses for the registrar or solve it with the ens resolver contract?

src/status_im/utils/ethereum/ens.cljs Outdated Show resolved Hide resolved
@flexsurfer
Copy link
Member

flexsurfer commented May 22, 2019

@jeluard , @yenda introduced typography some time ago, so we don't need to set font styles manually anymore, typography key should be used instead, you can see typography name in figma cc @errorists

@jeluard
Copy link
Contributor Author

jeluard commented May 22, 2019

@flexsurfer @yenda I made some changes

src/status_im/subs.cljs Outdated Show resolved Hide resolved
src/status_im/subs.cljs Outdated Show resolved Hide resolved
@@ -0,0 +1,123 @@
(ns status-im.ui.screens.ens.events
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 we don't use events in ui namespace, handlers should be in root events file, fx and functions in core.cljs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are plenty events files.

Copy link
Contributor

@yenda yenda May 23, 2019

Choose a reason for hiding this comment

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

Which is wrong there shouldnt be any

@status-github-bot
Copy link

Pull Request Checklist

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

[toolbar/content-title (i18n/label :t/ens-your-username)]])

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

Choose a reason for hiding this comment

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

make just one subscription for the register screen with all the data you need

yenda and others added 15 commits May 29, 2019 18:44
Signed-off-by: yenda <eric@status.im>
Signed-off-by: Dmitry Novotochinov <dmitry.novot@gmail.com>
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
Signed-off-by: yenda <eric@status.im>
…nt APIs.

Connect to stubs of status-go protocol API, behind the flag. Since status-go isn't updated yet, setting this flag will break the app.
What needs to be tested is no regressions in a normal mode.

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
`wallet-autoconfig-token` is a very expensive call on mainnet
because it checks the balance of every known token.

it is called:
- when wallet is refreshed by pulling
- when user goes on any wallet screen

this PR changes that by:
- calling it only when the wallet is initialized and there is no
visible-token configuration

it only calls update-wallet when a new transaction arrives
- use `json-rpc/eth-call` and `json-rpc/eth-transaction-call`
everywhere
- move all conversions to abi-spec
move utils.ethereum.tokens to ethereum.tokens
move utils.ethereum.abi-spec to ethereum.abi-spec
move utils.ethereum.core to ethereum.core
move utils.ethereum.eip165 to ethereum.eip165
move utils.ethereum.eip55 to ethereum.eip55
move utils.ethereum.eip681 to ethereum.eip681
move utils.ethereum.ens to ethereum.ens
move utils.ethereum.erc721 to ethereum.erc721
move utils.ethereum.mnemonics to ethereum.mnemonics
move utils.ethereum.resolver to ethereum.resolver
move utils.ethereum.macros to ethereum.macros

Signed-off-by: yenda <eric@status.im>
@jeluard jeluard requested a review from a team May 29, 2019 16:46
@dependency-lockfile-snitch
Copy link

mobile_files/yarn.lock changed. Pinging @jakubgs, @mandrigin, and @corpetty

@yenda
Copy link
Contributor

yenda commented May 29, 2019

could you fixup all these commit it can't be reviewed in that state

Copy link
Contributor

@yenda yenda left a comment

Choose a reason for hiding this comment

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

  • there is still an ens events namespace, the best solution is to move to ens.core (outside of ui) and use the fx/defn attribute map like this: {:events [:this-in-an-event]} to declare the events.
  • duplicated ens subscription
  • internal transactions should use eth-transaction-call

@jeluard
Copy link
Contributor Author

jeluard commented Jun 3, 2019

@yenda Not done, please don't review.

@dependency-lockfile-snitch
Copy link

mobile_files/yarn.lock changed. Pinging @jakubgs, @pombeirp, and @corpetty

@jakubgs jakubgs deleted the 8066 branch May 12, 2020 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
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