]> git.codecow.com Git - libnemo.git/commitdiff
Compare with instanceof instead of constructor name.
authorChris Duncan <chris@zoso.dev>
Mon, 7 Jul 2025 13:20:50 +0000 (06:20 -0700)
committerChris Duncan <chris@zoso.dev>
Mon, 7 Jul 2025 13:20:50 +0000 (06:20 -0700)
src/lib/wallets/ledger-wallet.ts

index e0a5436c4f7c517de009a9e71612cc24b9afe37e..f1c12b5f1678ba00377128dff6fd2dbee2753ce2 100644 (file)
@@ -404,7 +404,7 @@ export class LedgerWallet extends Wallet {
        */\r
        async updateCache (index: number, hash: string, rpc: Rpc): Promise<LedgerResponse>\r
        async updateCache (index: number, input: any, node?: Rpc): Promise<LedgerResponse> {\r
-               if (typeof input === 'string' && node?.constructor === Rpc) {\r
+               if (typeof input === 'string' && node instanceof Rpc) {\r
                        const data = {\r
                                'json_block': 'true',\r
                                'hash': input\r