From 5bb68974ec779232fb4c7197bee31b672fe5f5bd Mon Sep 17 00:00:00 2001 From: Igor Kroitor Date: Fri, 20 Jul 2018 08:49:16 +0300 Subject: Deduplicate assert web3-wrapper signMessageAsync --- packages/web3-wrapper/src/web3_wrapper.ts | 1 - 1 file changed, 1 deletion(-) (limited to 'packages/web3-wrapper/src') diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts index 4439eb284..883a99bb4 100644 --- a/packages/web3-wrapper/src/web3_wrapper.ts +++ b/packages/web3-wrapper/src/web3_wrapper.ts @@ -291,7 +291,6 @@ export class Web3Wrapper { * @returns Signature string (might be VRS or RSV depending on the Signer) */ public async signMessageAsync(address: string, message: string): Promise { - assert.isETHAddressHex('address', address); assert.isETHAddressHex('address', address); assert.isString('message', message); // TODO: Should this be stricter? Hex string? const signData = await this._sendRawPayloadAsync({ -- cgit From 0a976a3fb8792b83eaae621c0c78607c90344b8e Mon Sep 17 00:00:00 2001 From: Amir Bandeali Date: Wed, 18 Jul 2018 13:31:29 -0700 Subject: Get actual gasPrice from transaction instead of setting default --- packages/web3-wrapper/src/web3_wrapper.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'packages/web3-wrapper/src') diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts index 883a99bb4..dd35e2094 100644 --- a/packages/web3-wrapper/src/web3_wrapper.ts +++ b/packages/web3-wrapper/src/web3_wrapper.ts @@ -14,6 +14,7 @@ import { Provider, RawLogEntry, TraceParams, + Transaction, TransactionReceipt, TransactionReceiptWithDecodedLogs, TransactionTrace, @@ -220,6 +221,19 @@ export class Web3Wrapper { } return transactionReceipt; } + /** + * Retrieves the transaction data for a given transaction + * @param txHash Transaction hash + * @returns The raw transaction data + */ + public async getTransactionByHashAsync(txHash: string): Promise { + assert.isHexString('txHash', txHash); + const transaction = await this._sendRawPayloadAsync({ + method: 'eth_getTransactionByHash', + params: [txHash], + }); + return transaction; + } /** * Retrieves an accounts Ether balance in wei * @param owner Account whose balance you wish to check -- cgit