on master help sign in
tank: throw error if no signed txs supplied
a1cc13dFang
src/lib/tank.js+4
@@ -56,6 +56,10 @@ const ensureFundsFor = async (
56 askForFunding,
56 askForFunding,
57 gotFunding
57 gotFunding
58) => {
58) => {
59+ if (typeof signedTxs !== 'object' || signedTxs.length === 0) {
60+ throw new Error('tank: no transactions provided!');
61+ }
62+
59 const balance = toBN(await web3.eth.getBalance(address));
63 const balance = toBN(await web3.eth.getBalance(address));
60 cost = toBN(cost);
64 cost = toBN(cost);
61
65