fix: hotfix

This commit is contained in:
chaosBreaking
2019-09-29 13:09:35 +08:00
parent fc383be299
commit 0cb188bb8c
2 changed files with 2 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ function createAction (actCode, data) {
function createDepositAction(data = {}) { function createDepositAction(data = {}) {
const { userId, amount, tokenType, remain } = data; const { userId, amount, tokenType, remain } = data;
if (!userId || !amount || !tokenType) return false; if (!userId || !tokenType) return false;
return new Action({ return new Action({
userId, userId,
type: 0, type: 0,

View File

@@ -107,7 +107,7 @@ FundModel.prototype.addFund = async (txlist = [], option) => {
tokenType: 'vic', // 目前设定只能挖出矿晶vic tokenType: 'vic', // 目前设定只能挖出矿晶vic
remain: this.asset remain: this.asset
}); });
actionPromiseList.push(action.save()); typeof action.save === 'function' && actionPromiseList.push(action.save());
txObj.amount = depositAmount; // 之后返回fundList里的数值需要把区块链的数值乘以比率 txObj.amount = depositAmount; // 之后返回fundList里的数值需要把区块链的数值乘以比率
return createNewFund(txObj); return createNewFund(txObj);
}); });