-
Notifications
You must be signed in to change notification settings - Fork 315
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] : WalletSync - Synchronize with LLD π #7023
β‘οΈ [FEAT] : WalletSync - Synchronize with LLD π #7023
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ 5 Ignored Deployments
|
01ce84c
to
c84df47
Compare
71a880b
to
817fa49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a debug cta to start a specific flow in developer settings please? Because here we can't test the activation flow without changing the code.
apps/ledger-live-desktop/src/newArch/WalletSync/Flows/Synchronize/01-SynchModeStep.tsx
Outdated
Show resolved
Hide resolved
apps/ledger-live-desktop/src/newArch/WalletSync/Flows/Synchronize/index.tsx
Outdated
Show resolved
Hide resolved
bd94e7e
to
1acf265
Compare
69e133f
to
e3f3638
Compare
a14e926
to
71c0108
Compare
2fa9f2c
to
5d21e1d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
{ element: t("walletSync.synchronize.qrCode.steps.step3") }, | ||
]; | ||
|
||
// TO CHANGE WHEN INTRAGRATION WITH TRUSTCHAIN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notes to anticipate a bit the integration:
this code may just disappear because we need to be able to "control" the steps, it's not the step that will do a call so some api and do something based on this because we will have a global function to call at the beginning and we will just hook to the various events.
so i think we don't need to have the "displayPinCode" injected as a prop neither, it's going to be a switch of step from the parent directly.
see the usage here for instance: https://github.com/LedgerHQ/ledger-live/blob/live-12627/apps/web-tools/trustchain/components/App.tsx#L468-L479 (generally speaking, this App.tsx file will act as general/canonical examples for all trustchain integrations)
createQRCodeHostInstance({
onDisplayQRCode: url => {
setUrl(url);
},
onDisplayDigits: digits => {
setDigits(digits);
},
addMember: async member => {
// this sdk will be somehow available as a react context when we do the trustchain integration
const jwt = await sdk.liveAuthenticate(trustchain, liveCredentials);
await sdk.addMember(jwt, trustchain, liveCredentials, member);
},
})
.catch(e => {
if (e instanceof InvalidDigitsError) {
return; // in this case, we could display an error of invalid digital error (it can also be handled by the generic component)
}
setError(e); // in this case, we render the generic error (we have a generic component for handling of errors) , typically it can be Networking error, but there could be also protocol errors
})
.then(() => {
// everything is finished. the other member was added β
});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah nice, I just putted that to simulate a behavior to develop UI but I'll make another PR right now to start the job on this part :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are currently able to control which step we want to display :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some notes to anticipate the integration, i let you decide if we fix this in a future PR, but the integration will have to modify a bunch of code (and not just the block of // INTEGRATION that you have defined) specifically for the qr code flow that needs to be one function call for the whole thing (since it's managing a websocket channel)
c1703f3
to
f30521b
Compare
5d21e1d
to
6216f75
Compare
008108c
into
feat/ws-activation-flow-lld
* β‘[FEAT]: WS Manage your Backup in LLD
β¦h LLD flows (#6885) * Initial setup on folders * Fix key * Reorg files using newArch folder update imports * [WIP]: WS activation flow (connect device) * add router * Generic Error/success screen Reorg in new arch * [WIP]: WS activation flow (connect device) * add router * Reorg in new arch * Fix files * Error/success screens * use DeviceAction * add loading state * UI polish and fix * Add loading screen for WS activation * Add loader animation * ποΈ Regorg files * β‘[FEAT]: WS Manage your Backup in LLD (#6988) * remove useless files * remove useless files * β‘[FEAT]: WS Manage your Backup in LLD * changeset * Add Loading + error screen * Add Integration test * Reworks steps * Add unsecured Error * fix WS tests * update flow * fix path * Fix tests * transition between flows * Add test for useFlow * add ManageBackup analytics * Fix reset flow * Mock Analytics --------- Co-authored-by: Maxime Aubanel <[email protected]> * Rename steps * β‘οΈ [FEAT] : WalletSync - Synchronize with LLD π (#7023) * β‘[FEAT]: WS Manage your Backup in LLD --------- Co-authored-by: Maxime Aubanel <[email protected]>
β¦h LLD flows (#6885) * Initial setup on folders * Fix key * Reorg files using newArch folder update imports * [WIP]: WS activation flow (connect device) * add router * Generic Error/success screen Reorg in new arch * [WIP]: WS activation flow (connect device) * add router * Reorg in new arch * Fix files * Error/success screens * use DeviceAction * add loading state * UI polish and fix * Add loading screen for WS activation * Add loader animation * ποΈ Regorg files * β‘[FEAT]: WS Manage your Backup in LLD (#6988) * remove useless files * remove useless files * β‘[FEAT]: WS Manage your Backup in LLD * changeset * Add Loading + error screen * Add Integration test * Reworks steps * Add unsecured Error * fix WS tests * update flow * fix path * Fix tests * transition between flows * Add test for useFlow * add ManageBackup analytics * Fix reset flow * Mock Analytics --------- Co-authored-by: Maxime Aubanel <[email protected]> * Rename steps * β‘οΈ [FEAT] : WalletSync - Synchronize with LLD π (#7023) * β‘[FEAT]: WS Manage your Backup in LLD --------- Co-authored-by: Maxime Aubanel <[email protected]>
* β‘[FEAT]: WS Manage your Backup in LLD
* β‘[FEAT]: WS Manage your Backup in LLD
β Checklist
npx changeset
was attached.π Description
Synchronize Flow
Screen.Recording.2024-06-06.at.17.05.44.mov
β Context
π§ Checklist for the PR Reviewers