Skip to content

Commit

Permalink
Merge pull request #389 from bnb-chain/fix/panic_issue_in_publish_und…
Browse files Browse the repository at this point in the history
…elegate_event

fix: publish ChainUndelegate event
  • Loading branch information
unclezoro authored Mar 5, 2024
2 parents 30e9cba + 16e1d71 commit cf3ab19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

##v0.26.9
* [fix] [\#389] (https://github.com/bnb-chain/bnc-cosmos-sdk/pull/389) fix: publish ChainUndelegate event
* [fix] [\#390] (https://github.com/bnb-chain/bnc-cosmos-sdk/pull/390) fix: ledger sig conversion

##v0.26.8
* [fix] [\#388] (https://github.com/bnb-chain/bnc-cosmos-sdk/pull/388) fix: publish completed UnbondingDelegation events to kafka in EndBlock

Expand Down
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

0 comments on commit cf3ab19

Please sign in to comment.