@exodus/hardware-wallets 2.0.1 → 2.0.3

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 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.3](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hardware-wallets@2.0.2...@exodus/hardware-wallets@2.0.3) (2024-12-20)
7
+
8
+ ### License
9
+
10
+ - license: re-license under MIT license (#10599)
11
+
12
+ ## [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)
13
+
14
+ ### Bug Fixes
15
+
16
+ - fix: memoize selector factory (#10593)
17
+
6
18
  ## [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)
7
19
 
8
20
  ### Bug Fixes
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2024 Exodus Movement, Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -118,7 +118,7 @@ sequenceDiagram
118
118
 
119
119
  ```
120
120
 
121
- ### `addPublicKeysToWalletAccount({ walletAccountName, syncedKeysId })`
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({ walletAccountName, syncedKeysId })
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({ walletAccountName, keyIdentifier, xpub, publicKey })
143
+ HardwareWallets->>PublicKeyStore: add({ walletAccount, keyIdentifier, xpub, publicKey })
144
144
 
145
145
  end
146
146
 
@@ -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("@exodus/models").WalletAccount>;
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("@exodus/models").WalletAccount>;
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"];
@@ -10,10 +10,7 @@ declare const hardwareWalletsReduxDefinition: {
10
10
  };
11
11
  readonly selectorDefinitions: {
12
12
  readonly id: "isAssetNameConnectedForWalletAccount";
13
- readonly selectorFactory: (selfSelector: any) => ({ walletAccountName, assetName }: {
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) => ({ walletAccountName, assetName }: {
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) => ({ walletAccountName, assetName }: isAssetNameConnectedForWalletAccountParams) => import("reselect").OutputSelector<unknown, boolean, (res: HardwareWalletsState) => boolean>;
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.1",
3
+ "version": "2.0.3",
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": {
@@ -8,7 +8,7 @@
8
8
  "url": "git+https://github.com/ExodusMovement/exodus-hydra.git"
9
9
  },
10
10
  "homepage": "https://github.com/ExodusMovement/exodus-hydra/tree/master/features/hardware-wallets",
11
- "license": "UNLICENSED",
11
+ "license": "MIT",
12
12
  "bugs": {
13
13
  "url": "https://github.com/ExodusMovement/exodus-hydra/issues?q=is%3Aissue+is%3Aopen+label%3Ahardware-wallets"
14
14
  },
@@ -44,9 +44,12 @@
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.0",
47
+ "@exodus/public-key-provider": "^4.0.2",
48
48
  "p-defer": "^4.0.1",
49
49
  "redux": "^4.2.1"
50
50
  },
51
- "gitHead": "c281c43de7d39ab99937d468e11f9d58a7c6cc34"
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
54
+ "gitHead": "9cef1436f1cf2fa9afa1672954ea92c63a8e0f16"
52
55
  }