Skip to content

Commit

Permalink
Merge pull request #398 from BoostryJP/fix/#397
Browse files Browse the repository at this point in the history
fix: Correct floating-point arithmetic errors
  • Loading branch information
YoshihitoAso authored Sep 29, 2022
2 parents f3b1c4f + bfdacb0 commit 7c1a108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/model/blockchain/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 7c1a108

Please sign in to comment.