diff options
| -rw-r--r-- | routes/users.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/routes/users.ts b/routes/users.ts index 06eb75ab..c0169f9c 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -15,7 +15,7 @@ import { mail, templates } from "$lib/mail"; import upload from "$lib/upload"; import rpc from "@coinos/rpc"; import { nip19 } from "nostr-tools"; -import { getCount, getProfile } from "$lib/nostr"; +import { getProfile } from "$lib/nostr"; export default { upload, @@ -128,7 +128,7 @@ export default { "prompt", "pubkey", "username", - "website" + "website", ]; if (user.pubkey) user.npub = nip19.npubEncode(user.pubkey); @@ -701,8 +701,12 @@ export default { let { id } = req.body; let { id: uid } = req.user; let { type } = await g(`account:${id}`); - let node = rpc({ ...config[type], wallet: id }); - await node.unloadWallet(id); + try { + let node = rpc({ ...config[type], wallet: id }); + await node.unloadWallet(id); + } catch (e) { + warn("failed to unload wallet", id); + } await db .multi() |
