Skip to content

Commit

Permalink
mac ledger fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nsjames committed Apr 23, 2020
1 parent 1cd5b1c commit 63701f4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions electron/hardware/LedgerWallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ let transport, openedTransport;
let setupPromise;
class LedgerTransport {
static async setup(){
transport = Transport.listen({next:({type, device}) => this[type](device)});
if(!openedTransport){
transport = Transport.listen({next:({type, device}) => this[type](device)});
} else return true;
const p = new Promise(r => setupPromise = r);
setTimeout(() => {
if(setupPromise) {
Expand Down Expand Up @@ -435,4 +437,4 @@ const encode = (writer, buffer) => writer.writeBuffer(buffer, asn1.Ber.OctetStri



module.exports = LedgerWallet;
module.exports = LedgerWallet;

0 comments on commit 63701f4

Please sign in to comment.