Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing event #372

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading