-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Zero Coins from Parsing #4095
Comments
I'd argue that
Re: it makes sense to not fail on parsing zero (empty) |
How do we about this then @alexanderbez ? |
So under further thought, I think allowing zero coins through |
Can we parametrise the removal? func ParseDecCoin(coinStr string, stripZeroes bool) (coin DecCoin, err error) |
Yeah, good idea @alessio. |
Does |
I'm not sure. I'm honestly tempted to just leave as-is unless a demand for it appears. |
No demand, no need to do it. |
ParseCoins
andParseDecCoins
will currently return an error if a zero (dec) coin is provided as input (via theIsValid
check). Arguably, it's a better dev UX to simply remove all the zero (dec) coins after parsing/sorting and not return an error./cc @jaekwon
For Admin Use
The text was updated successfully, but these errors were encountered: