@ledgerhq/hw-transport-u2f
Advanced tools
Comparing version 5.13.1 to 5.15.0
{ | ||
"name": "@ledgerhq/hw-transport-u2f", | ||
"version": "5.13.1", | ||
"version": "5.15.0", | ||
"description": "Ledger Hardware Wallet Web implementation of the communication layer, using U2F api", | ||
@@ -30,9 +30,9 @@ "keywords": [ | ||
"dependencies": { | ||
"@ledgerhq/errors": "^5.13.1", | ||
"@ledgerhq/hw-transport": "^5.13.1", | ||
"@ledgerhq/logs": "^5.13.1", | ||
"@ledgerhq/errors": "^5.15.0", | ||
"@ledgerhq/hw-transport": "^5.15.0", | ||
"@ledgerhq/logs": "^5.15.0", | ||
"u2f-api": "0.2.7" | ||
}, | ||
"devDependencies": { | ||
"flow-bin": "^0.123.0" | ||
"flow-bin": "^0.124.0" | ||
}, | ||
@@ -46,3 +46,3 @@ "scripts": { | ||
}, | ||
"gitHead": "7d2f04f2f3ffc3eb8e8399c8d970569e4fa38326" | ||
"gitHead": "819ae5151465d5980c75ff6a356afe1ff6731e11" | ||
} |
@@ -25,6 +25,3 @@ //@flow | ||
const webSafe64 = (base64: string) => | ||
base64 | ||
.replace(/\+/g, "-") | ||
.replace(/\//g, "_") | ||
.replace(/=+$/, ""); | ||
base64.replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, ""); | ||
@@ -51,6 +48,6 @@ // Convert from web-safe to normal, add trailing "="s | ||
challenge: webSafe64(challenge.toString("base64")), | ||
appId: location.origin | ||
appId: location.origin, | ||
}; | ||
log("apdu", "=> " + apdu.toString("hex")); | ||
return sign(signRequest, timeoutMillis / 1000).then(response => { | ||
return sign(signRequest, timeoutMillis / 1000).then((response) => { | ||
const { signatureData } = response; | ||
@@ -76,3 +73,3 @@ if (typeof signatureData === "string") { | ||
function emitDisconnect() { | ||
transportInstances.forEach(t => t.emit("disconnect")); | ||
transportInstances.forEach((t) => t.emit("disconnect")); | ||
transportInstances = []; | ||
@@ -99,3 +96,3 @@ } | ||
// this transport is not discoverable but we are going to guess if it is here with isSupported() | ||
isSupported().then(supported => (supported ? [null] : [])); | ||
isSupported().then((supported) => (supported ? [null] : [])); | ||
@@ -106,3 +103,3 @@ /* | ||
let unsubscribed = false; | ||
isSupported().then(supported => { | ||
isSupported().then((supported) => { | ||
if (unsubscribed) return; | ||
@@ -126,3 +123,3 @@ if (supported) { | ||
unsubscribed = true; | ||
} | ||
}, | ||
}; | ||
@@ -129,0 +126,0 @@ }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
58018
446
Updated@ledgerhq/errors@^5.15.0
Updated@ledgerhq/logs@^5.15.0