@@ -86,7 +86,7 @@ const ensureFundsFor = async (
87 await waitForTransactionConfirm(web3, res.txHash);
87 await waitForTransactionConfirm(web3, res.txHash);
89− const newBalance = await web3.eth.getBalance(address);
89+ const newBalance = toBN(await web3.eth.getBalance(address));
91 // sanity check
91 // sanity check
92 if (newBalance.lt(cost)) {
92 if (newBalance.lt(cost)) {
@@ -99,7 +99,7 @@ const ensureFundsFor = async (
100 console.log(
100 console.log(
101 `tank: funds have confirmed: ${address} now has ` +
101 `tank: funds have confirmed: ${address} now has ` +
102− ` ${newBalance.toString()}wei, up from ${balance.toString()}wei`
102+ `${newBalance.toString()}wei, up from ${balance.toString()}wei`
104 return true;
104 return true;
105 } catch (error) {
105 } catch (error) {