Pass empty params as null (#115)
This commit is contained in:
@@ -35,9 +35,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.0.0-beta.51",
|
||||
"@polkadot/jsonrpc": "^0.26.21",
|
||||
"@polkadot/primitives": "^0.26.21",
|
||||
"@polkadot/util": "^0.26.21",
|
||||
"@polkadot/util-keyring": "^0.26.21"
|
||||
"@polkadot/jsonrpc": "^0.26.22",
|
||||
"@polkadot/primitives": "^0.26.22",
|
||||
"@polkadot/util": "^0.26.22",
|
||||
"@polkadot/util-keyring": "^0.26.22"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.0.0-beta.51",
|
||||
"@polkadot/storage": "^0.26.21",
|
||||
"@polkadot/util": "^0.26.21",
|
||||
"@polkadot/util-crypto": "^0.26.21",
|
||||
"@polkadot/util-keyring": "^0.26.21",
|
||||
"@polkadot/storage": "^0.26.22",
|
||||
"@polkadot/util": "^0.26.22",
|
||||
"@polkadot/util-crypto": "^0.26.22",
|
||||
"@polkadot/util-keyring": "^0.26.22",
|
||||
"@types/nock": "^9.1.3",
|
||||
"eventemitter3": "^2.0.3",
|
||||
"isomorphic-fetch": "^2.2.1",
|
||||
|
||||
@@ -10,6 +10,8 @@ export default function encodeObject (self: RpcCoderState, method: string, param
|
||||
id: ++self.id,
|
||||
jsonrpc: '2.0',
|
||||
method,
|
||||
params
|
||||
params: params && params.length
|
||||
? params
|
||||
: null
|
||||
};
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -9,7 +9,7 @@ export type JsonRpcObject = {
|
||||
|
||||
export type JsonRpcRequest = JsonRpcObject & {
|
||||
method: string;
|
||||
params: Array<any>;
|
||||
params: Array<any> | null;
|
||||
};
|
||||
|
||||
export type JsonRpcResponseBase$Error = {
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
"@babel/runtime": "^7.0.0-beta.51",
|
||||
"@polkadot/api-format": "^0.14.19",
|
||||
"@polkadot/api-provider": "^0.14.19",
|
||||
"@polkadot/jsonrpc": "^0.26.21",
|
||||
"@polkadot/params": "^0.26.21",
|
||||
"@polkadot/util": "^0.26.21"
|
||||
"@polkadot/jsonrpc": "^0.26.22",
|
||||
"@polkadot/params": "^0.26.22",
|
||||
"@polkadot/util": "^0.26.22"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user