Skip to content

Commit

Permalink
fix: add missing event
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonberg1997 committed Jan 11, 2024
1 parent 166bea3 commit d6609e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions x/stake/handler_sidechain.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,12 @@ func handleMsgSideChainStakeMigration(ctx sdk.Context, msg MsgSideChainStakeMigr
}
k.PbsbServer.Publish(uEvent)

completedUBDEvent := types.CompletedUBDEvent{
CompUBDs: []types.UnbondingDelegation{ubd},
ChainId: k.DestChainName,
}
k.PbsbServer.Publish(completedUBDEvent)

ctEvent := pubsub.CrossTransferEvent{
ChainId: k.DestChainName,
RelayerFee: types.StakeMigrationRelayFee,
Expand Down
4 changes: 2 additions & 2 deletions x/stake/types/stake_migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ func (msg MsgSideChainStakeMigration) ValidateBasic() sdk.Error {
return sdk.ErrInvalidAddress(fmt.Sprintf("Expected validator address length is %d, actual length is %d", sdk.AddrLen, len(msg.ValidatorSrcAddr)))
}
if msg.ValidatorDstAddr.IsEmpty() {
return sdk.ErrInvalidAddress("operator address is empty")
return sdk.ErrInvalidAddress("smart chain operator address is empty")
}
if msg.DelegatorAddr.IsEmpty() {
return sdk.ErrInvalidAddress("delegator address is empty")
return sdk.ErrInvalidAddress("smart chain beneficiary address is empty")
}
if len(msg.RefundAddr) != sdk.AddrLen {
return sdk.ErrInvalidAddress(fmt.Sprintf("Expected refund address length is %d, actual length is %d", sdk.AddrLen, len(msg.RefundAddr)))
Expand Down

0 comments on commit d6609e9

Please sign in to comment.