Closed ulrichard closed 2 years ago
How about making WalletOpts.wallet
an Option<String>
? Then you could avoid the "main_marker_will_be_replaced" default value and only do the replacement when WalletOpts.wallet
is None
; such as in the open_database
function you can use unwrap_or
to call your wallet_name_from_descriptor
function.
@notmandatory Yes, of course. Sometimes the solution is so obvious that I have no clue why I didn't find it myself. Thanks.
Description
if no wallet name was provided, use one derived from the descriptor
Notes to the reviewers
Is there a better place to use wallet_name_from_descriptor so that the generated name shows up in the unit tests instead of the placeholder?
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committing