@exodus/hw-ledger 2.10.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/lib/atoms/index.js +0 -1
- package/lib/module/device.js +3 -4
- package/lib/module/errors.d.ts +3 -1
- package/lib/module/errors.js +5 -1
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.11.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@2.10.0...@exodus/hw-ledger@2.11.0) (2024-09-23)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- add more metadata to unsupported version error ([#9267](https://github.com/ExodusMovement/exodus-hydra/issues/9267)) ([1a78d90](https://github.com/ExodusMovement/exodus-hydra/commit/1a78d9032bd97dfb77967be90d5cfad2678035b9))
|
|
11
|
+
|
|
6
12
|
## [2.10.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@2.9.5...@exodus/hw-ledger@2.10.0) (2024-09-16)
|
|
7
13
|
|
|
8
14
|
### Features
|
package/lib/atoms/index.js
CHANGED
package/lib/module/device.js
CHANGED
|
@@ -65,7 +65,7 @@ export class LedgerDevice {
|
|
|
65
65
|
const { applications } = this.#getAssetApplication(baseAssetName);
|
|
66
66
|
const supportedApplicationNames = applications.map(({ applicationName }) => applicationName);
|
|
67
67
|
const currentApplicationInfo = await this.#getInformation();
|
|
68
|
-
let desiredApplicationInfo
|
|
68
|
+
let desiredApplicationInfo;
|
|
69
69
|
if (supportedApplicationNames.includes(currentApplicationInfo.name)) {
|
|
70
70
|
desiredApplicationInfo = currentApplicationInfo;
|
|
71
71
|
}
|
|
@@ -90,11 +90,10 @@ export class LedgerDevice {
|
|
|
90
90
|
}
|
|
91
91
|
desiredApplicationInfo = await this.#getInformation();
|
|
92
92
|
}
|
|
93
|
-
const
|
|
94
|
-
const { supportedVersions } = applications.find(({ applicationName }) => applicationName === currentApplicationName);
|
|
93
|
+
const { supportedVersions } = applications.find(({ applicationName }) => applicationName === desiredApplicationInfo.name);
|
|
95
94
|
const isSupportedVersion = semver.satisfies(desiredApplicationInfo.version, supportedVersions);
|
|
96
95
|
if (!isSupportedVersion) {
|
|
97
|
-
throw new UnsupportedVersionError(desiredApplicationInfo.version, supportedVersions);
|
|
96
|
+
throw new UnsupportedVersionError(baseAssetName, desiredApplicationInfo.name, desiredApplicationInfo.version, supportedVersions);
|
|
98
97
|
}
|
|
99
98
|
};
|
|
100
99
|
listSupportedAssetNames = async () => {
|
package/lib/module/errors.d.ts
CHANGED
|
@@ -14,9 +14,11 @@ export declare class ApplicationNotFoundError extends HardwareWalletError {
|
|
|
14
14
|
}
|
|
15
15
|
export declare class UnsupportedVersionError extends HardwareWalletError {
|
|
16
16
|
name: string;
|
|
17
|
+
baseAssetName: string;
|
|
18
|
+
applicationName: string;
|
|
17
19
|
supportedVersions: string;
|
|
18
20
|
actualVersion: string;
|
|
19
|
-
constructor(actualVersion: string, supportedVersions: string);
|
|
21
|
+
constructor(baseAssetName: string, applicationName: string, actualVersion: string, supportedVersions: string);
|
|
20
22
|
}
|
|
21
23
|
export declare class RequiresBlindSigningError extends HardwareWalletError {
|
|
22
24
|
name: string;
|
package/lib/module/errors.js
CHANGED
|
@@ -21,10 +21,14 @@ export class ApplicationNotFoundError extends HardwareWalletError {
|
|
|
21
21
|
}
|
|
22
22
|
export class UnsupportedVersionError extends HardwareWalletError {
|
|
23
23
|
name = 'UnsupportedVersionError';
|
|
24
|
+
baseAssetName;
|
|
25
|
+
applicationName;
|
|
24
26
|
supportedVersions;
|
|
25
27
|
actualVersion;
|
|
26
|
-
constructor(actualVersion, supportedVersions) {
|
|
28
|
+
constructor(baseAssetName, applicationName, actualVersion, supportedVersions) {
|
|
27
29
|
super(`version does not meet version requirements: ${actualVersion} does not match ${supportedVersions}`);
|
|
30
|
+
this.baseAssetName = baseAssetName;
|
|
31
|
+
this.applicationName = applicationName;
|
|
28
32
|
this.supportedVersions = supportedVersions;
|
|
29
33
|
this.actualVersion = actualVersion;
|
|
30
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/hw-ledger",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "The ledger module",
|
|
5
5
|
"author": "Exodus Movement, Inc.",
|
|
6
6
|
"repository": {
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"@exodus/ledger-bitcoin": "^0.2.3-exodus.3",
|
|
39
39
|
"@exodus/ledgerhq-devices": "^8.1.0-exodus.3",
|
|
40
40
|
"@exodus/ledgerhq-hw-app-eth": "^6.33.7-exodus.8",
|
|
41
|
-
"@exodus/module": "^1.2.2",
|
|
42
41
|
"@exodus/redux-dependency-injection": "^4.0.0",
|
|
43
42
|
"@exodus/secp256k1": "^4.0.2-exodus.0",
|
|
44
43
|
"@ledgerhq/hw-app-solana": "^7.0.10",
|
|
@@ -72,5 +71,5 @@
|
|
|
72
71
|
"tiny-secp256k1": "^2.2.3",
|
|
73
72
|
"ts-jest": "^29.0.3"
|
|
74
73
|
},
|
|
75
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "fbbf9681c3b997008ee9ad9d76a93484d3f686b9"
|
|
76
75
|
}
|