Skip to content

Commit

Permalink
Update x/crosschain/keeper/msg_server_refund_aborted_tx.go
Browse files Browse the repository at this point in the history
Co-authored-by: Lucas Bertrand <[email protected]>
  • Loading branch information
kingpinXD and lumtis authored Feb 12, 2024
1 parent 8efd398 commit 753a18d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions x/crosschain/keeper/msg_server_refund_aborted_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,11 @@ func (k msgServer) RefundAbortedCCTX(goCtx context.Context, msg *types.MsgRefund
return &types.MsgRefundAbortedCCTXResponse{}, nil
}

// Set the proper refund address.
// GetRefundAddress gets the proper refund address.
// For BTC sender chain the refund address is the one provided in the message in the RefundAddress field.
// For EVM chain with coin type ERC20 the refund address is the sender , but can be overridden by the RefundAddress field in the message.
// For EVM chain with coin type Zeta the refund address is the tx origin, but can be overridden by the RefundAddress field in the message.
// For EVM chain with coin type Gas the refund address is the tx origin, but can be overridden by the RefundAddress field in the message.

func GetRefundAddress(refundAddress string) (ethcommon.Address, error) {
// make sure a separate refund address is provided for a bitcoin chain as we cannot refund to tx origin or sender in this case
if refundAddress == "" {
Expand Down

0 comments on commit 753a18d

Please sign in to comment.