-
Notifications
You must be signed in to change notification settings - Fork 635
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
Backups V2 Follow-up Fixes / Improvements #6213
Conversation
…nbow into @matthew/APP-1297
… is not storing proper data, and create new backup every time the user wants to backup
</Portal> | ||
<Portal /> | ||
<PortalConsumer /> | ||
<BackupsSync /> |
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.
In charge of initial backup store sync on mount
const AppWithRedux = connect<AppProps, AppDispatch, AppProps, AppState>( | ||
state => ({ | ||
walletReady: state.appState.walletReady, | ||
}), | ||
null, | ||
null, | ||
{ | ||
areStatesEqual: (next, prev) => { | ||
// Only update if walletReady actually changed | ||
return next.appState.walletReady === prev.appState.walletReady; | ||
}, | ||
areOwnPropsEqual: shallowEqual, | ||
} | ||
)(memo(App)); |
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 only really want to re-render the App when walletReady has changed.. this fixes that
if (!backupProvider) { | ||
backupsStore.getState().setBackupProvider(WalletBackupTypes.manual); | ||
} |
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.
coming from undefined
-> manual
if not already set to cloud
Blocked by #6276 due to multiple AbsolutePortal components being mounted. Merge greg's PR in first so I can rebase and refactor this to use that. |
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.
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.
crispy stuff
referenced the notion doc to run through some flows, did not encounter any issues
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! Only concern is the pwd
@@ -135,6 +135,7 @@ export function useConsolidatedTransactions( | |||
keepPreviousData: true, | |||
getNextPageParam: lastPage => lastPage?.nextPage, | |||
refetchInterval: CONSOLIDATED_TRANSACTIONS_INTERVAL, | |||
enabled: !!address, |
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.
Aura +1000
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.
🚀🚀🚀
const { status } = backupsStore(state => ({ | ||
status: state.status, | ||
})); |
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.
const { status } = backupsStore(state => ({ | |
status: state.status, | |
})); | |
const status = backupsStore(state => state.status); |
const { status, backups, mostRecentBackup } = backupsStore(state => ({ | ||
status: state.status, | ||
backups: state.backups, | ||
mostRecentBackup: state.mostRecentBackup, | ||
})); |
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.
const { status, backups, mostRecentBackup } = backupsStore(state => ({ | |
status: state.status, | |
backups: state.backups, | |
mostRecentBackup: state.mostRecentBackup, | |
})); | |
const { status, backups, mostRecentBackup } = backupsStore() |
setIncorrectPassword(false); | ||
}, []); | ||
|
||
const onSubmit = useCallback(async () => { | ||
setLoading(true); | ||
// NOTE: Localizing password to prevent an empty string from being saved if we re-render |
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.
localizing?
Fixes APP-1297
Fixes APP-1050
Fixes APP-2002
Fixes APP-1649
Fixes APP-2120
What changed (plus any additional context for devs)
This PR introduces a lot of stability changes to backups. I'll layout the important changes here.
UserData.json
since it quickly becomes muddy dealing with backup data and user data.backupsStore
Zustand store which controls the synced backup dataScreen recordings / screenshots
What to test
https://www.notion.so/rainbowdotme/Backups-V2-Fixes-QA-Hand-off-149b001b85b4800fbf72c0f347b992b0?showMoveTo=true&saveParent=true