@ledgerhq/hw-transport-http
Advanced tools
Comparing version 4.26.0-beta.ecce9a72 to 4.26.0
@@ -64,2 +64,3 @@ "use strict"; | ||
var unsubscribed = false; | ||
var seen = {}; | ||
function checkLoop() { | ||
@@ -96,4 +97,7 @@ var _this2 = this; | ||
case 7: | ||
observer.next({ type: "add", descriptor: url }); | ||
_context.next = 12; | ||
if (!seen[url]) { | ||
seen[url] = 1; | ||
observer.next({ type: "add", descriptor: url }); | ||
} | ||
_context.next = 13; | ||
break; | ||
@@ -105,3 +109,9 @@ | ||
case 12: | ||
// nothing | ||
if (seen[url]) { | ||
delete seen[url]; | ||
observer.next({ type: "remove", descriptor: url }); | ||
} | ||
case 13: | ||
case "end": | ||
@@ -117,5 +127,7 @@ return _context.stop(); | ||
}; | ||
}() | ||
// nothing | ||
)).then(checkLoop); | ||
}())).then(function () { | ||
return new Promise(function (success) { | ||
return setTimeout(success, 5000); | ||
}); | ||
}).then(checkLoop); | ||
} | ||
@@ -122,0 +134,0 @@ checkLoop(); |
{ | ||
"name": "@ledgerhq/hw-transport-http", | ||
"version": "4.26.0-beta.ecce9a72", | ||
"version": "4.26.0", | ||
"description": "Ledger Hardware Wallet communication layer over http", | ||
@@ -28,3 +28,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@ledgerhq/hw-transport": "^4.26.0-beta.ecce9a72", | ||
"@ledgerhq/hw-transport": "^4.24.0", | ||
"axios": "^0.18.0", | ||
@@ -31,0 +31,0 @@ "ws": "^6.1.0" |
@@ -30,2 +30,3 @@ // @flow | ||
let unsubscribed = false; | ||
const seen = {}; | ||
function checkLoop() { | ||
@@ -39,8 +40,17 @@ if (unsubscribed) return; | ||
if (unsubscribed) return; | ||
observer.next({ type: "add", descriptor: url }); | ||
if (!seen[url]) { | ||
seen[url] = 1; | ||
observer.next({ type: "add", descriptor: url }); | ||
} | ||
} catch (e) { | ||
// nothing | ||
if (seen[url]) { | ||
delete seen[url]; | ||
observer.next({ type: "remove", descriptor: url }); | ||
} | ||
} | ||
}) | ||
).then(checkLoop); | ||
) | ||
.then(() => new Promise(success => setTimeout(success, 5000))) | ||
.then(checkLoop); | ||
} | ||
@@ -47,0 +57,0 @@ checkLoop(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
51569
712
0
1