Skip to content

Commit

Permalink
nit: prebuild the token array. (#6729)
Browse files Browse the repository at this point in the history
Co-authored-by: Carlos Rodriguez <[email protected]>
  • Loading branch information
DimitrisJim and Carlos Rodriguez authored Jul 1, 2024
1 parent ff10d6b commit ccd32c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/apps/transfer/keeper/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (k Keeper) sendTransfer(
return 0, errorsmod.Wrap(channeltypes.ErrChannelCapabilityNotFound, "module does not own channel capability")
}

var tokens []types.Token
tokens := make([]types.Token, 0, len(coins))

for _, coin := range coins {
token, err := k.tokenFromCoin(ctx, coin)
Expand Down

0 comments on commit ccd32c5

Please sign in to comment.