@exodus/ethereum-api 8.23.0 → 8.23.2
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/custom-fees.js +4 -4
- package/src/fee-data-factory.js +1 -0
- package/src/tx-send/tx-send.js +10 -2
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.23.2](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.23.1...@exodus/ethereum-api@8.23.2) (2024-12-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* fix: eth tx-send no-resign on trezor (#4721)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [8.23.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.23.0...@exodus/ethereum-api@8.23.1) (2024-12-12)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* fix: use gasPriceMultipler when setting up min/max/recommended (#4700)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
## [8.23.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.22.5...@exodus/ethereum-api@8.23.0) (2024-12-09)
|
|
7
27
|
|
|
8
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/ethereum-api",
|
|
3
|
-
"version": "8.23.
|
|
3
|
+
"version": "8.23.2",
|
|
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",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"type": "git",
|
|
65
65
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "2036bf64aa16ee26a864a4aa971b050fc4631104"
|
|
68
68
|
}
|
package/src/custom-fees.js
CHANGED
|
@@ -4,7 +4,7 @@ export const createCustomFeesApi = ({ baseAsset }) => {
|
|
|
4
4
|
const Gwei = baseAsset.currency.units.Gwei
|
|
5
5
|
return {
|
|
6
6
|
getRecommendedMinMaxFeeUnitPrices: ({ feeData }) => {
|
|
7
|
-
const { gasPrice, gasPriceMinimumRate, gasPriceMaximumRate } = feeData
|
|
7
|
+
const { gasPrice, gasPriceMultiplier, gasPriceMinimumRate, gasPriceMaximumRate } = feeData
|
|
8
8
|
|
|
9
9
|
const calculateFeeUnitPrice = (
|
|
10
10
|
feeUnitPrice,
|
|
@@ -13,9 +13,9 @@ export const createCustomFeesApi = ({ baseAsset }) => {
|
|
|
13
13
|
) => feeUnitPrice.to('Gwei').mul(multiplier).add(toAdd).toNumber(Gwei)
|
|
14
14
|
|
|
15
15
|
return {
|
|
16
|
-
recommended: calculateFeeUnitPrice(gasPrice),
|
|
17
|
-
min: calculateFeeUnitPrice(gasPrice, gasPriceMinimumRate),
|
|
18
|
-
max: calculateFeeUnitPrice(gasPrice, gasPriceMaximumRate),
|
|
16
|
+
recommended: calculateFeeUnitPrice(gasPrice, gasPriceMultiplier),
|
|
17
|
+
min: calculateFeeUnitPrice(gasPrice, gasPriceMinimumRate * gasPriceMultiplier),
|
|
18
|
+
max: calculateFeeUnitPrice(gasPrice, gasPriceMaximumRate * gasPriceMultiplier),
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
unit: 'gwei/gas',
|
package/src/fee-data-factory.js
CHANGED
package/src/tx-send/tx-send.js
CHANGED
|
@@ -13,7 +13,15 @@ const txSendFactory = ({ assetClientInterface, createUnsignedTx }) => {
|
|
|
13
13
|
assert(assetClientInterface, 'assetClientInterface is required')
|
|
14
14
|
assert(createUnsignedTx, 'createUnsignedTx is required')
|
|
15
15
|
return async ({ asset, walletAccount, address, amount, options = {} }) => {
|
|
16
|
-
const {
|
|
16
|
+
const {
|
|
17
|
+
nft,
|
|
18
|
+
bumpTxId,
|
|
19
|
+
nonce: providedNonce,
|
|
20
|
+
customFee,
|
|
21
|
+
keepTxInput,
|
|
22
|
+
isSendAll,
|
|
23
|
+
isHardware,
|
|
24
|
+
} = options
|
|
17
25
|
let { txInput } = options // avoid let!
|
|
18
26
|
|
|
19
27
|
const feeOpts = {
|
|
@@ -147,7 +155,7 @@ const txSendFactory = ({ assetClientInterface, createUnsignedTx }) => {
|
|
|
147
155
|
reason: ErrorWrapper.reasons.broadcastTxFailed,
|
|
148
156
|
hint: 'otherErr:broadcastTx',
|
|
149
157
|
})
|
|
150
|
-
} else if (nonceTooLowErr) {
|
|
158
|
+
} else if (nonceTooLowErr && !isHardware) {
|
|
151
159
|
console.info('trying to send again...') // inject logger factory from platform
|
|
152
160
|
// let's try to fix the nonce issue
|
|
153
161
|
nonce = await resolveNonce({
|