-
Notifications
You must be signed in to change notification settings - Fork 349
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
feat: migrate all entry screen, ctas to new add account v2 #8670
Merged
+1,409
β465
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git βοΈ
3 Skipped Deployments
|
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 11, 2024 17:16
f4c2335
to
7edfd99
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 12, 2024 09:34
7edfd99
to
e91cf7a
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 12, 2024 10:46
e91cf7a
to
aacddef
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 12, 2024 13:27
aacddef
to
9ed5e36
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 13, 2024 06:55
9ed5e36
to
6da7c75
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 13, 2024 12:09
6da7c75
to
8702069
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
2 times, most recently
from
December 13, 2024 12:19
d582aaf
to
e06d1a9
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 13, 2024 12:30
e06d1a9
to
186b33c
Compare
themooneer
changed the title
feat: migrate all entry screen, ctas to new add account (uncompleted β¦
feat: migrate all entry screen, ctas to new add account v2
Dec 13, 2024
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 13, 2024 12:48
186b33c
to
61b1be0
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 13, 2024 14:17
61b1be0
to
a1a799b
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 13, 2024 15:16
a1a799b
to
17bf179
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
2 times, most recently
from
December 18, 2024 15:26
7b2b7f3
to
85dcadb
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 18, 2024 15:39
85dcadb
to
1660676
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 18, 2024 15:43
1660676
to
c79f5a6
Compare
...-mobile/src/newArch/features/AssetSelection/screens/SelectCrypto/useSelectCryptoViewModel.ts
Outdated
Show resolved
Hide resolved
apps/ledger-live-mobile/src/newArch/features/AssetSelection/screens/SelectNetwork/index.tsx
Outdated
Show resolved
Hide resolved
libs/ledger-live-common/src/deposit/useGroupedCurrenciesByProvider.hook.ts
Show resolved
Hide resolved
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 19, 2024 14:15
c79f5a6
to
16e7fd5
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 19, 2024 14:19
16e7fd5
to
d542e98
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 20, 2024 10:04
d542e98
to
399305e
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
December 20, 2024 10:45
399305e
to
b343a24
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
January 2, 2025 07:31
b343a24
to
15609dd
Compare
themooneer
force-pushed
the
feat/LIVE-15374
branch
from
January 2, 2025 08:17
15609dd
to
e00b41b
Compare
apps/ledger-live-mobile/src/newArch/features/AssetSelection/screens/SelectNetwork/index.tsx
Show resolved
Hide resolved
mcayuelas-ledger
approved these changes
Jan 2, 2025
ofreyssinet-ledger
approved these changes
Jan 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
common
Has changes in live-common
mobile
Has changes in LLM
translations
Translation files have been touched
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
β Checklist
npx changeset
was attached.π Description
When llmNetworkBasedAddAccount feature flag is enabled, all the ctas that open an add account process will be redirected to the new flow and support currency and related route params.
Entry point list:
The new add account flow start either by a new Crypto selection or via Network provider (AssetSelection feature). If those informations are provided in the route params then the next step is to Connect the device and Scan & Select found account (will be adjusted in the next ticket).
Important
currency
is provided in the route params.Changes in ledger-live-common
Here is my analysis on the subject!
It is the SelectCrypto component, during its mounting, that intercepts the currency from the params and uses this info in a useEffect to simulate an explicit redirection:
Otherwise,
Otherwise,
What happens during the mounting is that it intercepts ethereum as currency, calls a custom hook useGroupedCurrenciesByProvider, and triggers a useEffect to redirect if needed.
The problem is that the custom hook is slow since it depends on an asynchronous operation to return a 'result' containing 2 arrays:
sortedCryptoCurrencies
currenciesByProvider
The first execution returns 2 empty arrays.
From the second execution, the arrays are filled.
Hence, the
useEffect
is triggered twice on the SelectCrypto side,The first without providers redirects to
SelectAccount
,Then the second arrives a few seconds later, following the new return of the custom hook which changes the ref of the onPress function that triggers the
useEffect
a second timeConsequently, a redirection to SelectNetwork occurs. This results in this strange and ambiguous behavior from a UX point of view.
The root cause of all this is that the
useEffect
managing potential navigation depends on an onPress callback, which in turn depends on the result of the custom hook useGroupedCurrenciesByProvider, while we do not have the information that it is loading the data. It executes with the result of its initial state and then with the filled arrays.On the add-account, I made sure to better control this custom hook with a loading system with 4 states:
idle
,pending
,success
, anderror
, so that we extract this information at the instantiation of the hook.Consequently, the useEffect only triggers if the
asynchronous operation
is finished (success OR error state).addaccprovier-before.mov
after-loading-provider.mov
Test case revision is done
Full Video preview
one.navigator.entry.point.mov
Post onboarding workflow test
post.onboarding.test.OK.mov
β Context
https://ledgerhq.atlassian.net/browse/LIVE-15374
π§ Checklist for the PR Reviewers