Make sure from is included in txData

This commit is contained in:
Fabio Berger
2018-07-05 12:34:15 +02:00
parent 2a7b3aecc3
commit 11747c6cf4

View File

@@ -74,6 +74,9 @@ export const marshaller = {
return tx; return tx;
}, },
marshalTxData(txData: Partial<TxData>): Partial<TxDataRPC> { marshalTxData(txData: Partial<TxData>): Partial<TxDataRPC> {
if (_.isUndefined(txData.from)) {
throw new Error(`txData must include valid 'from' value.`);
}
const callTxDataBase = { const callTxDataBase = {
...txData, ...txData,
}; };