Skip to content

Commit

Permalink
map on refundPacketToken
Browse files Browse the repository at this point in the history
  • Loading branch information
codehans committed Jul 10, 2023
1 parent fa20a20 commit 6b3e3e4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/apps/transfer/keeper/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,12 @@ func (k Keeper) refundPacketToken(ctx sdk.Context, packet channeltypes.Packet, d
if types.SenderChainIsSource(packet.GetSourcePort(), packet.GetSourceChannel(), data.Denom) {
// unescrow tokens back to sender
escrowAddress := types.GetEscrowAddress(packet.GetSourcePort(), packet.GetSourceChannel())

prefix := k.GetSlashPrefix(ctx)
if prefix != "" && strings.HasPrefix(token.Denom, prefix+":") {
token.Denom = strings.ReplaceAll(token.Denom, ":", "/")
}

return k.unescrowToken(ctx, escrowAddress, sender, token)
}

Expand Down

0 comments on commit 6b3e3e4

Please sign in to comment.