forked from LBRYCommunity/lbry-sdk
+ convert float to decimal for wallet_send
This commit is contained in:
parent
d4a7dbf805
commit
1098ca0494
1 changed files with 6 additions and 0 deletions
|
@ -2416,6 +2416,12 @@ class Daemon(AuthJSONRPCServer):
|
||||||
raise Exception("Given both an address and a claim id")
|
raise Exception("Given both an address and a claim id")
|
||||||
elif not address and not claim_id:
|
elif not address and not claim_id:
|
||||||
raise Exception("Not given an address or a 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:
|
if amount < 0:
|
||||||
raise NegativeFundsError()
|
raise NegativeFundsError()
|
||||||
elif not amount:
|
elif not amount:
|
||||||
|
|
Loading…
Reference in a new issue