diff --git a/x/stake/handler_sidechain.go b/x/stake/handler_sidechain.go index 8cc518bad..72f0413fd 100644 --- a/x/stake/handler_sidechain.go +++ b/x/stake/handler_sidechain.go @@ -461,6 +461,7 @@ func handleMsgSideChainUndelegate(ctx sdk.Context, msg MsgSideChainUndelegate, k // publish undelegate event if k.PbsbServer != nil && ctx.IsDeliverTx() { + txHash, _ := ctx.Value(baseapp.TxHashKey).(string) event := types.ChainUndelegateEvent{ UndelegateEvent: types.UndelegateEvent{ StakeEvent: types.StakeEvent{ @@ -470,7 +471,7 @@ func handleMsgSideChainUndelegate(ctx sdk.Context, msg MsgSideChainUndelegate, k Validator: msg.ValidatorAddr, Amount: msg.Amount.Amount, Denom: msg.Amount.Denom, - TxHash: ctx.Value(baseapp.TxHashKey).(string), + TxHash: txHash, }, ChainId: msg.SideChainId, }