@exodus/ethereum-api 8.13.2 → 8.13.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,15 @@
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
+ ## [8.13.3](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.13.2...@exodus/ethereum-api@8.13.3) (2024-08-13)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ethereum-api:** enhance gasLimit default value ([#3140](https://github.com/ExodusMovement/assets/issues/3140)) ([4522a65](https://github.com/ExodusMovement/assets/commit/4522a6518afb617acb5ab82df9f8c4836fe95236))
12
+
13
+
14
+
6
15
  ## [8.13.2](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.13.1...@exodus/ethereum-api@8.13.2) (2024-08-12)
7
16
 
8
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "8.13.2",
3
+ "version": "8.13.3",
4
4
  "description": "Ethereum Api",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@exodus/asset": "^1.2.0",
24
- "@exodus/asset-lib": "^4.2.0",
24
+ "@exodus/asset-lib": "^4.2.2",
25
25
  "@exodus/assets": "^9.1.1",
26
26
  "@exodus/basic-utils": "^2.1.0",
27
27
  "@exodus/bip44-constants": "^195.0.0",
@@ -65,5 +65,5 @@
65
65
  "type": "git",
66
66
  "url": "git+https://github.com/ExodusMovement/assets.git"
67
67
  },
68
- "gitHead": "fc7420fbe8a8acf647ee9319de3eb2d3832b87f6"
68
+ "gitHead": "71031eb3482dd28419a5b53df1ba83c45011095f"
69
69
  }
@@ -160,17 +160,28 @@ export const createAssetFactory = ({
160
160
  let monitor
161
161
  switch (monitorType) {
162
162
  case 'clarity':
163
- monitor = new ClarityMonitor({ interval: ms(monitorInterval || '5m'), server, ...args })
163
+ monitor = new ClarityMonitor({
164
+ assetClientInterface,
165
+ interval: ms(monitorInterval || '5m'),
166
+ server,
167
+ ...args,
168
+ })
164
169
  break
165
170
  case 'no-history':
166
171
  monitor = new EthereumNoHistoryMonitor({
172
+ assetClientInterface,
167
173
  interval: ms(monitorInterval || '15s'),
168
174
  server,
169
175
  ...args,
170
176
  })
171
177
  break
172
178
  case 'magnifier':
173
- monitor = new EthereumMonitor({ interval: ms(monitorInterval || '15s'), server, ...args })
179
+ monitor = new EthereumMonitor({
180
+ assetClientInterface,
181
+ interval: ms(monitorInterval || '15s'),
182
+ server,
183
+ ...args,
184
+ })
174
185
  break
175
186
  default:
176
187
  throw new Error(`Monitor type ${monitorType} of evm asset ${asset.name} is unknown`)
package/src/get-fee.js CHANGED
@@ -39,7 +39,7 @@ export const getFeeFactory =
39
39
  asset,
40
40
  feeData,
41
41
  customFee,
42
- gasLimit = defaultGasLimit,
42
+ gasLimit: providedGasLimit,
43
43
  isExchange,
44
44
  isSendAll,
45
45
  amount,
@@ -55,6 +55,8 @@ export const getFeeFactory =
55
55
  isSendAll,
56
56
  })
57
57
 
58
+ const gasLimit = providedGasLimit || asset.gasLimit || defaultGasLimit
59
+
58
60
  const extraFeeData = getExtraFeeData({ asset, amount })
59
61
  if (calculateEffectiveFee && eip1559Enabled) {
60
62
  const maxFeePerGas = customFee || gasPrice
@@ -65,7 +67,7 @@ export const getFeeFactory =
65
67
  return { fee: effectiveGasPrice.mul(gasLimit), extraFeeData }
66
68
  }
67
69
 
68
- const fee = (customFee || gasPrice.mul(gasPriceMultiplier)).mul(gasLimit || asset.gasLimit)
70
+ const fee = (customFee || gasPrice.mul(gasPriceMultiplier)).mul(gasLimit)
69
71
  return { fee, extraFeeData }
70
72
  }
71
73