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 split route message to codec and interface registration #5168

Merged
merged 3 commits into from
May 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions x/poolmanager/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ import (
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgSwapExactAmountIn{}, "osmosis/poolmanager/swap-exact-amount-in", nil)
cdc.RegisterConcrete(&MsgSwapExactAmountOut{}, "osmosis/poolmanager/swap-exact-amount-out", nil)
cdc.RegisterConcrete(&MsgSplitRouteSwapExactAmountIn{}, "osmosis/poolmanager/split-route-swap-exact-amount-in", nil)
p0mvn marked this conversation as resolved.
Show resolved Hide resolved
cdc.RegisterConcrete(&MsgSplitRouteSwapExactAmountOut{}, "osmosis/poolmanager/split-route-swap-exact-amount-out", nil)
Copy link
Member

Choose a reason for hiding this comment

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

cdc.RegisterConcrete has a bug where it would not be able to support sign on ledgers if it is over 40 characters (cref: cosmos/cosmos-sdk#10870), we need to change to a shorter name.

On that note, I think it's time we backport this fix, I can try tackling it once CL audit is finished, but for now, lets use a shorted message name

p0mvn marked this conversation as resolved.
Show resolved Hide resolved
}

func RegisterInterfaces(registry types.InterfaceRegistry) {
registry.RegisterImplementations(
(*sdk.Msg)(nil),
&MsgSwapExactAmountIn{},
&MsgSwapExactAmountOut{},
&MsgSplitRouteSwapExactAmountIn{},
&MsgSplitRouteSwapExactAmountOut{},
)
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}
Expand Down