@exodus/ethereum-api 5.0.13 → 5.1.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": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "Ethereum Api",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@exodus/models": "^8.10.4"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "6c1abd66e1224acbb391007b9ab261e5c09376e7"
|
|
40
40
|
}
|
|
@@ -41,8 +41,9 @@ export default function getLogItemsFromServerTx({
|
|
|
41
41
|
{
|
|
42
42
|
const sendingTransferPresent = ethereumTransfers.some(({ from }) => from === ourWalletAddress)
|
|
43
43
|
const receivingTransferPresent = ethereumTransfers.some(({ to }) => to === ourWalletAddress)
|
|
44
|
+
const nftTransferPresent = isNftTransfer({ serverTx, ourWalletAddress })
|
|
44
45
|
|
|
45
|
-
if (sendingTransferPresent || receivingTransferPresent) {
|
|
46
|
+
if (sendingTransferPresent || receivingTransferPresent || nftTransferPresent) {
|
|
46
47
|
const coinAmount = getValueOfTransfers(ourWalletAddress, asset, ethereumTransfers)
|
|
47
48
|
const selfSend = isSelfSendTx({
|
|
48
49
|
coinAmount,
|
|
@@ -140,3 +141,11 @@ function isSelfSendTx({
|
|
|
140
141
|
coinAmount.isZero && sendingTransferPresent && receivingTransferPresent && ourWalletWasSender
|
|
141
142
|
)
|
|
142
143
|
}
|
|
144
|
+
|
|
145
|
+
function isNftTransfer({ serverTx, ourWalletAddress }) {
|
|
146
|
+
if (!Array.isArray(serverTx.erc721) || serverTx.erc721.length < 1) return false
|
|
147
|
+
|
|
148
|
+
return serverTx.erc721.some(
|
|
149
|
+
(transfer) => transfer.to === ourWalletAddress || transfer.from === ourWalletAddress
|
|
150
|
+
)
|
|
151
|
+
}
|
|
@@ -5,6 +5,6 @@ export { default as getLogItemsFromServerTx } from './get-log-items-from-server-
|
|
|
5
5
|
export { default as getHistoryFromServer } from './get-history-from-server'
|
|
6
6
|
export { default as checkPendingTransactions } from './check-pending-transactions'
|
|
7
7
|
export { default as getDeriveTransactionsToCheck } from './get-derive-transactions-to-check'
|
|
8
|
-
export * from './exclude-
|
|
8
|
+
export * from './exclude-unchanged-token-balances'
|
|
9
9
|
|
|
10
10
|
export type { PendingTransactionsDictionary } from './types'
|
|
File without changes
|