feat: mongodb配置更新;在充值action里记录区块链数值,在fundList里乘汇率
This commit is contained in:
@@ -95,15 +95,15 @@ FundModel.prototype.addFund = async function (txlist = [], option) {
|
||||
const actionPromiseList = [];
|
||||
const newFundList = txlist.map(txObj => {
|
||||
const depositAmount = +txObj.amount * USDT2VIC_RATE;
|
||||
txObj.amount = depositAmount; // 把区块链的数值乘以比率 !!!!
|
||||
newSum += depositAmount;
|
||||
const action = createAction(0, {
|
||||
userId: this.userId,
|
||||
amount: depositAmount,
|
||||
amount: +txObj.amount, // 充值记录的数值仍然是区块链的数值
|
||||
tokenType: 'vic', // 目前设定只能挖出矿晶vic
|
||||
remain: this.asset
|
||||
});
|
||||
actionPromiseList.push(action.save());
|
||||
txObj.amount = depositAmount; // 之后返回fundList里的数值需要把区块链的数值乘以比率 !!!!
|
||||
return createNewFund(txObj);
|
||||
});
|
||||
// 1.注入资金
|
||||
|
||||
Reference in New Issue
Block a user