Skip to content

fix: Fixed a bug in the command line parsing of the "send-ft" command.#592

Merged
r-near merged 2 commits into
mainfrom
bug-command-send-ft
May 28, 2026
Merged

fix: Fixed a bug in the command line parsing of the "send-ft" command.#592
r-near merged 2 commits into
mainfrom
bug-command-send-ft

Conversation

@FroVolod

Copy link
Copy Markdown
Collaborator

This command had an invalid parameter (send-at-command)

near tokens fro_volod.testnet send-ft usdn.testnet send-ft-command volodymyr.testnet '10 usn' memo '' network-config testnet-fastnear

The cli command is now fixed.

near tokens fro_volod.testnet send-ft usdn.testnet volodymyr.testnet '10 usn' memo '' network-config testnet-fastnear 

@FroVolod FroVolod requested a review from a team as a code owner May 13, 2026 07:07
@github-project-automation github-project-automation Bot moved this to NEW❗ in DevTools May 13, 2026
@FroVolod

Copy link
Copy Markdown
Collaborator Author

@race-of-sloths

@race-of-sloths

race-of-sloths commented May 13, 2026

Copy link
Copy Markdown

@FroVolod Thank you for your contribution! Your pull request is now a part of the Race of Sloths!
Do you want to apply for monthly streak? Get 8+ score for a single PR this month and receive boost for race-of-sloths!

Shows inviting banner with latest news.

Shows profile picture for the author of the PR

Current status: stale

This pull request was removed from the race, but you can include it again with @race-of-sloths include command

What is the Race of Sloths

Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow

For contributors:

  • Tag @race-of-sloths inside your pull requests
  • Wait for the maintainer to review and score your pull request
  • Check out your position in the Leaderboard
  • Keep weekly and monthly streaks to reach higher positions
  • Boast your contributions with a dynamic picture of your Profile

For maintainers:

  • Score pull requests that participate in the Race of Sloths and receive a reward
  • Engage contributors with fair scoring and fast responses so they keep their streaks
  • Promote the Race to the point where the Race starts promoting you
  • Grow the community of your contributors

Feel free to check our website for additional details!

Bot commands
  • For contributors
    • Include a PR: @race-of-sloths include to enter the Race with your PR
  • For maintainers:
    • Invite contributor @race-of-sloths invite to invite the contributor to participate in a race or include it, if it's already a runner.
    • Assign points: @race-of-sloths score [1/2/3/5/8/13] to award points based on your assessment.
    • Reject this PR: @race-of-sloths exclude to send this PR back to the drawing board.
    • Exclude repo: @race-of-sloths pause to stop bot activity in this repo until @race-of-sloths unpause command is called

@race-of-sloths

Copy link
Copy Markdown

❌ PR inactive

This PR has been inactive for two weeks. It's now marked as stale.

Tip

If you think it's a mistake, you can restart the bot with include command to proceed 🔄

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the tokens ... send-ft (and similarly send-ft-call) CLI argument parsing so users no longer need to provide an extra, invalid intermediate parameter (e.g., send-ft-command) and can instead pass receiver + amount directly after the FT contract.

Changes:

  • Replaced the named_arg wrapper (SendFtCommand / SendFtCallCommand) with subargs to inline the nested arguments into the command line.
  • Moved receiver_account_id input/field into the AmountFt sub-arguments for both send_ft and send_ft_call.
  • Updated the interactive-clap context wiring accordingly (AmountFt now derives from FtContractContext).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/commands/tokens/send_ft/mod.rs Flattens send-ft argument structure by removing the extra named-arg command layer.
src/commands/tokens/send_ft/amount_ft.rs Adds receiver_account_id to the AmountFt args and updates context plumbing to match the flattened CLI.
src/commands/tokens/send_ft_call/mod.rs Applies the same CLI-flattening approach to send-ft-call.
src/commands/tokens/send_ft_call/amount_ft.rs Adds receiver_account_id to AmountFt and updates context plumbing for send-ft-call.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@r-near r-near enabled auto-merge (squash) May 28, 2026 17:34
@r-near r-near merged commit eabef9c into main May 28, 2026
13 checks passed
@r-near r-near deleted the bug-command-send-ft branch May 28, 2026 17:34
@github-project-automation github-project-automation Bot moved this from NEW❗ to Shipped 🚀 in DevTools May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Shipped 🚀

Development

Successfully merging this pull request may close these issues.

5 participants