@exodus/ethereum-lib 2.10.7 → 2.11.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-lib",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "Ethereum Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "Exodus Movement, Inc.",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@exodus/assets": "8.0.x"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "84627634686049aa4d88d8b631af006dba571bb9"
|
|
28
28
|
}
|
package/src/fee-data/polygon.js
CHANGED
|
@@ -4,8 +4,8 @@ export default new FeeData(
|
|
|
4
4
|
{
|
|
5
5
|
// https://polygonscan.com/chart/gasprice
|
|
6
6
|
gasPrice: '5 Gwei',
|
|
7
|
-
max: '
|
|
8
|
-
min: '
|
|
7
|
+
max: '300 Gwei',
|
|
8
|
+
min: '30 Gwei',
|
|
9
9
|
erc20FuelThreshold: '2500000 Gwei',
|
|
10
10
|
gasPriceEconomicalRate: 0.8,
|
|
11
11
|
gasPriceMinimumRate: 0.6,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// A super-selector that returns all the current data needed for a tick of the ETH monitor.
|
|
2
2
|
|
|
3
3
|
export default function getDeriveDataNeededForTick({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
getAccountState,
|
|
5
|
+
getConfirmationsNumber,
|
|
6
|
+
getReceiveAddress,
|
|
7
7
|
}) {
|
|
8
|
-
return function({
|
|
9
|
-
const {
|
|
8
|
+
return async function({ assetName, walletAccount }) {
|
|
9
|
+
const receiveAddress = await getReceiveAddress({ assetName, walletAccount })
|
|
10
|
+
const currentAccountState = await getAccountState({ assetName, walletAccount })
|
|
11
|
+
const minimumConfirmations = await getConfirmationsNumber({ assetName })
|
|
10
12
|
return {
|
|
11
|
-
ourWalletAddress:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
currentAccountState: getAccountStateSelector(state)(assetName, walletAccount),
|
|
15
|
-
minimumConfirmations: getConfirmationsNumberSelector(state)(assetName),
|
|
13
|
+
ourWalletAddress: receiveAddress.toLowerCase(),
|
|
14
|
+
currentAccountState,
|
|
15
|
+
minimumConfirmations,
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -3,17 +3,15 @@ import getSenderNonceKey from './get-sender-nonce-key'
|
|
|
3
3
|
|
|
4
4
|
const UNCONFIRMED_TX_LIMIT = ms('5m')
|
|
5
5
|
|
|
6
|
-
export default function getDeriveTransactionsToCheck({
|
|
7
|
-
return ({
|
|
6
|
+
export default function getDeriveTransactionsToCheck({ getTxHistory }) {
|
|
7
|
+
return async ({ assetName: _assetName, walletAccount, tokens, ourWalletAddress }) => {
|
|
8
8
|
const pendingTransactionsToCheck = {}
|
|
9
9
|
const pendingTransactionsGroupedByAddressAndNonce = {}
|
|
10
10
|
const simulatedTransactions = {}
|
|
11
11
|
const now = Date.now()
|
|
12
|
-
const getTxLog = getTxLogSelector(state)
|
|
13
|
-
const { walletAccount, asset: _assetName } = assetSource
|
|
14
12
|
|
|
15
13
|
for (const assetName of [_assetName, ...tokens.map(({ name }) => name)]) {
|
|
16
|
-
const txSet =
|
|
14
|
+
const txSet = await getTxHistory({ assetName, walletAccount })
|
|
17
15
|
for (const tx of txSet) {
|
|
18
16
|
// ERC20 sends have an entry in ETH and one in the ERC20 log so we just want the ETH one
|
|
19
17
|
if (
|