From 75403992d5b91f00256bfe214adef34375ce80ec Mon Sep 17 00:00:00 2001 From: Rachel Rybarczyk Date: Fri, 1 Jul 2022 22:25:07 +0000 Subject: [PATCH] Convert Decimal to float, then round to prevent InvalidOperation err --- bitcoinrpc/authproxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoinrpc/authproxy.py b/bitcoinrpc/authproxy.py index abebe4b..1842e2f 100644 --- a/bitcoinrpc/authproxy.py +++ b/bitcoinrpc/authproxy.py @@ -74,7 +74,7 @@ def __repr__(self): def EncodeDecimal(o): if isinstance(o, decimal.Decimal): - return float(round(o, 8)) + return round(float(o), 8) raise TypeError(repr(o) + " is not JSON serializable") class AuthServiceProxy(object):