From 666bd9f32bc1876f2bfdae25c95844ad528f60ec Mon Sep 17 00:00:00 2001 From: Marshall Rose Date: Tue, 4 Oct 2016 12:46:28 -0700 Subject: [PATCH] handle getBraveryProperties error g1250 if a wallet is under creation, but not yet creating, `getBraveryProperties` should not be invoked. fixes #4421 auditor: @ayumi --- app/ledger.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/ledger.js b/app/ledger.js index 11bf33ad1f6..d843fe958f9 100644 --- a/app/ledger.js +++ b/app/ledger.js @@ -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