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; }); };