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

Account name for balance command is arg #5666

Closed
wants to merge 1 commit into from

Conversation

patnir
Copy link
Contributor

@patnir patnir commented Nov 21, 2024

Summary

Previously, it was a flag. This didn't conform to the standard we have for other commands like address.

Testing Plan

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference
)? If yes, link a
related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and label it with breaking-change-rpc or breaking-change-sdk.

[ ] Yes

@patnir patnir requested a review from a team as a code owner November 21, 2024 19:07
Previously, it was a flag. This didn't conform to the standard we have for other commands like address.
@patnir patnir force-pushed the rahul/fix-balance-input branch from 8207793 to 82f203e Compare November 21, 2024 19:09
Copy link
Contributor

@hughy hughy left a comment

Choose a reason for hiding this comment

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

I think wallet:balance and wallet:balances are borderline cases as far as the style guide is concerned with flags vs. args:

Flags are preferred to args when there are many inputs, particularly inputs of the same type. They involve a bit more typing, but make the use of the CLI clearer. For example, `ironfish wallet:send` used to accept an argument for the account to use, as well as --to flag to specify the account to send to.

I'm curious whether @mat-if and @NullSoldier considered making this an arg during the CLI audit?

@NullSoldier
Copy link
Contributor

NullSoldier commented Nov 26, 2024

Yeah, our stlye guide does indicate this should be a flag here to be consistent with our wallet commands. The only time the command should take an account as an arg is when the account name is the primary operand such as ironfish wallet:use <account>.

My argument would be that address should be a flag.

@patnir patnir closed this Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants