Skip to content

Commit

Permalink
fix(crosschain): set cctx as aborted if outbound fails and sender i…
Browse files Browse the repository at this point in the history
…s zeta chain (#1107)

* add condition

* update comment
  • Loading branch information
lumtis authored Sep 12, 2023
1 parent 3494b0f commit f3c6d6e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f3c6d6e

Please sign in to comment.