Repository navigation
fix(cli): name each candidate's environment when --env is not given - #77
Merged
thebrandonlucas merged 1 commit intoOct 21, 2026
Conversation
Without --env, the wallet shortlist for a BOLT11 send lists the whole organization, but its pasted flags and quote command named no environment, so the payment or quote failed with "Exactly one --env is required". Each candidate now adds its wallet's own --env when the scope selects none, and keeps a given --env. An invoice with a BOLT11 prefix but an unreadable amount no longer reads as missing the prefix, and the no-candidate hint names at most five excluded wallets and counts the rest, which --json still lists. Refs #34
This was referenced Oct 21, 2026
tee8z
approved these changes
Oct 21, 2026
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.
Stack
One stack, merged bottom up:
master)wallets list --all-orgs(base this branch)Refs #34
Why a separate PR
These fixes answer tee8z's review of #73 (
ed53d14). Amended into #73, they would take its diff to about 1,140 changed lines, over the repository's 1,000-line limit (AGENTS.md). So they are stacked directly on #73, and #73 is unchanged ated53d14.Changes
--env, the candidate flags omit the environment, so the pasted command fails withExactly one --env is requiredenvironment_idas--env(api::scope_flags_in). A given--envis kept.quotecommand has the same gap: quotes live under/organizations/{org}/environments/{env}/quotes--envtoo.lnbc1p1qqq) reads as "does not start with a BOLT11 prefix"excluded").--jsonstill lists every wallet.The
insufficient_balancefinding was already fixed in #73 ated53d14.Tests
a_bolt11_send_without_an_environment_names_each_candidates_environment, runs a send with--organd no--env. It checks that the listing sends noenvironment_id, and that the candidate's flags are--wallet ID --org ORG --env ENV.--env, the candidate's flags and quote command name the wallet's environment.--envis kept.scope_flags_inwith and without a fallback environment.Checks
nix develop:cargo fmt --check,cargo clippy --locked --all-targets -- -D warnings,cargo machete --with-metadata,cargo test --lockedandpython3 scripts/check-coverage.py.wait_for_paymentat 19.60.