timestamp
This commit is contained in:
@@ -7,6 +7,7 @@ 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); //只取转入到本地址的
|
||||
};
|
||||
|
||||
|
||||
@@ -265,7 +265,6 @@ module.exports = {
|
||||
}
|
||||
});
|
||||
}
|
||||
mylog.info(list);
|
||||
let [newFund, actions] = await Promise.all([
|
||||
fund.addFund(list, { inviter }),
|
||||
Action.find({ userId, type: 1, createdAt: { $gt: start, $lt: now } })
|
||||
|
||||
@@ -8,7 +8,7 @@ const DayLong = 24 * 60 * 60 * 1000;
|
||||
*/
|
||||
class Fund {
|
||||
constructor (data = {}) {
|
||||
const { amount, blockNumber, hash = '', blockHash = '', from = '', to = '', timeStamp, usdtValue = 0, type = 'deposit' } = data;
|
||||
const { amount, blockNumber, hash = '', blockHash = '', from = '', to = '', timeStamp = '', usdtValue = 0, type = 'deposit' } = data;
|
||||
this.status = 0;
|
||||
this.type = type;
|
||||
this.amount = +amount;
|
||||
|
||||
@@ -108,7 +108,6 @@ FundModel.prototype.addFund = async function (txlist = [], option) {
|
||||
});
|
||||
typeof action.save === 'function' && actionPromiseList.push(action.save());
|
||||
txObj.amount = depositAmount; // 之后返回fundList里的数值需要把区块链的数值乘以比率 !!!!
|
||||
mylog.info(JSON.stringify(txObj));
|
||||
return createNewFund({...txObj});
|
||||
});
|
||||
// 1.注入资金
|
||||
|
||||
Reference in New Issue
Block a user