Skip to content
Snippets Groups Projects
Commit 2953199c authored by Andrew Chaney (netuoso)'s avatar Andrew Chaney (netuoso)
Browse files

Close the dongle connection when the result is finished

parent 8f80f843
No related branches found
No related tags found
2 merge requests!5Taken current version of master branch in the https://github.com/holgern/beem,!4Original changes pushed to master at https://github.com/holgern/beem
...@@ -53,6 +53,7 @@ class Ledger_Transaction(GrapheneUnsigned_Transaction): ...@@ -53,6 +53,7 @@ class Ledger_Transaction(GrapheneUnsigned_Transaction):
apdu_list = self.build_apdu(path, chain) apdu_list = self.build_apdu(path, chain)
for apdu in apdu_list: for apdu in apdu_list:
result = dongle.exchange(py23_bytes(apdu)) result = dongle.exchange(py23_bytes(apdu))
dongle.close()
sigs = [] sigs = []
signature = result signature = result
sigs.append(Signature(signature)) sigs.append(Signature(signature))
...@@ -64,6 +65,7 @@ class Ledger_Transaction(GrapheneUnsigned_Transaction): ...@@ -64,6 +65,7 @@ class Ledger_Transaction(GrapheneUnsigned_Transaction):
dongle = getDongle(True) dongle = getDongle(True)
apdu = self.build_apdu_pubkey(path, request_screen_approval) apdu = self.build_apdu_pubkey(path, request_screen_approval)
result = dongle.exchange(py23_bytes(apdu)) result = dongle.exchange(py23_bytes(apdu))
dongle.close()
offset = 1 + result[0] offset = 1 + result[0]
address = result[offset + 1: offset + 1 + result[offset]] address = result[offset + 1: offset + 1 + result[offset]]
# public_key = result[1: 1 + result[0]] # public_key = result[1: 1 + result[0]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment