From 04e2b80631673b80f3772cee614449169cbf13f1 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Mon, 3 Aug 2026 10:19:09 -0700 Subject: [PATCH] Validate frontiers RPC response. --- src/lib/wallet/unopened.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/wallet/unopened.ts b/src/lib/wallet/unopened.ts index 14b40f0..fc5ef37 100644 --- a/src/lib/wallet/unopened.ts +++ b/src/lib/wallet/unopened.ts @@ -25,8 +25,9 @@ export async function _unopened (wallet: Wallet, rpc: unknown, batchSize: unknow const data = { "accounts": addresses } - const { errors } = await rpc.post('accounts_frontiers', data) - if (errors != null) { + const res = await rpc.post('accounts_frontiers', data) + if (res != null && typeof res === 'object' && 'errors' in res && res.errors != null && typeof res.errors === 'object') { + const errors = res.errors as Record for (const a of addresses) { const value = errors[a] if (value === 'Account not found') { -- 2.52.0