We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There are multiple places where we do this type of conversation of a Token:
transferAmount, ok := sdkmath.NewIntFromString(token.Amount) if !ok { return errorsmod.Wrapf(types.ErrInvalidAmount, "unable to parse transfer amount (%s) into math.Int", transferAmount) } coin := sdk.NewCoin(token.Denom.IBCDenom(), transferAmount)
Suggestion is to create a convenience method on Token to convert it to Coin. Something like this perhaps:
func (t Token) ToCoin() (Coin, error)
The text was updated successfully, but these errors were encountered:
Can I get to resolve this one?
Sorry, something went wrong.
sure can @duonghb53, thanks!
duonghb53
Successfully merging a pull request may close this issue.
There are multiple places where we do this type of conversation of a Token:
Suggestion is to create a convenience method on Token to convert it to Coin. Something like this perhaps:
The text was updated successfully, but these errors were encountered: