@exodus/ethereum-api 8.70.0 → 8.70.1
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 +10 -0
- package/package.json +3 -3
- package/src/allowance/index.js +2 -0
- package/src/ens/index.js +2 -0
- package/src/fee-data/EthLikeFeeData.js +2 -0
- package/src/staking/utils/index.js +2 -0
- package/src/tx-log/clarity-utils/is-spam-pending-tx.js +1 -1
- package/src/tx-log/clarity-utils/normalize-transactions-response.js +6 -5
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.70.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.70.0...@exodus/ethereum-api@8.70.1) (2026-03-25)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* fix: ensure the pending nonce transaction filter only applies to pending transactions (#7651)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
6
16
|
## [8.70.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.69.0...@exodus/ethereum-api@8.70.0) (2026-03-12)
|
|
7
17
|
|
|
8
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/ethereum-api",
|
|
3
|
-
"version": "8.70.
|
|
3
|
+
"version": "8.70.1",
|
|
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",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@exodus/ethereumjs": "^1.8.0",
|
|
36
36
|
"@exodus/ethersproject-abi": "^5.4.2-exodus.2",
|
|
37
37
|
"@exodus/fetch": "^1.3.0",
|
|
38
|
-
"@exodus/models": "^
|
|
38
|
+
"@exodus/models": "^13.0.0",
|
|
39
39
|
"@exodus/safe-string": "^1.4.0",
|
|
40
40
|
"@exodus/simple-retry": "^0.0.6",
|
|
41
41
|
"@exodus/solidity-contract": "^1.3.0",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"type": "git",
|
|
70
70
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "49d472ae5c602ba68329227e0e0cd3a9b4568fba"
|
|
73
73
|
}
|
package/src/allowance/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// eslint-disable-next-line @exodus/import/no-deprecated
|
|
1
2
|
import { isNumberUnit } from '@exodus/currency'
|
|
2
3
|
import { buffer2currency, createUnsignedTxFactory } from '@exodus/ethereum-lib'
|
|
3
4
|
import { bufferToInt } from '@exodus/ethereumjs/util'
|
|
@@ -45,6 +46,7 @@ export const buildApproveTx = async ({
|
|
|
45
46
|
}) => {
|
|
46
47
|
assert(asset, 'expected asset')
|
|
47
48
|
assert(feeData, 'expected feeData')
|
|
49
|
+
// eslint-disable-next-line @exodus/import/no-deprecated
|
|
48
50
|
assert(isNumberUnit(approveAmount), 'expected approveAmount')
|
|
49
51
|
assert(typeof spenderAddress === 'string', 'expected spenderAddress')
|
|
50
52
|
assert(walletAccount, 'expected walletAccount')
|
package/src/ens/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// eslint-disable-next-line @exodus/import/no-deprecated
|
|
1
2
|
import { hashSync } from '@exodus/crypto/hash'
|
|
2
3
|
import { ABI } from '@exodus/ethereum-lib'
|
|
3
4
|
import SolidityContract from '@exodus/solidity-contract'
|
|
@@ -24,6 +25,7 @@ function namehash(inputName) {
|
|
|
24
25
|
const name = normalize(inputName)
|
|
25
26
|
if (name) {
|
|
26
27
|
for (const label of name.split('.').reverse()) {
|
|
28
|
+
// eslint-disable-next-line @exodus/import/no-deprecated
|
|
27
29
|
node = hashSync('keccak256', [node, hashSync('keccak256', label, 'uint8')], 'buffer')
|
|
28
30
|
}
|
|
29
31
|
}
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
mapCurrency as defaultMapCurrency,
|
|
4
4
|
modelToJSON,
|
|
5
5
|
} from '@exodus/asset-lib/src/utils/index.js'
|
|
6
|
+
// eslint-disable-next-line @exodus/import/no-deprecated
|
|
6
7
|
import { isNumberUnit } from '@exodus/currency'
|
|
7
8
|
import lodash from 'lodash'
|
|
8
9
|
|
|
@@ -12,6 +13,7 @@ const PRE_EIP1559_UNIT_KEYS_GUARD = ['gasPrice']
|
|
|
12
13
|
const EIP1559_UNIT_KEYS_GUARD = ['gasPrice', 'baseFeePerGas']
|
|
13
14
|
|
|
14
15
|
export const bound = ({ val, multiplier, max, min }) => {
|
|
16
|
+
// eslint-disable-next-line @exodus/import/no-deprecated
|
|
15
17
|
if (!isNumberUnit(val)) return val
|
|
16
18
|
|
|
17
19
|
if (multiplier) {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
// eslint-disable-next-line @exodus/import/no-deprecated
|
|
1
2
|
import { isNumberUnit } from '@exodus/currency'
|
|
2
3
|
|
|
3
4
|
export const DISABLE_BALANCE_CHECKS = '0x0'
|
|
4
5
|
|
|
5
6
|
export function amountToCurrency({ asset, amount }) {
|
|
7
|
+
// eslint-disable-next-line @exodus/import/no-deprecated
|
|
6
8
|
return isNumberUnit(amount) ? amount : asset.currency.parse(amount)
|
|
7
9
|
}
|
|
8
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import assert from 'minimalistic-assert'
|
|
2
2
|
|
|
3
|
-
import { isSpamPendingTx } from './is-spam-pending-tx.js'
|
|
3
|
+
import { isPendingClarityTx, isSpamPendingTx } from './is-spam-pending-tx.js'
|
|
4
4
|
|
|
5
5
|
// Converts the `pending` and `confirmed` transactions returned
|
|
6
6
|
// by Clarity into a single contiguous array of transactions.
|
|
@@ -50,11 +50,12 @@ export const normalizeTransactionsResponse = async ({
|
|
|
50
50
|
// HACK: If we were unable to determine the `pendingNonce`, then
|
|
51
51
|
// allow send transactions through by default without
|
|
52
52
|
// further validation.
|
|
53
|
-
|
|
53
|
+
// NOTE: If the transaction is already confirmed, ignore RPC pending
|
|
54
|
+
// state comparison check since the RPC might be out-of-sync.
|
|
55
|
+
if (pendingNonce === null || !isPendingClarityTx(tx)) return true
|
|
54
56
|
|
|
55
|
-
// NOTE: If the `tx`
|
|
56
|
-
//
|
|
57
|
-
// pending at the RPC, these transactions are no longer
|
|
57
|
+
// NOTE: If the pending `tx` has a nonce that's greater than
|
|
58
|
+
// what's considered pending at the RPC, it is no longer
|
|
58
59
|
// viable and should be replaced.
|
|
59
60
|
return nonce < pendingNonce
|
|
60
61
|
}
|