Skip to content

Commit 63701f4

Browse files
committed
mac ledger fix
1 parent 1cd5b1c commit 63701f4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

electron/hardware/LedgerWallet.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ let transport, openedTransport;
1818
let setupPromise;
1919
class LedgerTransport {
2020
static async setup(){
21-
transport = Transport.listen({next:({type, device}) => this[type](device)});
21+
if(!openedTransport){
22+
transport = Transport.listen({next:({type, device}) => this[type](device)});
23+
} else return true;
2224
const p = new Promise(r => setupPromise = r);
2325
setTimeout(() => {
2426
if(setupPromise) {
@@ -435,4 +437,4 @@ const encode = (writer, buffer) => writer.writeBuffer(buffer, asn1.Ber.OctetStri
435437

436438

437439

438-
module.exports = LedgerWallet;
440+
module.exports = LedgerWallet;

0 commit comments

Comments
 (0)