spacesprotocol / spaced

Bitcoin spaces protocol daemon
https://spacesprotocol.org
3 stars 5 forks source link

Investigate named wallet export issue #12

Closed artfuldev closed 3 weeks ago

artfuldev commented 3 weeks ago

In this PR, we investigate #7 (with an integration test of course)

In addition, we:

artfuldev commented 3 weeks ago

The defined way to export a named wallet is to use the command like:

space-cli --chain [chain] exportwallet [name]

but the command used in the issue is

space-cli --chain [chain] exportwallet -w <wallet>

Hence the default value for the name arg is picked up, as a name arg isn't specified here.

To add the help output:

space-cli exportwallet --help
Export a wallet

Usage: space-cli --chain <CHAIN> exportwallet [OPTIONS] [NAME]

Arguments:
  [NAME]  [default: default]

Options:
  -w, --wallet <WALLET>  Specify wallet to use [default: default]
  -d, --dust <DUST>      Custom dust amount in sat for auction outputs
      --force            Force invalid transaction (for testing only)
  -h, --help             Print help

Since we specify -w <wallet> as an option for every command, users can expect this. We might have to ensure consistency in the CLI and it might be worth spending some time on this. @buffrr what do you think?

artfuldev commented 3 weeks ago

Will reopen when I've added more tests