@exodus/ethereum-api 8.2.1 → 8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "8.2.1",
3
+ "version": "8.3.0",
4
4
  "description": "Ethereum Api",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -58,5 +58,5 @@
58
58
  "cross-fetch": "^3.1.5",
59
59
  "delay": "4.0.1"
60
60
  },
61
- "gitHead": "06c5fcd1e337817d38ea3d5d4eaf0235b1d5b686"
61
+ "gitHead": "7fee55f46b28a0472a166f76e5d06b0f4c99457d"
62
62
  }
@@ -70,7 +70,17 @@ export async function fetchGasLimit({
70
70
 
71
71
  amount = asset.baseAsset.currency.ZERO
72
72
  toAddress = asset.contract.address
73
- } else if (!isContract && !['ethereumarbone', 'ethereumarbnova'].includes(asset.name)) {
73
+ } else if (
74
+ !isContract &&
75
+ // hacky, convert this to a fetchGasLimit forceGasLimitEstimation plugin flag!
76
+ ![
77
+ 'ethereumarbone',
78
+ 'ethereumarbonesepolia',
79
+ 'ethereumarbnova',
80
+ 'mantle',
81
+ 'mantlesepolia',
82
+ ].includes(asset.name)
83
+ ) {
74
84
  return defaultGasLimit()
75
85
  }
76
86
 
@@ -30,12 +30,16 @@ export const createEthereumHooks = ({
30
30
  for (const stakingAssetName of stakingAssetNames) {
31
31
  const getStakingInfo =
32
32
  stakingAssetName === 'polygon' ? getPolygonStakingInfo : getEthereumStakingInfo
33
- const assetStakingInfo = await getStakingInfo({
34
- address: userAddress.toString(),
35
- asset: assets[stakingAssetName],
36
- server,
37
- })
38
- stakingInfo.staking[stakingAssetName] = assetStakingInfo
33
+ const asset = assets[stakingAssetName]
34
+ if (asset) {
35
+ // asset may not be enabled in the wallet
36
+ const assetStakingInfo = await getStakingInfo({
37
+ address: userAddress.toString(),
38
+ asset,
39
+ server,
40
+ })
41
+ stakingInfo.staking[stakingAssetName] = assetStakingInfo
42
+ }
39
43
  }
40
44
 
41
45
  const batch = assetClientInterface.createOperationsBatch()