Skip to content

Commit

Permalink
chore: use math.LegacyDec for balances
Browse files Browse the repository at this point in the history
  • Loading branch information
freak12techno committed Jun 22, 2024
1 parent be22cf3 commit b8f39be
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/types/tendermint.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package types

import (
"main/pkg/constants"
"main/pkg/utils"
"time"

"cosmossdk.io/math"
Expand Down Expand Up @@ -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,
}
}
Expand Down

0 comments on commit b8f39be

Please sign in to comment.