Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #387 +/- ##
==========================================
+ Coverage 59.63% 59.78% +0.14%
==========================================
Files 25 25
Lines 4544 4550 +6
==========================================
+ Hits 2710 2720 +10
+ Misses 1834 1830 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tvpeter
left a comment
There was a problem hiding this comment.
you can also improve the PR title to something like:
docs(readme): document env vars accepted by wallet config
Thank you.
eb9536d ci: make tracing optional, drop cli-table (Vadim Anufriev) 22a01a3 refactor(payjoin): return session history as JSON (Vadim Anufriev) Pull request description: ### Description The `--no-default-features` build and clippy jobs are red on every open PR, including Markdown-only ones (#386, #387). `cli-table`, `tracing` and `tracing-subscriber` are unused there, and recent cargo flags that ([`unused_dependencies`](https://doc.rust-lang.org/cargo/reference/lints.html#unused_dependencies), warn by default) while the workflow passes `build-warnings: deny`. `cli-table` is dropped entirely, as @tvpeter suggested: its last user, the payjoin session history, now returns JSON like the rest of the module. `payjoin history` on `master`: ``` +------------+-----------------+---------------------+-------------------------------+ | Session ID | Sender/Receiver | Completed At | Status | +------------+-----------------+---------------------+-------------------------------+ | 1 | Receiver | Not Completed | Waiting for original proposal | +------------+-----------------+---------------------+-------------------------------+ | 2 | Receiver | 2026-11-13 17:50:42 | Session cancelled | +------------+-----------------+---------------------+-------------------------------+ ``` and on this branch: ```json { "sessions": [ { "id": "1", "role": "Receiver", "status": "Waiting for original proposal", "completed_at": null }, { "id": "2", "role": "Receiver", "status": "Session cancelled", "completed_at": "2026-11-13 18:34:22" } ] } ``` ### Notes to the reviewers An active session now reports `"completed_at": null` instead of the string `Not Completed`. `tracing` is on `cbf` explicitly, although `cbf` already implies `_payjoin-dependencies`, so cbf logging does not depend on a payjoin-internal feature. `just pre-push` misses this: the lint is cargo's, not rustc's, so `-D warnings` after `--` does not apply. To reproduce: `cargo build --no-default-features --config 'build.warnings="deny"'`. The `SessionHistory` wrapper exists to keep the field order: serializing it directly preserves declaration order, while `json!` would sort the keys alphabetically. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing ACKs for top commit: tvpeter: ACK eb9536d Tree-SHA512: 556923b5466720ea21dca4a7d4a5798e48cf2b317db0fbab68b3b94e20d6b822edab3d57c2a12e97f4b5c90e52ea727ba3770eb952da30423a26958d69a6e5d5
e5df5a8 to
ed7c223
Compare
tvpeter
left a comment
There was a problem hiding this comment.
Thank you @Musab1258 for updating the PR.
Please squash the changes into a single commit.
Thank you.
b252b09 to
5c4505e
Compare
Squashed into a single commit, 5c4505e, and rebased on the current master. Thank you. |
tvpeter
left a comment
There was a problem hiding this comment.
I left a suggestion. Thank you.
The usage synopsis for `wallet config` lists `--rpc-user` and `--rpc-password`, but neither flag exists. The rpc backend takes `--basic-auth <user:password>`, or the path of a cookie file as a positional argument, and the client uses the cookie when one is given. It also shows `--database-type` as optional, but sqlite is a default feature, so the option is required. Most `wallet config` options also have an environment variable counterpart through clap's `env` attribute, but none of the names are documented, so users have to read src/commands.rs to find them. Fix the synopsis, then add a table with each variable, the option it sets and the command or backend that uses it. State that a command line flag takes precedence over its variable, and that the values are saved to `config.toml`, which is what the other wallet commands read. `DATADIR` and `WALLET_NAME` are listed below the table with what each does, since they are not saved as options. Refs: bitcoindevkit#271
5c4505e to
3efea55
Compare
Description
Documentation-only change for the
wallet configsection of the README. Per the discussion on #271, runtime flags and env overrides are no longer planned;config.tomlstays the single source of truth.This PR:
--rpc-userand--rpc-password, which the CLI does not accept. It now shows--basic-auth <user:password>and the optional<cookie>file path, notes that the cookie is used instead of the user and password when both are given, and shows--database-typeas a required option.SERVER_URL,RPC_BASIC_AUTH,COOKIE, etc.), with the option each one sets and where it applies. It also states that flags take precedence over variables and that the values are saved toconfig.toml.Refs #271.
Notes to the reviewers
README.md.env,shortandlongattributes insrc/commands.rs. The cookie-over-basic-auth statement comes fromsrc/client.rs. Two options share-d: the global--datadirandwallet config --database-type.wallet config: values are saved toconfig.toml, and later commands read that file.DATADIRandWALLET_NAMEare mentioned below the table instead, because they are not saved.Checklists
All Submissions:
cargo fmtandcargo clippybefore committing.