-
Notifications
You must be signed in to change notification settings - Fork 641
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
refactor: adding check if channel exists before register counterparty #1339
Changes from 4 commits
803862f
cee78ba
248c4d6
cbaef64
8bee2b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,18 +101,18 @@ func NewPayPacketFeeAsyncTxCmd() *cobra.Command { | |
// NewRegisterCounterpartyAddress returns the command to create a MsgRegisterCounterpartyAddress | ||
func NewRegisterCounterpartyAddress() *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "register-counterparty [address] [counterparty-address] [channel-id]", | ||
Use: "register-counterparty [address] [counterparty-address] [channel-id] [port-id]", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be more consistent with the rest of CLIs if the order of the arguments is reversed, so |
||
Short: "Register a counterparty relayer address on a given channel.", | ||
Long: strings.TrimSpace(`Register a counterparty relayer address on a given channel.`), | ||
Example: fmt.Sprintf("%s tx ibc-fee register-counterparty cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh osmo1v5y0tz01llxzf4c2afml8s3awue0ymju22wxx2 channel-0", version.AppName), | ||
Args: cobra.ExactArgs(3), | ||
Example: fmt.Sprintf("%s tx ibc-fee register-counterparty cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh osmo1v5y0tz01llxzf4c2afml8s3awue0ymju22wxx2 channel-0 transfer", version.AppName), | ||
Args: cobra.ExactArgs(4), | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
clientCtx, err := client.GetClientTxContext(cmd) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
msg := types.NewMsgRegisterCounterpartyAddress(args[0], args[1], args[2]) | ||
msg := types.NewMsgRegisterCounterpartyAddress(args[0], args[1], args[2], args[3]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And I think this is wrong because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch. |
||
|
||
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) | ||
}, | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changelog entry isn't super necessary since we haven't release ics29, but guess it doesn't hurt