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

Backups V2 Follow-up Fixes / Improvements #6213

Draft
wants to merge 24 commits into
base: develop
Choose a base branch
from
Draft

Conversation

walmat
Copy link
Contributor

@walmat walmat commented Oct 18, 2024

Fixes APP-1297

What changed (plus any additional context for devs)

Currently there is multiple places this hook is used, so my hunch is the useState variable password was being wiped between uses and causing issues.

Screen recordings / screenshots

What to test

Copy link

linear bot commented Oct 18, 2024

@walmat walmat changed the title Fix missing backup password when saving Backups V2 Follow-up Fixes / Improvements Nov 8, 2024
.vscode/settings.json Outdated Show resolved Hide resolved
Comment on lines +85 to +86
<Portal />
<PortalConsumer />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are now no longer re-rendering the entire app when re-rendering

</Portal>
<Portal />
<PortalConsumer />
<BackupsSync />
Copy link
Contributor Author

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

Comment on lines +92 to +105
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));
Copy link
Contributor Author

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this logic was moved into backupStore

Comment on lines +130 to +132
if (!backupProvider) {
backupsStore.getState().setBackupProvider(WalletBackupTypes.manual);
}
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant