Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit 7c7a9e7

Browse files
authored
Merge pull request #21 from instagibbs/displayaddr
expose address on-screen verification
2 parents 49495ec + 7b66bd0 commit 7c7a9e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

btchip/btchip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ def getVerifyPinRemainingAttempts(self):
112112
return e.sw - 0x63c0
113113
raise e
114114

115-
def getWalletPublicKey(self, path):
115+
def getWalletPublicKey(self, path, showOnScreen=False):
116116
result = {}
117117
donglePath = parse_bip32_path(path)
118118
if self.needKeyCache:
119119
self.resolvePublicKeysInPath(path)
120-
apdu = [ self.BTCHIP_CLA, self.BTCHIP_INS_GET_WALLET_PUBLIC_KEY, 0x00, 0x00, len(donglePath) ]
120+
apdu = [ self.BTCHIP_CLA, self.BTCHIP_INS_GET_WALLET_PUBLIC_KEY, 0x01 if showOnScreen else 0x00, 0x00, len(donglePath) ]
121121
apdu.extend(donglePath)
122122
response = self.dongle.exchange(bytearray(apdu))
123123
offset = 0

0 commit comments

Comments
 (0)