Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions math/dec.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,15 @@ func NewDecFinite(coeff int64, exp int32) Dec {
return res
}

// NewDec takes a cosmos `sdkmath.Int` and turns it into a Dec
// NewDecFromSdkInt takes a cosmos `sdkmath.Int` and turns it into a Dec
// it converts via strings and throws an error if the string
// is unable to be parsed
func NewDecFromSdkInt(x sdkmath.Int) (Dec, error) {
strRep := x.String()
return NewDecFromString(strRep)
}

// NewDec takes a cosmos `sdkmath.LegacyDec` and turns it into a Dec
// NewDecFromSdkLegacyDec takes a cosmos `sdkmath.LegacyDec` and turns it into a Dec
// it converts via strings and throws an error if the string
// is unable to be parsed
func NewDecFromSdkLegacyDec(x sdkmath.LegacyDec) (Dec, error) {
Expand Down