Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
handle getBraveryProperties error
Browse files Browse the repository at this point in the history
g1250
if a wallet is under creation, but not yet creating,
`getBraveryProperties` should not be invoked.

fixes #4421

auditor: @ayumi
  • Loading branch information
mrose17 committed Oct 4, 2016
1 parent d514e55 commit 666bd9f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -1245,9 +1245,15 @@ var getPaymentInfo = () => {
}

var setPaymentInfo = (amount) => {
var bravery

if (!client) return

var bravery = client.getBraveryProperties()
try { bravery = client.getBraveryProperties() } catch (ex) {
// wallet being created...

return setTimeout(function () { setPaymentInfo(amount) }, 2 * msecs.second)
}

amount = parseInt(amount, 10)
if (isNaN(amount) || (amount <= 0)) return
Expand Down

0 comments on commit 666bd9f

Please sign in to comment.