fix setup error precendence

This commit is contained in:
Paul Miller
2023-06-26 15:33:57 -05:00
parent d570f224a1
commit 63a097d826
3 changed files with 17 additions and 10 deletions

View File

@@ -134,6 +134,10 @@ export const Provider: ParentComponent = (props) => {
settings?: MutinyWalletSettingStrings
): Promise<void> {
try {
// If we're already in an error state there should be no reason to continue
if (state.setup_error) {
throw state.setup_error;
}
setState({ wallet_loading: true });
const mutinyWallet = await setupMutinyWallet(settings);
// Get balance optimistically