Skip to content

Commit

Permalink
Merge pull request #9 from stasundr/wei_converter
Browse files Browse the repository at this point in the history
Fix from string
  • Loading branch information
yakud authored Apr 11, 2022
2 parents f79326e + 0733e91 commit 00b3eb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions decimal.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ func (d *Decimal) FromString(value string) (ok bool) {
*d = *NewDecimalZero()
}

if value == "" {
d.value = uint256.NewInt(0)
d.value = uint256.NewInt(0)
if value == "" || value == "0" {
return true
}

Expand Down

0 comments on commit 00b3eb3

Please sign in to comment.