From 5c2fe29e7ba5d857f3ec751caa456af10ddd0e2a Mon Sep 17 00:00:00 2001 From: chaosBreaking Date: Mon, 7 Oct 2019 17:49:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E5=80=BC=E5=88=A4=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/deposit.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/common/deposit.js b/src/common/deposit.js index 7986f22..534c7c7 100644 --- a/src/common/deposit.js +++ b/src/common/deposit.js @@ -7,18 +7,14 @@ const getUSDTTxList = async address => { const res = await ERC20.getActions(address, USDTAddr, startBlock).catch(err => { if (err) return []; }); - mylog.info(res, res.filter(tx => tx.to === address)); - return res.filter(tx => tx.to === address); //只取转入到本地址的 + return res.filter(tx => tx.tokenName === 'Tether USD' && tx.tokenSymbol === 'USDT' && tx.to === address && tx.from !== address); //只取转入到本地址的 }; const parseUsdtTx = txList => { if (!txList || !Array.isArray(txList)) return []; return txList.map(tx => { - return { - amount: (+tx.value) / 1e6, - hash: tx.hash, - blockNumber: tx.blockNumber - }; + tx.amount = (+tx.value) / 1e6; + return tx; }); };