@exodus/assets-feature 3.2.0 → 3.3.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 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
+ ## [3.3.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@3.2.0...@exodus/assets-feature@3.3.0) (2023-10-05)
7
+
8
+ ### Features
9
+
10
+ - use transaction signer ([#3751](https://github.com/ExodusMovement/exodus-hydra/issues/3751)) ([0e60e89](https://github.com/ExodusMovement/exodus-hydra/commit/0e60e8963a799435c5528f596447813b9e012ead))
11
+
6
12
  ## [3.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@3.1.2...@exodus/assets-feature@3.2.0) (2023-10-03)
7
13
 
8
14
  ### Features
@@ -6,6 +6,7 @@ class AssetClientInterface {
6
6
  #availableAssetNamesAtom
7
7
  #walletAccountsAtom
8
8
  #enabledWalletAccountsAtom
9
+ #transactionSigner
9
10
 
10
11
  constructor({
11
12
  blockchainMetadata,
@@ -16,6 +17,7 @@ class AssetClientInterface {
16
17
  availableAssetNamesAtom,
17
18
  addressProvider,
18
19
  feeMonitors,
20
+ transactionSigner,
19
21
  }) {
20
22
  this.blockchainMetadata = blockchainMetadata
21
23
  this.wallet = wallet
@@ -25,6 +27,7 @@ class AssetClientInterface {
25
27
  this.addressProvider = addressProvider
26
28
  this.feeMonitors = feeMonitors
27
29
  this.#availableAssetNamesAtom = availableAssetNamesAtom
30
+ this.#transactionSigner = transactionSigner
28
31
 
29
32
  // TODO: remove conditional when clients updated
30
33
  if (assetsModule.initialize) {
@@ -239,11 +242,10 @@ class AssetClientInterface {
239
242
 
240
243
  // wallet interface
241
244
 
242
- signTransaction = async ({ assetName, unsignedTx, walletAccount }) => {
243
- // eslint-disable-next-line unicorn/no-await-expression-member
244
- const accountIndex = (await this.#getWalletAccount(walletAccount)).index
245
+ signTransaction = async ({ assetName, unsignedTx, walletAccount: walletAccountName }) => {
245
246
  const baseAssetName = this.assetsModule.getAsset(assetName).baseAsset.name
246
- return this.wallet.signTransaction({ baseAssetName, unsignedTx, accountIndex })
247
+ const walletAccount = await this.#getWalletAccount(walletAccountName)
248
+ return this.#transactionSigner.signTransaction({ baseAssetName, unsignedTx, walletAccount })
247
249
  }
248
250
  }
249
251
 
package/client/index.js CHANGED
@@ -13,6 +13,7 @@ const assetsClientInterfaceDefinition = {
13
13
  'availableAssetNamesAtom',
14
14
  'addressProvider',
15
15
  'feeMonitors',
16
+ 'transactionSigner',
16
17
  ],
17
18
  }
18
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/assets-feature",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Assets module, clients and apis",
6
6
  "main": "index.js",
@@ -62,5 +62,5 @@
62
62
  "jest": "^29.1.2",
63
63
  "redux": "^4.0.0"
64
64
  },
65
- "gitHead": "423c1e963708c681fe11ad396afe65f9f956336f"
65
+ "gitHead": "791e546a70c1e544e7bb0e64502e431670b9bb86"
66
66
  }