]> git.codecow.com Git - libnemo.git/commitdiff
Check for error property in RPC response.
authorChris Duncan <chris@zoso.dev>
Fri, 8 Aug 2025 19:25:50 +0000 (12:25 -0700)
committerChris Duncan <chris@zoso.dev>
Fri, 8 Aug 2025 19:25:50 +0000 (12:25 -0700)
src/lib/ledger.ts

index 6daf4b923ef14b239889e5270258253d827ee9b6..f524c7059ae9aee753b69ffa9419e0385658bc59 100644 (file)
@@ -322,7 +322,7 @@ export class Ledger extends Wallet {
                                'hash': input\r
                        }\r
                        const res = await node.call('block_info', data)\r
-                       if (!res || res.ok === false) {\r
+                       if (!res || !res.ok || res.error) {\r
                                throw new Error(`Unable to fetch block info`, res)\r
                        }\r
                        input = res.contents\r