Set default params and jsonrpc in Web3Wrapper._sendRawPayloadAsync

This commit is contained in:
Leonid Logvinov
2018-06-04 11:11:18 -07:00
parent fd9b3e0dcf
commit 4a108aa67d

View File

@@ -381,6 +381,8 @@ export class Web3Wrapper {
const sendAsync = this._web3.currentProvider.sendAsync.bind(this._web3.currentProvider);
const payloadWithDefaults = {
id: this._jsonRpcRequestId++,
params: [],
jsonrpc: '2.0',
...payload,
};
const response = await promisify<JSONRPCResponsePayload>(sendAsync)(payloadWithDefaults);