Skip to content

Commit

Permalink
fix: publish ChainUndelegateEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
j75689 committed Mar 1, 2024
1 parent eeced6c commit ff03d39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions x/stake/handler_sidechain.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,16 +461,17 @@ func handleMsgSideChainUndelegate(ctx sdk.Context, msg MsgSideChainUndelegate, k

// publish undelegate event
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,
}
Expand Down

1 comment on commit ff03d39

@Benz19933
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I

Please sign in to comment.