diff --git a/x/crosschain/keeper/msg_server_refund_aborted_tx.go b/x/crosschain/keeper/msg_server_refund_aborted_tx.go index 198e3a02c6..33b5160536 100644 --- a/x/crosschain/keeper/msg_server_refund_aborted_tx.go +++ b/x/crosschain/keeper/msg_server_refund_aborted_tx.go @@ -61,7 +61,7 @@ func (k msgServer) RefundAbortedCCTX(goCtx context.Context, msg *types.MsgRefund // Check if aborted amount is available to maintain zeta accounting // NOTE: Need to verify if this check works / is required in athens 3 if cctx.InboundTxParams.CoinType == common.CoinType_Zeta { - err := k.RemoveZetaAbortedAmount(ctx, cctx.GetCurrentOutTxParam().Amount) + err := k.RemoveZetaAbortedAmount(ctx, cctx.InboundTxParams.Amount) if err != nil { return nil, errorsmod.Wrap(types.ErrUnableProcessRefund, err.Error()) } diff --git a/x/crosschain/keeper/refund.go b/x/crosschain/keeper/refund.go index a45f75a2ab..e331d7acba 100644 --- a/x/crosschain/keeper/refund.go +++ b/x/crosschain/keeper/refund.go @@ -58,6 +58,11 @@ func (k Keeper) RefundAmountOnZetaChainGas(ctx sdk.Context, cctx types.CrossChai func (k Keeper) RefundAmountOnZetaChainZeta(ctx sdk.Context, cctx types.CrossChainTx, refundAddress ethcommon.Address) error { // if coin type is Zeta, handle this as a deposit ZETA to zEVM. // deposit the amount to the tx origin instead of receiver as this is a refund + chainID := cctx.InboundTxParams.SenderChainId + // check if chain is supported + if chain := k.zetaObserverKeeper.GetSupportedChainFromChainID(ctx, chainID); chain == nil { + return zetaObserverTypes.ErrSupportedChains + } if cctx.InboundTxParams.Amount.IsNil() || cctx.InboundTxParams.Amount.IsZero() { return errors.New("no amount to refund") }