aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web3-wrapper/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-05 18:34:15 +0800
committerFabio Berger <me@fabioberger.com>2018-07-05 18:34:15 +0800
commit11747c6cf47a2f75d32953c84ccdf66f6f2f70a3 (patch)
tree4cb4fa7fba7ecf49c058b3aba280be94a3416096 /packages/web3-wrapper/src
parent2a7b3aecc3886bb4b699df17a0efef984e633d1f (diff)
downloaddexon-sol-tools-11747c6cf47a2f75d32953c84ccdf66f6f2f70a3.tar
dexon-sol-tools-11747c6cf47a2f75d32953c84ccdf66f6f2f70a3.tar.gz
dexon-sol-tools-11747c6cf47a2f75d32953c84ccdf66f6f2f70a3.tar.bz2
dexon-sol-tools-11747c6cf47a2f75d32953c84ccdf66f6f2f70a3.tar.lz
dexon-sol-tools-11747c6cf47a2f75d32953c84ccdf66f6f2f70a3.tar.xz
dexon-sol-tools-11747c6cf47a2f75d32953c84ccdf66f6f2f70a3.tar.zst
dexon-sol-tools-11747c6cf47a2f75d32953c84ccdf66f6f2f70a3.zip
Make sure from is included in txData
Diffstat (limited to 'packages/web3-wrapper/src')
-rw-r--r--packages/web3-wrapper/src/marshaller.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/web3-wrapper/src/marshaller.ts b/packages/web3-wrapper/src/marshaller.ts
index 7af61752d..e9fd35a11 100644
--- a/packages/web3-wrapper/src/marshaller.ts
+++ b/packages/web3-wrapper/src/marshaller.ts
@@ -74,6 +74,9 @@ export const marshaller = {
return tx;
},
marshalTxData(txData: Partial<TxData>): Partial<TxDataRPC> {
+ if (_.isUndefined(txData.from)) {
+ throw new Error(`txData must include valid 'from' value.`);
+ }
const callTxDataBase = {
...txData,
};