@exodus/hw-ledger 2.2.0 → 2.2.1
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/module/assets/ethereum.js +4 -0
- package/lib/module/assets/solana.js +11 -1
- package/package.json +2 -2
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.2.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@2.2.0...@exodus/hw-ledger@2.2.1) (2024-01-16)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- generalize errors for blind signing ([#5421](https://github.com/ExodusMovement/exodus-hydra/issues/5421)) ([cb0a009](https://github.com/ExodusMovement/exodus-hydra/commit/cb0a009d06b750691b80021f7a9de5f073a117a7))
|
|
11
|
+
|
|
6
12
|
## [2.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@2.1.1...@exodus/hw-ledger@2.2.0) (2024-01-11)
|
|
7
13
|
|
|
8
14
|
### Features
|
|
@@ -4,6 +4,7 @@ import AppEth, { ledgerService } from '@exodus/ledgerhq-hw-app-eth';
|
|
|
4
4
|
import { TypedDataUtils, SignTypedDataVersion, } from '@metamask/eth-sig-util';
|
|
5
5
|
import assert from 'minimalistic-assert';
|
|
6
6
|
import { buildFauxXPUB } from './utils';
|
|
7
|
+
import { RequiresBlindSigningError } from '../errors';
|
|
7
8
|
function hashEIP712Message(typedData) {
|
|
8
9
|
const version = SignTypedDataVersion.V4;
|
|
9
10
|
const { sanitizeData, hashStruct } = TypedDataUtils;
|
|
@@ -80,6 +81,9 @@ async function createHandler(transport) {
|
|
|
80
81
|
withNFT: false,
|
|
81
82
|
});
|
|
82
83
|
}
|
|
84
|
+
else if (err instanceof Error && err.message.includes('EthAppPleaseEnableContractData')) {
|
|
85
|
+
throw new RequiresBlindSigningError();
|
|
86
|
+
}
|
|
83
87
|
else {
|
|
84
88
|
throw err;
|
|
85
89
|
}
|
|
@@ -2,6 +2,7 @@ import AppSolana from '@ledgerhq/hw-app-solana';
|
|
|
2
2
|
import assert from 'minimalistic-assert';
|
|
3
3
|
import bs58 from 'bs58';
|
|
4
4
|
import { XPubUnsupportedError } from '@exodus/hw-common';
|
|
5
|
+
import { RequiresBlindSigningError } from '../errors';
|
|
5
6
|
async function createHandler(transport) {
|
|
6
7
|
const app = new AppSolana(transport);
|
|
7
8
|
const getAddress = async (params) => {
|
|
@@ -30,7 +31,16 @@ async function createHandler(transport) {
|
|
|
30
31
|
if (!Buffer.isBuffer(serializedTransaction)) {
|
|
31
32
|
throw new TypeError(`signableTransaction must be Buffer or serializable to a Buffer.`);
|
|
32
33
|
}
|
|
33
|
-
const { signature } = await app
|
|
34
|
+
const { signature } = await app
|
|
35
|
+
.signTransaction(params.derivationPaths[0].replace('m/', ''), serializedTransaction)
|
|
36
|
+
.catch((err) => {
|
|
37
|
+
if (err.message.includes('Try enabling blind signature in the app')) {
|
|
38
|
+
throw new RequiresBlindSigningError();
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
throw err;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
34
44
|
const { address: publicKey } = await app.getAddress(params.derivationPaths[0].replace('m/', ''));
|
|
35
45
|
return [
|
|
36
46
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/hw-ledger",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "The ledger module",
|
|
5
5
|
"author": "Exodus Movement Inc.",
|
|
6
6
|
"repository": {
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"ts-jest": "^29.0.3",
|
|
68
68
|
"typescript": "^4.7.3"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "58a6b3ab7d222a9a18a48fae2f450ebef9c67738"
|
|
71
71
|
}
|