Repository navigation
fix(apps/transfer): require all transfer CLI arguments - #9153
Open
zakazaka95 wants to merge 1 commit into
Open
zakazaka95 wants to merge 1 commit into
zakazaka95 wants to merge 1 commit into
Conversation
Reject incomplete transfer commands before accessing the receiver or coin. Exercise both formerly panicking invocations and retain the complete form. Assisted-By: OpenAI Codex Signed-off-by: Zaksans <yyzarijayy@gmail.com>
zakazaka95
marked this pull request as ready for review
November 6, 2026 23:24
|
This PR does not match any of the 1 configured review trigger rule. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
NewTransferTxCmd accepts two or three positional arguments, then RunE unconditionally indexes receiver and coin at args[2] and args[3]. A normal incomplete CLI invocation panics.
Require exactly four positional arguments through Cobra before running transaction logic. Execute the real Cobra command with two and three arguments and verify usage errors without panic. Validate the complete four-argument form remains accepted.
Validation
go test -mod=readonly ./modules/apps/transfer/client/clipasses with this patch.make format,LEDGER_ENABLED=false make build,make lint-docsandmake build-docspass.Checklist
AI assistance: OpenAI Codex was used for the implementation, tests and this description.
Linux validation
Fork validation run passed for exact source commit
156e5a164c335e9e5eff80c986ae5ca18e7fd2ca. Checks: Build and lint PR 9153; Documentation PR 9153; Unit tests PR 9153.