aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web3-wrapper
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-01-26 18:21:06 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-01-30 23:01:37 +0800
commit6f13d107c4ca90049249e44a90b45cac2b490762 (patch)
tree905b7b408ca8d9fcc794ff9cb78b229134bd4dae /packages/web3-wrapper
parente56b2ceebb5e18aff0daf8951f3bd854c84bc433 (diff)
downloaddexon-sol-tools-6f13d107c4ca90049249e44a90b45cac2b490762.tar
dexon-sol-tools-6f13d107c4ca90049249e44a90b45cac2b490762.tar.gz
dexon-sol-tools-6f13d107c4ca90049249e44a90b45cac2b490762.tar.bz2
dexon-sol-tools-6f13d107c4ca90049249e44a90b45cac2b490762.tar.lz
dexon-sol-tools-6f13d107c4ca90049249e44a90b45cac2b490762.tar.xz
dexon-sol-tools-6f13d107c4ca90049249e44a90b45cac2b490762.tar.zst
dexon-sol-tools-6f13d107c4ca90049249e44a90b45cac2b490762.zip
Remove promisified web3 functions from tests
Diffstat (limited to 'packages/web3-wrapper')
-rw-r--r--packages/web3-wrapper/src/index.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/web3-wrapper/src/index.ts b/packages/web3-wrapper/src/index.ts
index c4826f2be..a2878fc2a 100644
--- a/packages/web3-wrapper/src/index.ts
+++ b/packages/web3-wrapper/src/index.ts
@@ -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);