@exodus/ethereum-api 2.21.6 → 2.22.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": "2.
|
|
3
|
+
"version": "2.22.0",
|
|
4
4
|
"description": "Ethereum Api",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@ensdomains/eth-ens-namehash": "^2.0.15",
|
|
18
18
|
"@exodus/asset-lib": "^3.5.4",
|
|
19
19
|
"@exodus/crypto": "^1.0.0-rc.0",
|
|
20
|
-
"@exodus/ethereum-lib": "^2.
|
|
20
|
+
"@exodus/ethereum-lib": "^2.20.0",
|
|
21
21
|
"@exodus/ethereumjs-util": "^7.1.0-exodus.6",
|
|
22
22
|
"@exodus/simple-retry": "^0.0.6",
|
|
23
23
|
"@exodus/solidity-contract": "^1.0.1",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"@exodus/assets-base": "^8.0.136",
|
|
35
35
|
"@exodus/models": "^8.7.2"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "57fae619663ea5193c733bd089c9031447f0d025"
|
|
38
38
|
}
|
|
@@ -37,7 +37,7 @@ export default function createWebSocket(getURL) {
|
|
|
37
37
|
events.emit(`address-${data.address}`)
|
|
38
38
|
break
|
|
39
39
|
case 'gasprice':
|
|
40
|
-
events.emit('gasprice', data.gasprice)
|
|
40
|
+
events.emit('gasprice', { gasPrice: data.gasprice, baseFeePerGas: data.baseGasPrice })
|
|
41
41
|
break
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -199,10 +199,18 @@ export class EthereumMonitor extends BaseMonitor {
|
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
async updateGasPrice(
|
|
202
|
+
async updateGasPrice({ gasPrice, baseFeePerGas }) {
|
|
203
203
|
try {
|
|
204
|
-
const feeConfig = {
|
|
205
|
-
|
|
204
|
+
const feeConfig = {
|
|
205
|
+
gasPrice: `${parseInt(gasPrice, 16)} wei`,
|
|
206
|
+
}
|
|
207
|
+
if (baseFeePerGas) {
|
|
208
|
+
feeConfig.baseFeePerGas = `${parseInt(baseFeePerGas, 16)} wei`
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
this.logger.debug(
|
|
212
|
+
`Update ${this.asset.name} gas price: ${feeConfig.gasPrice}, baseFeePerGas: ${feeConfig.baseFeePerGas}`
|
|
213
|
+
)
|
|
206
214
|
await this.aci.updateFeeConfig({ assetName: this.asset.name, feeConfig })
|
|
207
215
|
} catch (e) {
|
|
208
216
|
this.logger.warn('error updating gasPrice', e)
|