@exodus/hardware-wallets 2.0.0 → 2.0.2
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 +12 -0
- package/README.md +3 -3
- package/lib/api/index.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/redux/index.d.ts +1 -4
- package/lib/redux/selectors/index.d.ts +1 -4
- package/lib/redux/selectors/isAssetNameConnectedForWalletAccount.d.ts +1 -6
- package/lib/redux/selectors/isAssetNameConnectedForWalletAccount.js +2 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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.0.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hardware-wallets@2.0.1...@exodus/hardware-wallets@2.0.2) (2024-12-05)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- fix: memoize selector factory (#10593)
|
|
11
|
+
|
|
12
|
+
## [2.0.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hardware-wallets@2.0.0...@exodus/hardware-wallets@2.0.1) (2024-11-25)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- fix: drop down the crypto package requirement (#10571)
|
|
17
|
+
|
|
6
18
|
## [2.0.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hardware-wallets@1.7.0...@exodus/hardware-wallets@2.0.0) (2024-11-18)
|
|
7
19
|
|
|
8
20
|
### ⚠ BREAKING CHANGES
|
package/README.md
CHANGED
|
@@ -118,7 +118,7 @@ sequenceDiagram
|
|
|
118
118
|
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
### `addPublicKeysToWalletAccount({
|
|
121
|
+
### `addPublicKeysToWalletAccount({ walletAccount, syncedKeysId })`
|
|
122
122
|
|
|
123
123
|
Adds public keys (XPUBS / public keys) to an existing wallet account.
|
|
124
124
|
|
|
@@ -133,14 +133,14 @@ sequenceDiagram
|
|
|
133
133
|
participant RestoreProgressTracker
|
|
134
134
|
participant TxLogMonitors
|
|
135
135
|
|
|
136
|
-
Consumer->>HardwareWallets: addPublicKeysToWalletAccount({
|
|
136
|
+
Consumer->>HardwareWallets: addPublicKeysToWalletAccount({ walletAccount, syncedKeysId })
|
|
137
137
|
activate HardwareWallets
|
|
138
138
|
|
|
139
139
|
HardwareWallets->>HardwareWallets: Retrieve keys from syncedKeysMap using syncedKeysId
|
|
140
140
|
Note right of HardwareWallets: Retrieves assetNames and keysToSync
|
|
141
141
|
|
|
142
142
|
loop for each key in keysToSync
|
|
143
|
-
HardwareWallets->>PublicKeyStore: add({
|
|
143
|
+
HardwareWallets->>PublicKeyStore: add({ walletAccount, keyIdentifier, xpub, publicKey })
|
|
144
144
|
|
|
145
145
|
end
|
|
146
146
|
|
package/lib/api/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ declare const hardwareWalletsApiDefinition: {
|
|
|
20
20
|
scan: ({ assetName, accountIndexes, addressLimit, addressOffset, }: import("../module/interfaces.js").ScanParams) => Promise<import("../module/interfaces.js").ScanResult>;
|
|
21
21
|
sync: ({ accountIndex: index, isMultisig }?: import("../module/interfaces.js").SyncParams) => Promise<import("../module/interfaces.js").SyncedKeysId>;
|
|
22
22
|
addPublicKeysToWalletAccount: ({ walletAccount, syncedKeysId }: import("../module/interfaces.js").StoreSyncedKeysParams) => Promise<void>;
|
|
23
|
-
create: ({ syncedKeysId, isMultisig }: import("../module/interfaces.js").CreateParams) => Promise<import("
|
|
23
|
+
create: ({ syncedKeysId, isMultisig }: import("../module/interfaces.js").CreateParams) => Promise<import("libraries/models/lib/index.js").WalletAccount>;
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
readonly dependencies: readonly ["hardwareWallets", "txLogMonitors", "restoreProgressTracker"];
|
package/lib/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ declare const hardwareWallets: () => {
|
|
|
23
23
|
scan: ({ assetName, accountIndexes, addressLimit, addressOffset, }: import("./module/interfaces.js").ScanParams) => Promise<import("./module/interfaces.js").ScanResult>;
|
|
24
24
|
sync: ({ accountIndex: index, isMultisig }?: import("./module/interfaces.js").SyncParams) => Promise<import("./module/interfaces.js").SyncedKeysId>;
|
|
25
25
|
addPublicKeysToWalletAccount: ({ walletAccount, syncedKeysId }: import("./module/interfaces.js").StoreSyncedKeysParams) => Promise<void>;
|
|
26
|
-
create: ({ syncedKeysId, isMultisig }: import("./module/interfaces.js").CreateParams) => Promise<import("
|
|
26
|
+
create: ({ syncedKeysId, isMultisig }: import("./module/interfaces.js").CreateParams) => Promise<import("libraries/models/lib/index.js").WalletAccount>;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
readonly dependencies: readonly ["hardwareWallets", "txLogMonitors", "restoreProgressTracker"];
|
package/lib/redux/index.d.ts
CHANGED
|
@@ -10,10 +10,7 @@ declare const hardwareWalletsReduxDefinition: {
|
|
|
10
10
|
};
|
|
11
11
|
readonly selectorDefinitions: {
|
|
12
12
|
readonly id: "isAssetNameConnectedForWalletAccount";
|
|
13
|
-
readonly selectorFactory: (selfSelector: any) =>
|
|
14
|
-
walletAccountName: string;
|
|
15
|
-
assetName: string;
|
|
16
|
-
}) => import("reselect").OutputSelector<unknown, boolean, (res: HardwareWalletsState) => boolean>;
|
|
13
|
+
readonly selectorFactory: (selfSelector: any) => any;
|
|
17
14
|
readonly dependencies: readonly [{
|
|
18
15
|
readonly selector: string;
|
|
19
16
|
}];
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
declare const hardwareWalletsSelectors: {
|
|
2
2
|
readonly id: "isAssetNameConnectedForWalletAccount";
|
|
3
|
-
readonly selectorFactory: (selfSelector: any) =>
|
|
4
|
-
walletAccountName: string;
|
|
5
|
-
assetName: string;
|
|
6
|
-
}) => import("reselect").OutputSelector<unknown, boolean, (res: import("../initial-state.js").HardwareWalletsState) => boolean>;
|
|
3
|
+
readonly selectorFactory: (selfSelector: any) => any;
|
|
7
4
|
readonly dependencies: readonly [{
|
|
8
5
|
readonly selector: string;
|
|
9
6
|
}];
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import type { HardwareWalletsState } from '../initial-state.js';
|
|
2
|
-
type isAssetNameConnectedForWalletAccountParams = {
|
|
3
|
-
walletAccountName: string;
|
|
4
|
-
assetName: string;
|
|
5
|
-
};
|
|
6
1
|
declare const isAssetNameConnectedForWalletAccountSelectorDefinition: {
|
|
7
2
|
readonly id: "isAssetNameConnectedForWalletAccount";
|
|
8
|
-
readonly selectorFactory: (selfSelector: any) =>
|
|
3
|
+
readonly selectorFactory: (selfSelector: any) => any;
|
|
9
4
|
readonly dependencies: readonly [{
|
|
10
5
|
readonly selector: string;
|
|
11
6
|
}];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { memoize } from '@exodus/basic-utils';
|
|
1
2
|
import { MY_STATE } from '@exodus/redux-dependency-injection';
|
|
2
3
|
import { createSelector } from 'reselect';
|
|
3
|
-
const selectorFactory = (selfSelector) => ({ walletAccountName, assetName }) => createSelector(selfSelector, ({ walletAccountNameToConnectedAssetNamesMap }) => walletAccountNameToConnectedAssetNamesMap[walletAccountName]?.includes(assetName) ?? false);
|
|
4
|
+
const selectorFactory = (selfSelector) => memoize(({ walletAccountName, assetName }) => createSelector(selfSelector, ({ walletAccountNameToConnectedAssetNamesMap }) => walletAccountNameToConnectedAssetNamesMap[walletAccountName]?.includes(assetName) ?? false), ({ walletAccountName, assetName }) => `${walletAccountName}:${assetName}`);
|
|
4
5
|
const isAssetNameConnectedForWalletAccountSelectorDefinition = {
|
|
5
6
|
id: 'isAssetNameConnectedForWalletAccount',
|
|
6
7
|
selectorFactory,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/hardware-wallets",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "An Exodus SDK feature that provides a high level abstraction for interacting with hardware wallet devices",
|
|
5
5
|
"author": "Exodus Movement, Inc.",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@exodus/atoms": "^9.0.0",
|
|
32
32
|
"@exodus/basic-utils": "^3.2.0",
|
|
33
33
|
"@exodus/bip32": "^3.3.0",
|
|
34
|
-
"@exodus/crypto": "^1.0.0-rc.
|
|
34
|
+
"@exodus/crypto": "^1.0.0-rc.14",
|
|
35
35
|
"@exodus/hw-common": "^3.1.0",
|
|
36
36
|
"@exodus/models": "^12.0.1",
|
|
37
37
|
"@exodus/redux-dependency-injection": "^4.0.0",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"@exodus/dependency-types": "^2.1.1",
|
|
45
45
|
"@exodus/key-identifier": "^1.3.0",
|
|
46
46
|
"@exodus/logger": "^1.2.3",
|
|
47
|
-
"@exodus/public-key-provider": "^4.0.
|
|
47
|
+
"@exodus/public-key-provider": "^4.0.1",
|
|
48
48
|
"p-defer": "^4.0.1",
|
|
49
49
|
"redux": "^4.2.1"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "a984e5c062e0e2a0312ebdb29a4f9e247010294c"
|
|
52
52
|
}
|