Page MenuHomePhabricator

[native] Handle the restore flow as a part of the registration flow
ClosedPublic

Authored by tomek on Jan 10 2025, 10:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 9, 8:57 PM
Unknown Object (File)
Sun, Mar 9, 8:57 PM
Unknown Object (File)
Sun, Mar 9, 8:57 PM
Unknown Object (File)
Sun, Mar 9, 8:57 PM
Unknown Object (File)
Feb 18 2025, 8:35 AM
Unknown Object (File)
Feb 18 2025, 8:35 AM
Unknown Object (File)
Feb 3 2025, 3:29 PM
Unknown Object (File)
Feb 3 2025, 3:29 PM
Subscribers

Details

Summary

When a user has an existing Ethereum account, they can try to use it to register a new account. In the old flow, we would show a screen when they can choose to either log in or use a different wallet - we're keeping this functionality for the v1 users.
In the new flow, there's no way to just log in - it is either restore or secondary login. The screen is updated so that the user can choose to restore their account, open the secondary login flow (QR), or choose a different account.

https://linear.app/comm/issue/ENG-10040/handle-existing-wallet-registration

new-layout.png (2×1 px, 215 KB)

New flow, v2 userNew flow, v1 userOld flow (usingRestoreFlow == false)

Depends on D14193

Test Plan

Tested that both new and old flows work (shown on the videos).

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek added a reviewer: ashoat.
Harbormaster returned this revision to the author for changes because remote builds failed.Jan 10 2025, 10:30 AM
Harbormaster failed remote builds in B33221: Diff 46643!
native/account/registration/existing-ethereum-account.react.js
148 ↗(On Diff #46647)

Flow doesn't understand that when useLegacyFlow === true then backupData has to be present.

Looks great!!

One things that feels pretty "broken" (unrelated to your changes) is that we have no loading state when the "Sign in using this wallet" button on landing/siwe is pressed. Would you mind creating a separate task/diff to add a loading state to the button after it's clicked? This will probably reduce buggy behavior by avoiding sending multiple events to a user's wallet, and it will feel more like a responsive UI. I think it should probably be prioritized – curious for your take.

ashoat added inline comments.
native/account/registration/existing-ethereum-account.react.js
193–194 ↗(On Diff #46647)

Should this text be displayed first, before the explanation for what happens if you've lost access?

This revision is now accepted and ready to land.Jan 10 2025, 11:55 AM

One things that feels pretty "broken" (unrelated to your changes) is that we have no loading state when the "Sign in using this wallet" button on landing/siwe is pressed. Would you mind creating a separate task/diff to add a loading state to the button after it's clicked? This will probably reduce buggy behavior by avoiding sending multiple events to a user's wallet, and it will feel more like a responsive UI. I think it should probably be prioritized – curious for your take.

Yeah, definitely makes sense! Created https://linear.app/comm/issue/ENG-10080/introduce-a-loading-status-to-the-sign-in-button-on-siwe-landing-page to track.

native/account/registration/existing-ethereum-account.react.js
193–194 ↗(On Diff #46647)

My idea was to have this explanation just before the button that opens the QR screen. But I don't feel strongly that it is really beneficial.