aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web3-wrapper/src/web3_wrapper.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/web3-wrapper/src/web3_wrapper.ts')
-rw-r--r--packages/web3-wrapper/src/web3_wrapper.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts
index 3ba153680..56877fef3 100644
--- a/packages/web3-wrapper/src/web3_wrapper.ts
+++ b/packages/web3-wrapper/src/web3_wrapper.ts
@@ -23,7 +23,13 @@ import {
import * as _ from 'lodash';
import { marshaller } from './marshaller';
-import { BlockWithoutTransactionDataRPC, BlockWithTransactionDataRPC, NodeType, Web3WrapperErrors } from './types';
+import {
+ BlockWithoutTransactionDataRPC,
+ BlockWithTransactionDataRPC,
+ NodeType,
+ TransactionRPC,
+ Web3WrapperErrors,
+} from './types';
import { utils } from './utils';
const BASE_TEN = 10;
@@ -228,10 +234,11 @@ export class Web3Wrapper {
*/
public async getTransactionByHashAsync(txHash: string): Promise<Transaction> {
assert.isHexString('txHash', txHash);
- const transaction = await this.sendRawPayloadAsync<Transaction>({
+ const transactionRpc = await this.sendRawPayloadAsync<TransactionRPC>({
method: 'eth_getTransactionByHash',
params: [txHash],
});
+ const transaction = marshaller.unmarshalTransaction(transactionRpc);
return transaction;
}
/**