fix : htf
This commit is contained in:
@@ -75,13 +75,17 @@ const FundSchema = new mongoose.Schema({
|
||||
|
||||
const FundModel = mongoose.model('Fund', FundSchema);
|
||||
|
||||
FundModel.prototype.hasNewDeposit = async function () {
|
||||
FundModel.prototype.hasNewDeposit = async () => {
|
||||
if (this.tokenAddress.usdtETH) {
|
||||
const usdtTx = await getUSDTTxList(this.tokenAddress.usdtETH.address);
|
||||
const fundList = this.fundList;
|
||||
const newDepositList = getNewDepositTx(usdtTx, fundList);
|
||||
if (newDepositList && newDepositList.length > 0)
|
||||
return { hasNew: true, list: newDepositList };
|
||||
if (usdtTx && usdtTx.length > 0) {
|
||||
const fundList = this.fundList;
|
||||
const newDepositList = getNewDepositTx(usdtTx, fundList);
|
||||
if (newDepositList && newDepositList.length > 0) {
|
||||
mylog.info(`用户${this.userId} 有新的充值记录`);
|
||||
return { hasNew: true, list: newDepositList };
|
||||
}
|
||||
}
|
||||
}
|
||||
return { hasNew: false };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user