From: Chris Duncan Date: Sun, 9 Aug 2026 09:34:36 +0000 (-0700) Subject: Set default account balance and receivable if not yet opened. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=79494650c322debf3784123b3d33e833ef9edd98;p=libnemo.git Set default account balance and receivable if not yet opened. --- diff --git a/src/lib/wallet/refresh.ts b/src/lib/wallet/refresh.ts index 98594c2..89b8ae7 100644 --- a/src/lib/wallet/refresh.ts +++ b/src/lib/wallet/refresh.ts @@ -46,6 +46,8 @@ export async function _refresh (wallet: Wallet, rpc: unknown, from: unknown, to: try { resAccountInfo = await rpc.post('account_info', reqAccountInfo) } catch (err) { + account.balance ??= 0 + account.receivable ??= 0 console.error(err) continue }