tank: throw error if no signed txs supplied
commita1cc13dabca7dda893089b599dec5521dd749482
authorFang <git@fang.io>
dateMon 3 Feb 2020, 18:58 (7 years ago)
parent463b1d9
src/lib/tank.js+4
@@ -56,6 +56,10 @@ const ensureFundsFor = async (
5656 askForFunding,
5757 gotFunding
5858) => {
59+ if (typeof signedTxs !== 'object' || signedTxs.length === 0) {
60+ throw new Error('tank: no transactions provided!');
61+ }
62+
5963 const balance = toBN(await web3.eth.getBalance(address));
6064 cost = toBN(cost);
6165