diff --git a/x/stake/handler_sidechain.go b/x/stake/handler_sidechain.go index 8cc518bad..f5e0cc22f 100644 --- a/x/stake/handler_sidechain.go +++ b/x/stake/handler_sidechain.go @@ -460,17 +460,19 @@ func handleMsgSideChainUndelegate(ctx sdk.Context, msg MsgSideChainUndelegate, k ) // publish undelegate event + ctx.Logger().Info("publish undelegate event", "ctx.IsDeliverTx()", ctx.IsDeliverTx(), "PbsbServer", k.PbsbServer != nil, "PbsbServer_IsRunning", k.PbsbServer.IsRunning()) if k.PbsbServer != nil && ctx.IsDeliverTx() { + txHash, isFromTx := ctx.Value(baseapp.TxHashKey).(string) event := types.ChainUndelegateEvent{ UndelegateEvent: types.UndelegateEvent{ StakeEvent: types.StakeEvent{ - IsFromTx: true, + IsFromTx: isFromTx, }, Delegator: msg.DelegatorAddr, Validator: msg.ValidatorAddr, Amount: msg.Amount.Amount, Denom: msg.Amount.Denom, - TxHash: ctx.Value(baseapp.TxHashKey).(string), + TxHash: txHash, }, ChainId: msg.SideChainId, }