feat:addFund充值时自动乘以汇率
This commit is contained in:
@@ -6,6 +6,8 @@ const { createAction } = require('../action/action.handler');
|
||||
const { createNewFund } = require('./fund.handler');
|
||||
const { getNewDepositTx, getUSDTTxList } = require('../../common/deposit');
|
||||
|
||||
const USDT2VIC_RATE = 100;
|
||||
|
||||
const FundSchema = new mongoose.Schema({
|
||||
userId: {
|
||||
type: String
|
||||
@@ -95,7 +97,7 @@ FundModel.prototype.addFund = async function (txlist = [], option) {
|
||||
newSum += +txObj.amount;
|
||||
const action = createAction(0, {
|
||||
userId: this.userId,
|
||||
amount: txObj.amount,
|
||||
amount: +txObj.amount * USDT2VIC_RATE,
|
||||
tokenType: 'vic', // 目前设定只能挖出矿晶vic
|
||||
remain: this.asset
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user