Skip to content

Commit

Permalink
handle nan amounts
Browse files Browse the repository at this point in the history
  • Loading branch information
djpnewton committed Feb 12, 2021
1 parent 03594e5 commit b599454
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cryptoadvance/specter/server_endpoints/wallets.py
Expand Up @@ -3,6 +3,7 @@
from werkzeug.wrappers import Response
from datetime import datetime
from numbers import Number
from math import isnan
from ..util.tx import decoderawtransaction
from ..util.price_providers import get_price_at

Expand Down Expand Up @@ -545,6 +546,8 @@ def send_new(wallet_alias):
amount = float(request.form["btc_amount_{}".format(i)])
except ValueError:
pass
if isnan(amount):
amount = 0.0
amounts.append(amount)
labels.append(request.form["label_{}".format(i)])
if request.form["label_{}".format(i)] != "":
Expand Down

0 comments on commit b599454

Please sign in to comment.