Fix all wallets deleted on logout (#1308)
Every wallet returned by the useWallet hook has sendPayment set even if it doesn't support payments since wallet.sendPayment is wrapped with a useCallback hook.
This commit is contained in:
parent
3cd9991aa9
commit
ab80873a57
|
@ -105,6 +105,7 @@ export function useWallet (name) {
|
|||
|
||||
return {
|
||||
...wallet,
|
||||
canSend: !!wallet.sendPayment,
|
||||
sendPayment,
|
||||
config,
|
||||
save,
|
||||
|
@ -375,7 +376,7 @@ export function useWallets () {
|
|||
|
||||
const resetClient = useCallback(async (wallet) => {
|
||||
for (const w of wallets) {
|
||||
if (w.sendPayment) {
|
||||
if (w.canSend) {
|
||||
await w.delete()
|
||||
}
|
||||
await w.deleteLogs()
|
||||
|
|
Loading…
Reference in New Issue