Skip to content

Change unused address output to list - #355

Open
emma31-dev wants to merge 3 commits into
bitcoindevkit:masterfrom
emma31-dev:feat/list-multiple-adddresses
Open

emma31-dev wants to merge 3 commits into
bitcoindevkit:masterfrom
emma31-dev:feat/list-multiple-adddresses

Conversation

@emma31-dev

Copy link
Copy Markdown

Description

This change updates the UnusedAddressCommand to return all unused external addresses rather than only the next one. Previously, the command called Wallet::next_unused_address and returned a single AddressResult, which could be misleading if multiple addresses had already been revealed but not yet used. The output type is now ListResult<AddressResult>, populated by iterating over Wallet::list_unused_addresses on the external keychain. This gives users a complete picture of all addresses awaiting use, making the command more useful for wallet inspection and reducing the risk of address reuse caused by incomplete visibility. This pr solves issue #349 opened by me.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

@Ishaan-0706

Copy link
Copy Markdown

i tested this using the cargo test --test cli --features rpc test_new_and_unused_address and test passes
but i thing i noticed that current test only looks for the word "address" so the test doesnt know that the returned value is list or just a single address
so we can update the test cases.
also the keychain -kind flag are you planning to implement it here or later?

@emma31-dev

Copy link
Copy Markdown
Author

@Ishaan-0706 I totally missed that thanks for the feedback I was thinking of just making it into a separate command so it has a separate test. I'll make the change now

@Ishaan-0706

Copy link
Copy Markdown

can i work on that part?
i was looking to contribute some

@emma31-dev

Copy link
Copy Markdown
Author

@Ishaan-0706 sure thing. Thanks for the helping hand.

@emma31-dev
emma31-dev force-pushed the feat/list-multiple-adddresses branch from 0bc8b86 to 5e3b8aa Compare October 26, 2026 09:22
@Ishaan-0706

Copy link
Copy Markdown

@emma31-dev is the work done?

@emma31-dev

Copy link
Copy Markdown
Author

yes i've updated the test. it was a few lines fix i was wondering why u took so long. pull it and test wether its fixed on your end

@emma31-dev

Copy link
Copy Markdown
Author

If you still want to help out work on some of the issues opened by me in the issues tab

@emma31-dev
emma31-dev force-pushed the feat/list-multiple-adddresses branch 2 times, most recently from 91d6085 to 15ca1cc Compare October 26, 2026 09:32
@Ishaan-0706

Copy link
Copy Markdown

saw your pr on the issue #358 can i work on the test part ?

@emma31-dev
emma31-dev force-pushed the feat/list-multiple-adddresses branch from 15ca1cc to 404d8dc Compare October 26, 2026 09:38
@emma31-dev

Copy link
Copy Markdown
Author

@Ishaan-0706 sure.

@emma31-dev
emma31-dev force-pushed the feat/list-multiple-adddresses branch from 404d8dc to d1779e5 Compare October 26, 2026 09:43

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants