From b8f39be9c9b059d928a066a303e2ad617e417d33 Mon Sep 17 00:00:00 2001 From: Sergey Date: Sun, 23 Jun 2024 00:30:32 +0300 Subject: [PATCH] chore: use math.LegacyDec for balances --- pkg/types/tendermint.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/types/tendermint.go b/pkg/types/tendermint.go index 2ac7904..e782249 100644 --- a/pkg/types/tendermint.go +++ b/pkg/types/tendermint.go @@ -2,7 +2,6 @@ package types import ( "main/pkg/constants" - "main/pkg/utils" "time" "cosmossdk.io/math" @@ -69,13 +68,13 @@ type BalancesResponse struct { } type ResponseAmount struct { - Amount string `json:"amount"` - Denom string `json:"denom"` + Amount math.LegacyDec `json:"amount"` + Denom string `json:"denom"` } func (a ResponseAmount) ToAmount() Amount { return Amount{ - Amount: utils.StrToFloat64(a.Amount), + Amount: a.Amount.MustFloat64(), Denom: a.Denom, } }