Skip to content

Commit 61aaf4d

Browse files
author
Bertrand256
committed
Merge remote-tracking branch 'ledger/master'
2 parents 8047a60 + c2bb216 commit 61aaf4d

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,17 @@ Building on Windows
2121
- Install Microsoft Visual C++ Compiler for Python 2.7 from http://www.microsoft.com/en-us/download/details.aspx?id=44266
2222
- Download and install PyQt4 for Python 2.7 from https://www.riverbankcomputing.com/software/pyqt/download
2323
- Install the btchip library (open a command prompt and enter c:\python27\scripts\pip install btchip)
24+
25+
Building/Installing on FreeBSD
26+
------------------------------
27+
28+
On FreeBSD you can install the packages:
2429

30+
pkg install security/py-btchip
31+
32+
or build via ports:
33+
34+
cd /usr/ports/security/py-btchip
35+
make install clean
36+
37+

btchip/btchip.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def getTrustedInput(self, transaction, index):
149149
apdu.extend(params)
150150
self.dongle.exchange(bytearray(apdu))
151151
offset = 0
152-
while (offset < len(trinput.script)):
152+
while True:
153153
blockLength = 251
154154
if ((offset + blockLength) < len(trinput.script)):
155155
dataLength = blockLength
@@ -162,6 +162,8 @@ def getTrustedInput(self, transaction, index):
162162
apdu.extend(params)
163163
self.dongle.exchange(bytearray(apdu))
164164
offset += dataLength
165+
if (offset >= len(trinput.script)):
166+
break
165167
# Number of outputs
166168
apdu = [ self.BTCHIP_CLA, self.BTCHIP_INS_GET_TRUSTED_INPUT, 0x80, 0x00 ]
167169
params = []

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
here = dirname(__file__)
88
setup(
99
name='btchip-python',
10-
version='0.1.21',
10+
version='0.1.23',
1111
author='BTChip',
1212
author_email='hello@ledger.fr',
1313
description='Python library to communicate with Ledger Nano dongle',

0 commit comments

Comments
 (0)