From 7ece14aca60f50c6ca1b4f083b9e72305f02da53 Mon Sep 17 00:00:00 2001 From: Leonardo Lima Date: Wed, 4 Dec 2024 15:33:45 -0300 Subject: [PATCH] docs(wallet): reword the `next_unused_address` doc Adds an example on what `used` stands for, and make it explicit that it has the same behavior as `Wallet::reveal_next_address` in the scenario where all previously revealed addresses have been used. --- crates/wallet/src/wallet/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/wallet/src/wallet/mod.rs b/crates/wallet/src/wallet/mod.rs index e2e905020..8443683d1 100644 --- a/crates/wallet/src/wallet/mod.rs +++ b/crates/wallet/src/wallet/mod.rs @@ -736,10 +736,10 @@ impl Wallet { } /// Get the next unused address for the given `keychain`, i.e. the address with the lowest - /// derivation index that hasn't been used. + /// derivation index that hasn't been used (hasn't been involved in any transaction). /// - /// This will attempt to derive and reveal a new address if no newly revealed addresses - /// are available. See also [`reveal_next_address`](Self::reveal_next_address). + /// This will attempt to reveal a new address if all previously revealed addresses have + /// been used, in which case the returned address will be the same as calling [`Wallet::reveal_next_address`]. /// /// **WARNING**: To avoid address reuse you must persist the changes resulting from one or more /// calls to this method before closing the wallet. See [`Wallet::reveal_next_address`].