@ledgerhq/hw-transport-http
Advanced tools
Comparing version 2.0.2 to 2.0.4
@@ -13,3 +13,4 @@ "use strict"; | ||
exports.default = url => { | ||
exports.default = urlArg => { | ||
const url = urlArg; | ||
if (!url) return _HttpTransport2.default; // by default, HttpTransport don't yield anything in list/listen | ||
@@ -22,3 +23,2 @@ class StaticHttpTransport extends _HttpTransport2.default {} | ||
let unsubscribed = false; | ||
function attemptToConnect() { | ||
@@ -28,3 +28,4 @@ if (unsubscribed) return; | ||
if (unsubscribed) return; | ||
observer.next({ descriptor: url, type: "add" }); | ||
// $FlowFixMe wtf flow | ||
observer.next({ type: "add", descriptor: url }); | ||
observer.complete(); | ||
@@ -31,0 +32,0 @@ }, () => { |
{ | ||
"name": "@ledgerhq/hw-transport-http", | ||
"version": "2.0.2", | ||
"version": "2.0.4", | ||
"description": "Ledger Hardware Wallet communication layer over http", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -0,3 +1,5 @@ | ||
// @flow | ||
import HttpTransport from "./HttpTransport"; | ||
export default (url: ?string) => { | ||
export default (urlArg: ?string): Class<HttpTransport> => { | ||
const url = urlArg; | ||
if (!url) return HttpTransport; // by default, HttpTransport don't yield anything in list/listen | ||
@@ -8,3 +10,2 @@ class StaticHttpTransport extends HttpTransport { | ||
let unsubscribed = false; | ||
function attemptToConnect() { | ||
@@ -15,3 +16,4 @@ if (unsubscribed) return; | ||
if (unsubscribed) return; | ||
observer.next({ descriptor: url, type: "add" }); | ||
// $FlowFixMe wtf flow | ||
observer.next({ type: "add", descriptor: url }); | ||
observer.complete(); | ||
@@ -18,0 +20,0 @@ }, |
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
23956
396