From b0e8f2b9d13efb45aea60baa0dd689a31426c3f5 Mon Sep 17 00:00:00 2001 From: chaosBreaking Date: Sat, 28 Sep 2019 12:14:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20addFund=20=E9=87=91=E9=A2=9D=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E4=B9=98=E4=BB=A5=E6=B1=87=E7=8E=87=E7=9A=84=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/fund/fund.model.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/fund/fund.model.js b/src/modules/fund/fund.model.js index 4142d1a..7acf99f 100644 --- a/src/modules/fund/fund.model.js +++ b/src/modules/fund/fund.model.js @@ -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 });