on master help sign in
fix: correctly parse funding request values
commit8ab98a73e59ce401327d828f6bb6df33e268f1af authorMatt Condon (shrugs) <mattgcondon@gmail.com> dateWed 26 Jun 2019, 12:01 (7 years ago) parent04765bb
2 files changed+9−3
src/lib/tank.js+6−1 src/views/Invite/InviteEmail.js+3−2
src/lib/tank.js+6−1
@@ -115,7 +115,12 @@ async function waitForBalance(
115115 resolve();
116116 } else {
117117 if (balance !== oldBalance) {
118− askForFunding(address, minBalance, balance);
118+ // TODO: minBalance is a `number` type
119+ // but we want to display ETH, which will never accept a number
120+ // but instead wants string or BN/BigNumber.
121+ // this will be heavily refactored to correctly do BN math, but until
122+ // then we'll manually convert this number to an integer string
123+ askForFunding(address, minBalance.toFixed(), balance);
119124 }
120125 setTimeout(checkForBalance, 13000);
121126 }
src/views/Invite/InviteEmail.js+3−2
@@ -486,8 +486,9 @@ export default function InviteEmail() {
486486 <Grid.Item full>
487487 <Highlighted>
488488 Your ownership address {needFunds.address} needs at least{' '}
489− {fromWei(needFunds.minBalance)}ETH and currently has{' '}
490− {fromWei(needFunds.balance)}.
489+ {fromWei(needFunds.minBalance)} ETH and currently has{' '}
490+ {fromWei(needFunds.balance)} ETH. Waiting until the account has
491+ enough funds.
491492 </Highlighted>
492493 </Grid.Item>
493494 )}