mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-19 05:45:15 +01:00
Update useExtendedNavigation.ts
This commit is contained in:
parent
7db5c03790
commit
cf29590356
@ -68,17 +68,18 @@ export const useExtendedNavigation = (): NavigationProp<ParamListBase> => {
|
|||||||
}
|
}
|
||||||
const wallet = wallets.find(w => w.getID() === walletID);
|
const wallet = wallets.find(w => w.getID() === walletID);
|
||||||
if (wallet && !wallet.getUserHasSavedExport()) {
|
if (wallet && !wallet.getUserHasSavedExport()) {
|
||||||
await presentWalletExportReminder()
|
try {
|
||||||
.then(() => {
|
await presentWalletExportReminder();
|
||||||
wallet.setUserHasSavedExport(true);
|
wallet.setUserHasSavedExport(true);
|
||||||
saveToDisk().finally(() => proceedWithNavigation());
|
await saveToDisk(); // Assuming saveToDisk() returns a Promise.
|
||||||
})
|
proceedWithNavigation();
|
||||||
.catch(() => {
|
} catch {
|
||||||
originalNavigation.navigate('WalletExportRoot', {
|
originalNavigation.navigate('WalletExportRoot', {
|
||||||
screen: 'WalletExport',
|
screen: 'WalletExport',
|
||||||
params: { walletID },
|
params: { walletID },
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return; // Prevent proceeding with the original navigation if the reminder is shown
|
return; // Prevent proceeding with the original navigation if the reminder is shown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user