mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-02-15 11:14:28 +01:00
Use delete function for deleting while active
This commit is contained in:
committed by
Paul Miller
parent
69a6e1c03c
commit
169adfc73e
@@ -194,15 +194,14 @@ export const Provider: ParentComponent = (props) => {
|
||||
},
|
||||
async deleteMutinyWallet(): Promise<void> {
|
||||
try {
|
||||
if (state.mutiny_wallet) {
|
||||
await state.mutiny_wallet?.stop();
|
||||
}
|
||||
setState((prevState) => ({
|
||||
...prevState,
|
||||
mutiny_wallet: undefined,
|
||||
deleting: true
|
||||
}));
|
||||
MutinyWallet.import_json("{}");
|
||||
if (state.mutiny_wallet) {
|
||||
await state.mutiny_wallet?.stop();
|
||||
await state.mutiny_wallet?.delete_all();
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user