Skip to content

Commit

Permalink
Merge pull request #237 from netuoso/fix-for-ledger-hid
Browse files Browse the repository at this point in the history
Close the dongle connection when the result is finished
  • Loading branch information
holgern authored May 12, 2020
2 parents 8f80f84 + 2953199 commit 7d028a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions beembase/ledgertransactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def sign(self, path="48'/13'/0'/0'/0'", chain=u"STEEM"):
apdu_list = self.build_apdu(path, chain)
for apdu in apdu_list:
result = dongle.exchange(py23_bytes(apdu))
dongle.close()
sigs = []
signature = result
sigs.append(Signature(signature))
Expand All @@ -64,6 +65,7 @@ def get_pubkey(self, path="48'/13'/0'/0'/0'", request_screen_approval=False, pre
dongle = getDongle(True)
apdu = self.build_apdu_pubkey(path, request_screen_approval)
result = dongle.exchange(py23_bytes(apdu))
dongle.close()
offset = 1 + result[0]
address = result[offset + 1: offset + 1 + result[offset]]
# public_key = result[1: 1 + result[0]]
Expand Down

0 comments on commit 7d028a4

Please sign in to comment.