fix: addFund 金额改为乘以汇率的值
This commit is contained in:
@@ -94,10 +94,12 @@ FundModel.prototype.addFund = async function (txlist = [], option) {
|
|||||||
let newSum = 0;
|
let newSum = 0;
|
||||||
const actionPromiseList = [];
|
const actionPromiseList = [];
|
||||||
const newFundList = txlist.map(txObj => {
|
const newFundList = txlist.map(txObj => {
|
||||||
newSum += +txObj.amount;
|
const depositAmount = +txObj.amount * USDT2VIC_RATE;
|
||||||
|
txObj.amount = depositAmount; // 把区块链的数值乘以比率 !!!!
|
||||||
|
newSum += depositAmount;
|
||||||
const action = createAction(0, {
|
const action = createAction(0, {
|
||||||
userId: this.userId,
|
userId: this.userId,
|
||||||
amount: +txObj.amount * USDT2VIC_RATE,
|
amount: depositAmount,
|
||||||
tokenType: 'vic', // 目前设定只能挖出矿晶vic
|
tokenType: 'vic', // 目前设定只能挖出矿晶vic
|
||||||
remain: this.asset
|
remain: this.asset
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user