From f3c6d6e7f63d00382a6383ff8c995a3cfc354039 Mon Sep 17 00:00:00 2001 From: Lucas Bertrand Date: Tue, 12 Sep 2023 22:03:30 +0200 Subject: [PATCH] fix(`crosschain`): set cctx as aborted if outbound fails and sender is zeta chain (#1107) * add condition * update comment --- x/crosschain/keeper/keeper_cross_chain_tx_vote_outbound_tx.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/crosschain/keeper/keeper_cross_chain_tx_vote_outbound_tx.go b/x/crosschain/keeper/keeper_cross_chain_tx_vote_outbound_tx.go index d100f6772a..42d01988dd 100644 --- a/x/crosschain/keeper/keeper_cross_chain_tx_vote_outbound_tx.go +++ b/x/crosschain/keeper/keeper_cross_chain_tx_vote_outbound_tx.go @@ -151,7 +151,8 @@ func (k msgServer) VoteOnObservedOutboundTx(goCtx context.Context, msg *types.Ms newStatus := cctx.CctxStatus.Status.String() EmitOutboundSuccess(tmpCtx, msg, oldStatus.String(), newStatus, cctx) case observerTypes.BallotStatus_BallotFinalized_FailureObservation: - if msg.CoinType == common.CoinType_Cmd { + if msg.CoinType == common.CoinType_Cmd || cctx.InboundTxParams.SenderChainId == common.ZetaChain().ChainId { + // if the cctx is of coin type cmd or the sender chain is zeta chain, then we do not revert, the cctx is aborted cctx.CctxStatus.ChangeStatus(types.CctxStatus_Aborted, "") } else { switch oldStatus {