@exodus/ethereum-api 8.18.3 → 8.19.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,16 @@
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.19.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.18.3...@exodus/ethereum-api@8.19.0) (2024-09-26)
7
+
8
+
9
+ ### Features
10
+
11
+ * allow enable and disable custom tokens/nfts per wallet ([#4014](https://github.com/ExodusMovement/assets/issues/4014)) ([9c9864d](https://github.com/ExodusMovement/assets/commit/9c9864d4bfae5b4711704ba3442f1e7dc8231795))
12
+ * enable evm fee monitor clarity/magnifier ([#3954](https://github.com/ExodusMovement/assets/issues/3954)) ([2f64696](https://github.com/ExodusMovement/assets/commit/2f646966889b44b67fafd4f86f51f95d084fa1e2))
13
+
14
+
15
+
6
16
  ## [8.18.3](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.18.2...@exodus/ethereum-api@8.18.3) (2024-09-17)
7
17
 
8
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "8.18.3",
3
+ "version": "8.19.0",
4
4
  "description": "Ethereum Api",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -65,5 +65,5 @@
65
65
  "type": "git",
66
66
  "url": "git+https://github.com/ExodusMovement/assets.git"
67
67
  },
68
- "gitHead": "a5069848e89037f899ba2a96c3661ccbd2b66290"
68
+ "gitHead": "5ed11ccb5d6268dad10582ffd1df7aeae6993f09"
69
69
  }
@@ -45,7 +45,7 @@ export const createAssetFactory = ({
45
45
  confirmationsNumber,
46
46
  customBip44,
47
47
  customCreateGetKeyIdentifier,
48
- customTokens = true,
48
+ customTokens: defaultCustomTokens = true,
49
49
  erc20FuelBuffer,
50
50
  feeData,
51
51
  feeMonitorInterval,
@@ -55,7 +55,7 @@ export const createAssetFactory = ({
55
55
  l1GasOracleAddress, // l1 extra fee for base and optostakingConfiguration = {},
56
56
  monitorInterval,
57
57
  monitorType = 'magnifier',
58
- nfts = false,
58
+ nfts: defaultNfts = false,
59
59
  serverUrl,
60
60
  stakingConfiguration = {},
61
61
  useEip1191ChainIdChecksum = false,
@@ -80,13 +80,15 @@ export const createAssetFactory = ({
80
80
  config = {
81
81
  allowMetaMaskCompat: false,
82
82
  supportsStaking: false,
83
+ nfts: defaultNfts,
84
+ customTokens: defaultCustomTokens,
83
85
  },
84
86
  overrideCallback = ({ asset }) => asset,
85
87
  } = Object.create(null)
86
88
  ) => {
87
89
  const assets = connectAssetsList(assetsList)
88
90
 
89
- const { allowMetaMaskCompat, supportsStaking } = config
91
+ const { allowMetaMaskCompat, supportsStaking, nfts, customTokens } = config
90
92
 
91
93
  const asset = assets[base.name]
92
94
 
@@ -121,11 +123,16 @@ export const createAssetFactory = ({
121
123
 
122
124
  const addressHasHistory = addressHasHistoryFactory({ server })
123
125
 
124
- const feeMonitor = monitorType === 'no-history'
126
+ const isWebSocket = monitorType !== 'no-history'
127
+
128
+ const resolvedFeeMonitorInterval =
129
+ config.feeMonitorInterval ||
130
+ feeMonitorInterval ||
131
+ (isWebSocket ? null : DEFAULT_FEE_MONITOR_INTERVAL) // null means do not start the timer
125
132
 
126
133
  const createFeeMonitor = serverBasedFeeMonitorFactoryFactory({
127
134
  assetName: base.name,
128
- interval: config.feeMonitorInterval || feeMonitorInterval || DEFAULT_FEE_MONITOR_INTERVAL,
135
+ interval: resolvedFeeMonitorInterval,
129
136
  eip1559Enabled: feeData.eip1559Enabled, // this is not updated via remote config. Should it be?
130
137
  server,
131
138
  })
@@ -133,7 +140,7 @@ export const createAssetFactory = ({
133
140
  const features = {
134
141
  accountState: true,
135
142
  customTokens,
136
- feeMonitor,
143
+ feeMonitor: true,
137
144
  feesApi: true,
138
145
  isMaxFeeAsset,
139
146
  isTestnet,
@@ -1,5 +1,4 @@
1
1
  import { FeeMonitor } from '@exodus/asset-lib'
2
- import { DEFAULT_FEE_MONITOR_INTERVAL } from '@exodus/ethereum-lib'
3
2
  import assert from 'minimalistic-assert'
4
3
 
5
4
  import { fromHexToString } from './number-utils.js'
@@ -20,7 +19,7 @@ import { fromHexToString } from './number-utils.js'
20
19
 
21
20
  export const serverBasedFeeMonitorFactoryFactory = ({
22
21
  assetName,
23
- interval = DEFAULT_FEE_MONITOR_INTERVAL,
22
+ interval,
24
23
  eip1559Enabled,
25
24
  server,
26
25
  }) => {