walletrpc+btcwallet: no custom account with various key scopes

Currently, a user can create a custom account with various key scopes.
This is not a desired behaviour.
This commit is contained in:
Torakushi
2023-02-17 18:06:19 +01:00
parent dd5ed71669
commit 77d3f00c3b
4 changed files with 70 additions and 0 deletions

View File

@@ -1447,6 +1447,9 @@ var importAccountCommand = cli.Command{
The address type can usually be inferred from the key's version, but may
be required for certain keys to map them into the proper scope.
If an account with the same name already exists (even with a different
key scope), an error will be returned.
For BIP-0044 keys, an address type must be specified as we intend to not
support importing BIP-0044 keys into the wallet using the legacy
pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will