-
Notifications
You must be signed in to change notification settings - Fork 751
Closed
Labels
20-transfertype: featureNew features, sub-features or integrationsNew features, sub-features or integrations
Description
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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
20-transfertype: featureNew features, sub-features or integrationsNew features, sub-features or integrations