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

[Bug] duplicated short options, -r, in make_offer CLI causing missing option error. #14874

Closed
kimsk opened this issue Mar 22, 2023 · 2 comments · Fixed by #15182
Closed

[Bug] duplicated short options, -r, in make_offer CLI causing missing option error. #14874

kimsk opened this issue Mar 22, 2023 · 2 comments · Fixed by #15182
Assignees
Labels

Comments

@kimsk
Copy link
Contributor

kimsk commented Mar 22, 2023

What happened?

-r is already used for --request but it's now also used for --reuse, Reuse existing address for the change., and this causes make_offer error, Error: Missing option '-r' / '--request'.

@click.option(
"-r",
"--request",
help="A wallet id of an asset to receive and the amount you wish to receive (formatted like wallet_id:amount)",
required=True,
multiple=True,
)
@click.option("-p", "--filepath", help="The path to write the generated offer file to", required=True)
@click.option(
"-m", "--fee", help="A fee to add to the offer when it gets taken, in XCH", default="0", show_default=True
)
@click.option(
"-r",
"--reuse",
help="Reuse existing address for the offer.",

Version

1.7.1-rc3

What platform are you using?

macOS

What ui mode are you using?

CLI

Relevant log output

❯ chia wallet make_offer -f $maker_fp -r 1:0.08 -o 2:15.898 -p offer1.offer
Usage: chia wallet make_offer [OPTIONS]
Try 'chia wallet make_offer -h' for help.

Error: Missing option '-r' / '--request'.
@kimsk kimsk added the bug Something isn't working label Mar 22, 2023
@kimsk
Copy link
Contributor Author

kimsk commented Mar 22, 2023

The work around is to use --request instead of -r.

@MumfMeisterT
Copy link

#15004

yyolk added a commit to yyolk/chia-blockchain that referenced this issue May 3, 2023
I opted to change the short option for `--request` to `-R` and for consistency give `-O` as the short option for `--offer`

- `-r, --reuse` is option for more than one command, so I thought it would make more sense to give lowercase `-r` to `reuse` so I opted to go with `-R` for the short option 
- `-o` is also used as the short option for `--offset` and `--override`, although it doesn't have any conflicts for `make_offer` it made sense to change it to be consistent with the short option that is often used in tandem

https://github.com/Chia-Network/chia-docs/blob/main/docs/guides/tutorials/offers-cli.md should be updated if this is merged
yyolk added a commit to yyolk/chia-blockchain that referenced this issue May 4, 2023
with feedback from Chia-Network#15182
- drop short option, `-r`, everywhere where `--reuse` is an option to `chia wallet` commands
yyolk added a commit to yyolk/chia-docs that referenced this issue May 4, 2023
drop `-r`, reflecting Chia-Network/chia-blockchain#15182 change to bug Chia-Network/chia-blockchain#14874 with conflicting options on `reuse` and `request` for `make_offer_cmd`, making it consistent across all wallet commands wherever `reuse` is used
wallentx pushed a commit that referenced this issue May 5, 2023
a potential solution to #14874

with feedback from #15182
- drop short option, `-r`, everywhere where `--reuse` is an option to `chia wallet` commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants