@onekeyfe/hd-core
Advanced tools
Comparing version 0.1.39 to 0.1.40
{ | ||
"name": "@onekeyfe/hd-core", | ||
"version": "0.1.39", | ||
"version": "0.1.40", | ||
"description": "> TODO: description", | ||
@@ -28,4 +28,4 @@ "author": "OneKey", | ||
"dependencies": { | ||
"@onekeyfe/hd-shared": "^0.1.39", | ||
"@onekeyfe/hd-transport": "^0.1.39", | ||
"@onekeyfe/hd-shared": "^0.1.40", | ||
"@onekeyfe/hd-transport": "^0.1.40", | ||
"axios": "^0.27.2", | ||
@@ -41,3 +41,3 @@ "bignumber.js": "^9.0.2", | ||
}, | ||
"gitHead": "abaee3140debec0a263b2b87c5ffcddfa534b443" | ||
"gitHead": "70962d6f531e16695ad953c9a6c700876a94e20d" | ||
} |
@@ -264,8 +264,14 @@ import EventEmitter from 'events'; | ||
if (!deviceId) return undefined; | ||
if (!this.passphraseState) return undefined; | ||
const key = `${deviceId}`; | ||
const usePassKey = `${deviceId}@${this.passphraseState}`; | ||
// When creating a wallet, use device_id as the key | ||
const session = deviceSessionCache[key] ?? deviceSessionCache[usePassKey]; | ||
return this.passphraseState ? session : undefined; | ||
if (!deviceSessionCache[usePassKey]) { | ||
const key = `${deviceId}`; | ||
if (deviceSessionCache[key]) { | ||
deviceSessionCache[usePassKey] = deviceSessionCache[key]; | ||
} | ||
} | ||
return deviceSessionCache[usePassKey]; | ||
} | ||
@@ -272,0 +278,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
1198155
35170