From: Chris Duncan Date: Wed, 12 Aug 2026 06:18:43 +0000 (-0700) Subject: Remove try-catch on plain assignment. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=afdf5fcc923ed1f86e45e29ff7bb3a1ef2e1512d;p=libnemo.git Remove try-catch on plain assignment. --- diff --git a/src/lib/rpc/accounts_frontiers.ts b/src/lib/rpc/accounts_frontiers.ts index 7d1aa5b..9eb6fc7 100644 --- a/src/lib/rpc/accounts_frontiers.ts +++ b/src/lib/rpc/accounts_frontiers.ts @@ -33,13 +33,7 @@ export function accounts_frontiers (body: unknown): AccountsFrontiersResponse { response.frontiers = frontiers for (const [address, frontier] of Object.entries(body.frontiers) as [string, unknown][]) { if (Account.isValid(address) && hex.is(frontier, 64)) { - try { - frontiers[address] = frontier - } catch (err: any) { - const errors = response.errors ?? Object.create(null) - response.errors = errors - errors[address] = err?.message ?? 'Invalid account balance' - } + frontiers[address] = frontier } } }