@@ -322,15 +322,15 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, data t
322
322
// OnAcknowledgementPacket responds to the success or failure of a packet
323
323
// acknowledgement written on the receiving chain. If the acknowledgement
324
324
// was a success then nothing occurs. If the acknowledgement failed, then
325
- // the sender is refunded their tokens using the refundPacketToken function.
325
+ // the sender is refunded their tokens using the refundPacketTokens function.
326
326
func (k Keeper ) OnAcknowledgementPacket (ctx sdk.Context , packet channeltypes.Packet , data types.FungibleTokenPacketDataV2 , ack channeltypes.Acknowledgement ) error {
327
327
switch ack .Response .(type ) {
328
328
case * channeltypes.Acknowledgement_Result :
329
329
// the acknowledgement succeeded on the receiving chain so nothing
330
330
// needs to be executed and no error needs to be returned
331
331
return nil
332
332
case * channeltypes.Acknowledgement_Error :
333
- return k .refundPacketToken (ctx , packet , data )
333
+ return k .refundPacketTokens (ctx , packet , data )
334
334
default :
335
335
return errorsmod .Wrapf (ibcerrors .ErrInvalidType , "expected one of [%T, %T], got %T" , channeltypes.Acknowledgement_Result {}, channeltypes.Acknowledgement_Error {}, ack .Response )
336
336
}
@@ -339,14 +339,14 @@ func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Pac
339
339
// OnTimeoutPacket refunds the sender since the original packet sent was
340
340
// never received and has been timed out.
341
341
func (k Keeper ) OnTimeoutPacket (ctx sdk.Context , packet channeltypes.Packet , data types.FungibleTokenPacketDataV2 ) error {
342
- return k .refundPacketToken (ctx , packet , data )
342
+ return k .refundPacketTokens (ctx , packet , data )
343
343
}
344
344
345
- // refundPacketToken will unescrow and send back the tokens back to sender
345
+ // refundPacketTokens will unescrow and send back the tokens back to sender
346
346
// if the sending chain was the source chain. Otherwise, the sent tokens
347
347
// were burnt in the original send so new tokens are minted and sent to
348
348
// the sending address.
349
- func (k Keeper ) refundPacketToken (ctx sdk.Context , packet channeltypes.Packet , data types.FungibleTokenPacketDataV2 ) error {
349
+ func (k Keeper ) refundPacketTokens (ctx sdk.Context , packet channeltypes.Packet , data types.FungibleTokenPacketDataV2 ) error {
350
350
// NOTE: packet data type already checked in handler.go
351
351
352
352
for _ , token := range data .Tokens {
0 commit comments