mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
patch rpc-bitcoin to be compatible with bitcoin core 28.0 (#66)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
diff --git a/node_modules/rpc-bitcoin/build/src/rpc.d.ts b/node_modules/rpc-bitcoin/build/src/rpc.d.ts
|
||||
index d25d732..ce4eb22 100644
|
||||
--- a/node_modules/rpc-bitcoin/build/src/rpc.d.ts
|
||||
+++ b/node_modules/rpc-bitcoin/build/src/rpc.d.ts
|
||||
@@ -6,7 +6,7 @@ export declare type RPCIniOptions = RESTIniOptions & {
|
||||
fullResponse?: boolean;
|
||||
};
|
||||
export declare type JSONRPC = {
|
||||
- jsonrpc?: string | number;
|
||||
+ jsonrpc?: string;
|
||||
id?: string | number;
|
||||
method: string;
|
||||
params?: object;
|
||||
diff --git a/node_modules/rpc-bitcoin/build/src/rpc.js b/node_modules/rpc-bitcoin/build/src/rpc.js
|
||||
index 7fec7aa..3bee5fc 100644
|
||||
--- a/node_modules/rpc-bitcoin/build/src/rpc.js
|
||||
+++ b/node_modules/rpc-bitcoin/build/src/rpc.js
|
||||
@@ -12,7 +12,7 @@ class RPCClient extends rest_1.RESTClient {
|
||||
}
|
||||
async rpc(method, params = {}, wallet) {
|
||||
const uri = typeof wallet === "undefined" ? "/" : "wallet/" + wallet;
|
||||
- const body = { method, params, jsonrpc: 1.0, id: "rpc-bitcoin" };
|
||||
+ const body = { method, params, jsonrpc: "1.0", id: "rpc-bitcoin" };
|
||||
try {
|
||||
const response = await this.batch(body, uri);
|
||||
return this.fullResponse ? response : response.result;
|
||||
Reference in New Issue
Block a user