Remove promisified web3 functions from tests

This commit is contained in:
Leonid Logvinov
2018-01-26 11:21:06 +01:00
parent e56b2ceebb
commit 6f13d107c4
2 changed files with 12 additions and 14 deletions

View File

@@ -134,6 +134,10 @@ export class Web3Wrapper {
const gas = await promisify<number>(this._web3.eth.estimateGas)({ data });
return gas;
}
public async sendTransactionAsync(txData: Web3.TxData): Promise<string> {
const txHash = await promisify<string>(this._web3.eth.sendTransaction)(txData);
return txHash;
}
private async _sendRawPayloadAsync<A>(payload: Web3.JSONRPCRequestPayload): Promise<A> {
const sendAsync = this._web3.currentProvider.sendAsync.bind(this._web3.currentProvider);
const response = await promisify<Web3.JSONRPCResponsePayload>(sendAsync)(payload);