Skip to content

Commit

Permalink
Merge #477: WIT_V0 should be WIT
Browse files Browse the repository at this point in the history
cb15526 WIT_V0 should be WIT (Andrew Chow)

Pull request description:

Top commit has no ACKs.

Tree-SHA512: ecf28112a603031a6d3a0576a03791ed5771e4fc0fa69d8815c1242ef3b871d4eb9e8eb250f3f2164bf176384acda6ae6ee956f17330bb76639f418d4c6a4568
  • Loading branch information
achow101 committed Mar 5, 2021
2 parents db956a6 + cb15526 commit 44c0e8f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hwilib/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def get_parser() -> HWIArgumentParser:
enumerate_parser.set_defaults(func=enumerate_handler)

getmasterxpub_parser = subparsers.add_parser('getmasterxpub', help='Get the extended public key for BIP 44 standard derivation paths. Convenience function to get xpubs given the address type, account, and chain type.')
getmasterxpub_parser.add_argument("--addr-type", help="Get the master xpub used to derive addresses for this address type", type=AddressType.argparse, choices=list(AddressType), default=AddressType.WIT_V0) # type: ignore
getmasterxpub_parser.add_argument("--addr-type", help="Get the master xpub used to derive addresses for this address type", type=AddressType.argparse, choices=list(AddressType), default=AddressType.WIT) # type: ignore
getmasterxpub_parser.add_argument("--account", help="The account number", type=int, default=0)
getmasterxpub_parser.set_defaults(func=getmasterxpub_handler)

Expand Down
2 changes: 1 addition & 1 deletion hwilib/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def find_device(
pass # Ignore things we wouldn't get fingerprints for
return None

def getmasterxpub(client: HardwareWalletClient, addrtype: AddressType = AddressType.WIT_V0, account: int = 0) -> Dict[str, str]:
def getmasterxpub(client: HardwareWalletClient, addrtype: AddressType = AddressType.WIT, account: int = 0) -> Dict[str, str]:
"""
Get the master extended public key from a client
Expand Down
2 changes: 1 addition & 1 deletion hwilib/hwwclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self, path: str, password: str, expert: bool) -> None:
self.xpub_cache: Dict[str, str] = {}
self.expert = expert

def get_master_xpub(self, addrtype: AddressType = AddressType.WIT_V0, account: int = 0) -> ExtendedKey:
def get_master_xpub(self, addrtype: AddressType = AddressType.WIT, account: int = 0) -> ExtendedKey:
"""
Retrieves a BIP 44 master public key
Expand Down
4 changes: 2 additions & 2 deletions hwilib/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,9 @@ def get_bip44_purpose(addrtype: AddressType) -> int:
"""
if addrtype == AddressType.LEGACY:
return 44
elif addrtype == AddressType.SH_WIT_V0:
elif addrtype == AddressType.SH_WIT:
return 49
elif addrtype == AddressType.WIT_V0:
elif addrtype == AddressType.WIT:
return 84
else:
raise ValueError("Unknown address type")
Expand Down

0 comments on commit 44c0e8f

Please sign in to comment.