on master help sign in
Merge pull request #331 from urbit/mino-tanking
ace9aeeFang
src/lib/constants.js+1−1
@@ -31,7 +31,7 @@ const GAS_LIMITS = {
31 REJECT: 200000, //NOTE no samples
31 REJECT: 200000, //NOTE no samples
32 DETACH: 200000, //NOTE no samples
32 DETACH: 200000, //NOTE no samples
33 //
33 //
34− GIFT_PLANET: 400000, //NOTE low sample size
34+ GIFT_PLANET: 420000, //NOTE low sample size
35 //
35 //
36 SEND_ETH: 21000,
36 SEND_ETH: 21000,
37 //
37 //
src/lib/tank.js+2−2
@@ -86,7 +86,7 @@ const ensureFundsFor = async (
86
86
87 await waitForTransactionConfirm(web3, res.txHash);
87 await waitForTransactionConfirm(web3, res.txHash);
88
88
89− const newBalance = await web3.eth.getBalance(address);
89+ const newBalance = toBN(await web3.eth.getBalance(address));
90
90
91 // sanity check
91 // sanity check
92 if (newBalance.lt(cost)) {
92 if (newBalance.lt(cost)) {
@@ -99,7 +99,7 @@ const ensureFundsFor = async (
99
99
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`
103 );
103 );
104 return true;
104 return true;
105 } catch (error) {
105 } catch (error) {