]> git.codecow.com Git - libnemo.git/commitdiff
Create JSON object for block processing without literal strings.
authorChris Duncan <chris@zoso.dev>
Wed, 20 Aug 2025 18:51:20 +0000 (11:51 -0700)
committerChris Duncan <chris@zoso.dev>
Wed, 20 Aug 2025 18:51:20 +0000 (11:51 -0700)
src/lib/block.ts

index 16bc88b56e9c4dcd32c5ec9c0f9b8759c90141fa..2e0da011cfdc8fb05d4501c365308951f37b570e 100644 (file)
@@ -274,9 +274,9 @@ export class Block {
                        throw new Error('Block is missing proof-of-work. Use pow() and try again.')
                }
                const data = {
-                       "subtype": this.subtype,
-                       "json_block": "true",
-                       "block": this.toJSON()
+                       subtype: this.subtype,
+                       json_block: true,
+                       block: this.toJSON()
                }
                const res = await rpc.call('process', data)
                if (res.hash == null) {