fix: making sum() of funds iteration did not work on non-numeric

This commit is contained in:
Michael Schmoock
2019-09-02 13:58:23 +02:00
committed by Christian Decker
parent 477bdd8f61
commit 39bc7b6deb

View File

@@ -451,7 +451,7 @@ node! Be prepared to lose your funds (but please report a bug if you do!)
if len(funds) == 0:
r += "INCOMPLETE: No bitcoins yet. Try 'helpme funds'"
else:
funds = Millisatoshi(sum([funds['amount_msat'] for f in funds
funds = Millisatoshi(1000 * sum([f['value'] for f in funds
if f['status'] == 'confirmed']))
r += "COMPLETE ({} a.k.a {})".format(funds, funds.to_btc_str())
stages['funds'] = True