@exodus/ethereum-api 8.73.4 → 8.73.6
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 +20 -0
- package/package.json +2 -2
- package/src/eth-like-util.js +2 -2
- package/src/tx-create.js +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
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.73.6](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.73.5...@exodus/ethereum-api@8.73.6) (2026-05-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* fix: correct `getTokenBalance` eth-like-util (#8047)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [8.73.5](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.73.4...@exodus/ethereum-api@8.73.5) (2026-05-11)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* fix: broken erc20 tx acceleration logic on evm (#8038)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
## [8.73.4](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.73.3...@exodus/ethereum-api@8.73.4) (2026-05-08)
|
|
7
27
|
|
|
8
28
|
**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.73.
|
|
3
|
+
"version": "8.73.6",
|
|
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",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"type": "git",
|
|
68
68
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "79dabe78d5a3652b509c7cc1d1496ac2404104b8"
|
|
71
71
|
}
|
package/src/eth-like-util.js
CHANGED
|
@@ -103,14 +103,14 @@ export async function getBalanceProxied({ asset, address, tag = 'latest' }) {
|
|
|
103
103
|
export async function getTokenBalance({ asset, address }) {
|
|
104
104
|
if (!isEthereumLikeToken(asset)) throw new Error(`unsupported ETH-like token ${asset.name}`)
|
|
105
105
|
|
|
106
|
+
const contractAddress = asset.contract.address.toLowerCase()
|
|
106
107
|
const server = getServer(asset)
|
|
107
108
|
const balances = await withErrorReason({
|
|
108
|
-
promise: server.
|
|
109
|
+
promise: server.balanceOf(address, contractAddress),
|
|
109
110
|
errorReasonInfo: EVM_ERROR_REASONS.balanceFetchFailed,
|
|
110
111
|
hint: safeString`getTokenBalance`,
|
|
111
112
|
baseAssetName: asset.baseAsset.name,
|
|
112
113
|
})
|
|
113
|
-
const contractAddress = asset.contract.address.toLowerCase()
|
|
114
114
|
return balances?.confirmed?.[contractAddress] || '0'
|
|
115
115
|
}
|
|
116
116
|
|
package/src/tx-create.js
CHANGED
|
@@ -269,7 +269,15 @@ const createBumpUnsignedTx = async ({
|
|
|
269
269
|
|
|
270
270
|
const isDuplex = Boolean(replacedTokenTx && txValue.gt(baseAsset.currency.ZERO))
|
|
271
271
|
|
|
272
|
-
const txInput =
|
|
272
|
+
const txInput = replacedTx.data.data || '0x'
|
|
273
|
+
|
|
274
|
+
const isTokenTx =
|
|
275
|
+
!isDuplex /* nonpayable */ &&
|
|
276
|
+
replacedTokenTx &&
|
|
277
|
+
Object.keys(asset.contract.methodIds).includes(txInput.slice(0, 10))
|
|
278
|
+
|
|
279
|
+
const txToAddress = isTokenTx ? asset.contract.address : undefined
|
|
280
|
+
|
|
273
281
|
const replacedTxNonce = replacedTx.data.nonce
|
|
274
282
|
|
|
275
283
|
assert(
|
|
@@ -296,6 +304,7 @@ const createBumpUnsignedTx = async ({
|
|
|
296
304
|
nonce,
|
|
297
305
|
txInput,
|
|
298
306
|
toAddress,
|
|
307
|
+
txToAddress,
|
|
299
308
|
txType,
|
|
300
309
|
txValue,
|
|
301
310
|
walletAccount,
|