From bfdacb00e64ce313dcec493eb71d8d6111391532 Mon Sep 17 00:00:00 2001 From: YoshihitoAso Date: Thu, 29 Sep 2022 14:18:07 +0900 Subject: [PATCH] fix: Correct floating-point arithmetic errors --- app/model/blockchain/token.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/model/blockchain/token.py b/app/model/blockchain/token.py index d8d214f4..9e059c06 100644 --- a/app/model/blockchain/token.py +++ b/app/model/blockchain/token.py @@ -395,7 +395,7 @@ def update(contract_address: str, raise SendTransactionError(err) if data.interest_rate is not None: - _interest_rate = int(data.interest_rate * 10000) + _interest_rate = int(Decimal(str(data.interest_rate)) * Decimal("10000")) tx = bond_contract.functions.setInterestRate( _interest_rate ).buildTransaction({