充值判定
This commit is contained in:
@@ -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;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user