@exodus/ethereum-api 6.2.17 → 6.2.19
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": "6.2.
|
|
3
|
+
"version": "6.2.19",
|
|
4
4
|
"description": "Ethereum Api",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@exodus/asset-lib": "^3.7.1",
|
|
18
18
|
"@exodus/crypto": "^1.0.0-rc.0",
|
|
19
|
-
"@exodus/ethereum-lib": "^3.3.
|
|
19
|
+
"@exodus/ethereum-lib": "^3.3.10",
|
|
20
20
|
"@exodus/ethereumjs-util": "^7.1.0-exodus.6",
|
|
21
21
|
"@exodus/fetch": "^1.2.1",
|
|
22
22
|
"@exodus/simple-retry": "^0.0.6",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@exodus/models": "^8.10.4"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "871b16207d864493cd6251ee1e35fe456b8a05e6"
|
|
40
40
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import BN from 'bn.js'
|
|
2
2
|
import { createContract } from '@exodus/ethereum-lib'
|
|
3
3
|
import ethAssets from '@exodus/ethereum-meta'
|
|
4
|
-
import { asset as polygon } from '@exodus/matic-meta'
|
|
5
4
|
import { getServerByName } from '../exodus-eth-server'
|
|
6
5
|
import { retry } from '@exodus/simple-retry'
|
|
7
6
|
import { bufferToHex } from '@exodus/ethereumjs-util'
|
|
@@ -56,7 +55,7 @@ export class MaticStaking {
|
|
|
56
55
|
this.validatorShareContract,
|
|
57
56
|
'minAmount'
|
|
58
57
|
)
|
|
59
|
-
return
|
|
58
|
+
return polygonEthToken.currency.baseUnit(minRewardsToWithdraw)
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
/**
|
|
@@ -113,7 +112,7 @@ export class MaticStaking {
|
|
|
113
112
|
'getLiquidRewards',
|
|
114
113
|
address
|
|
115
114
|
)
|
|
116
|
-
return
|
|
115
|
+
return polygonEthToken.currency.baseUnit(liquidRewards)
|
|
117
116
|
}
|
|
118
117
|
|
|
119
118
|
getTotalStake = async (address) => {
|
|
@@ -123,7 +122,7 @@ export class MaticStaking {
|
|
|
123
122
|
address
|
|
124
123
|
)
|
|
125
124
|
const [amount] = splitIn32BytesArray(stakeInfo)
|
|
126
|
-
return
|
|
125
|
+
return polygonEthToken.currency.baseUnit(toBN(amount).toString())
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
getWithdrawExchangeRate = async () => {
|
|
@@ -64,9 +64,9 @@ export default function getLogItemsFromServerTx({
|
|
|
64
64
|
nonce,
|
|
65
65
|
gasLimit,
|
|
66
66
|
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
...(ourWalletWasSender
|
|
68
|
+
? { from: [], to: toAddress, feeAmount, feeCoinName: asset.feeAsset.name }
|
|
69
|
+
: { from: [serverTx.from] }),
|
|
70
70
|
selfSend,
|
|
71
71
|
tokens: getNamesOfTokensTransferredByServerTx({
|
|
72
72
|
asset,
|
|
@@ -114,9 +114,9 @@ export default function getLogItemsFromServerTx({
|
|
|
114
114
|
coinAmount,
|
|
115
115
|
coinName: tokenName,
|
|
116
116
|
data: { nonce, gasLimit },
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
...(isConsideredSent
|
|
118
|
+
? { from: [], to: tokenTransferToAddress, feeAmount, feeCoinName: token.feeAsset.name }
|
|
119
|
+
: { from: tokenFromAddresses }),
|
|
120
120
|
selfSend,
|
|
121
121
|
},
|
|
122
122
|
])
|
|
@@ -62,9 +62,9 @@ export default function getLogItemsFromServerTx({
|
|
|
62
62
|
nonce,
|
|
63
63
|
gasLimit,
|
|
64
64
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
...(ourWalletWasSender
|
|
66
|
+
? { from: [], to: toAddress, feeAmount, feeCoinName: asset.feeAsset.name }
|
|
67
|
+
: { from: [serverTx.from] }),
|
|
68
68
|
selfSend,
|
|
69
69
|
tokens: getNamesOfTokensTransferredByServerTx({
|
|
70
70
|
asset,
|
|
@@ -113,9 +113,9 @@ export default function getLogItemsFromServerTx({
|
|
|
113
113
|
coinAmount,
|
|
114
114
|
coinName: tokenName,
|
|
115
115
|
data: { nonce, gasLimit },
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
...(isConsideredSent
|
|
117
|
+
? { from: [], to: tokenTransferToAddress, feeAmount, feeCoinName: asset.feeAsset.name }
|
|
118
|
+
: { from: tokenFromAddresses }),
|
|
119
119
|
selfSend,
|
|
120
120
|
},
|
|
121
121
|
])
|