]> git.codecow.com Git - libnemo.git/commitdiff
Remove try-catch on plain assignment.
authorChris Duncan <chris@codecow.com>
Wed, 12 Aug 2026 06:18:43 +0000 (23:18 -0700)
committerChris Duncan <chris@codecow.com>
Wed, 12 Aug 2026 06:18:43 +0000 (23:18 -0700)
src/lib/rpc/accounts_frontiers.ts

index 7d1aa5bc9eedd06dbb7dc791290da20b8bd1a487..9eb6fc7b99777b472fe4cc14a7c1b09a20f8f310 100644 (file)
@@ -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
                                }
                        }
                }