@exodus/ethereum-api 8.53.4 → 8.53.5

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.53.5](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.53.4...@exodus/ethereum-api@8.53.5) (2025-10-17)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix: default toTxAddress to be the token address if not provided (#6729)
13
+
14
+
15
+
6
16
  ## [8.53.4](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.53.3...@exodus/ethereum-api@8.53.4) (2025-10-06)
7
17
 
8
18
  **Note:** Version bump only for package @exodus/ethereum-api
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "8.53.4",
3
+ "version": "8.53.5",
4
4
  "description": "Transaction monitors, fee monitors, RPC with the blockchain node, and other networking code for Ethereum and EVM-based blockchains",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -13,7 +13,8 @@
13
13
  "license": "MIT",
14
14
  "homepage": "https://github.com/ExodusMovement/assets/tree/master/ethereum/ethereum-api",
15
15
  "publishConfig": {
16
- "access": "public"
16
+ "access": "public",
17
+ "provenance": false
17
18
  },
18
19
  "scripts": {
19
20
  "test": "run -T exodus-test --jest",
@@ -66,5 +67,5 @@
66
67
  "type": "git",
67
68
  "url": "git+https://github.com/ExodusMovement/assets.git"
68
69
  },
69
- "gitHead": "ec39e0d836ef4a4b3d9669273724407cf6dedd5d"
70
+ "gitHead": "48ee2473ddc98a5eb52a69bba220910263d21a45"
70
71
  }
package/src/tx-create.js CHANGED
@@ -271,7 +271,17 @@ export const createTxFactory = ({ chainId, assetClientInterface, useAbsoluteNonc
271
271
 
272
272
  const resolvedGasPrice = providedGasPrice ?? maybeGasPrice
273
273
 
274
- const txToAddress = isToken && !providedTxInput ? asset.contract.address : toAddress
274
+ // When sending a main asset, the transaction (tx) 'to' address is the receiver's address. No tx input is provided.
275
+ // When sending a token, the tx 'to' address is the asset.contract?.address. No tx input is provided; it's resolved locally.
276
+ // When DEX swapping a main asset, the exchange provides a txInput and a DEX address. Use the DEX address as the tx 'to' address.
277
+ // When DEX swapping a token, the exchange provides a txInput and a DEX address. Use the DEX address as the tx 'to' address.
278
+ // When CEX swapping a main asset, the exchange may provide a txInput and an address. Use this address as the tx 'to' address.
279
+ // When CEX swapping a token, the exchange may provide a txInput but not an address. In this case, the tx 'to' address is the token address.
280
+
281
+ const txToAddress =
282
+ isToken && !providedTxInput
283
+ ? asset.contract.address
284
+ : providedToAddress || asset.contract?.address || ARBITRARY_ADDRESS
275
285
 
276
286
  const isContractToAddress = await isContractAddressCached({ asset, address: txToAddress })
277
287
 
@@ -75,7 +75,6 @@ export const getOptimisticTxLogEffects = async ({
75
75
  const selfSend = fromAddress.toLowerCase() === toAddress.toLowerCase()
76
76
 
77
77
  const baseAsset = asset.baseAsset
78
- assert(asset.feeAsset.name === baseAsset.name, 'inconsistent feeAsset')
79
78
 
80
79
  const maybeTxToReplace = await getHighestIncentivePendingTxByNonce({
81
80
  asset,