on master help sign in
Better tank printfs
6738c14Fang
src/lib/tank.js+2−2
@@ -71,7 +71,7 @@ const ensureFundsFor = async (
71
71
72 const res = await fundTransactions(signedTxs);
72 const res = await fundTransactions(signedTxs);
73 if (!res.success) {
73 if (!res.success) {
74− throw new Error('tank: request rejected');
74+ throw new Error('tank: request rejected', res);
75 } else {
75 } else {
76 await waitForTransactionConfirm(web3, res.txHash);
76 await waitForTransactionConfirm(web3, res.txHash);
77 let newBalance = await web3.eth.getBalance(address);
77 let newBalance = await web3.eth.getBalance(address);
@@ -88,7 +88,7 @@ const ensureFundsFor = async (
88 await waitForBalance(web3, address, cost, askForFunding, gotFunding);
88 await waitForBalance(web3, address, cost, askForFunding, gotFunding);
89 }
89 }
90 } else {
90 } else {
91− console.log('tank: already have sufficient funds');
91+ console.log('tank: already have sufficient funds', cost, address, balance);
92 }
92 }
93 return false;
93 return false;
94};
94};