fix: addFund 金额改为乘以汇率的值

This commit is contained in:
chaosBreaking
2019-09-28 12:14:09 +08:00
parent 12021334ab
commit b0e8f2b9d1

View File

@@ -94,10 +94,12 @@ FundModel.prototype.addFund = async function (txlist = [], option) {
let newSum = 0;
const actionPromiseList = [];
const newFundList = txlist.map(txObj => {
newSum += +txObj.amount;
const depositAmount = +txObj.amount * USDT2VIC_RATE;
txObj.amount = depositAmount; // 把区块链的数值乘以比率
newSum += depositAmount;
const action = createAction(0, {
userId: this.userId,
amount: +txObj.amount * USDT2VIC_RATE,
amount: depositAmount,
tokenType: 'vic', // 目前设定只能挖出矿晶vic
remain: this.asset
});