From 1098ca0494ece420c70fc57f69d6d388715a99b8 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Thu, 9 Aug 2018 19:14:56 -0400 Subject: [PATCH] + convert float to decimal for wallet_send --- lbrynet/daemon/Daemon.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lbrynet/daemon/Daemon.py b/lbrynet/daemon/Daemon.py index 7732a4094..f6fd36ec2 100644 --- a/lbrynet/daemon/Daemon.py +++ b/lbrynet/daemon/Daemon.py @@ -2416,6 +2416,12 @@ class Daemon(AuthJSONRPCServer): raise Exception("Given both an address and a claim id") elif not address and not claim_id: raise Exception("Not given an address or a claim id") + + try: + amount = Decimal(str(amount)) + except InvalidOperation: + raise TypeError("Amount does not represent a valid decimal.") + if amount < 0: raise NegativeFundsError() elif not amount: