fix: 资产返回
This commit is contained in:
@@ -35,7 +35,7 @@ module.exports = {
|
|||||||
return res.json({
|
return res.json({
|
||||||
code: 0,
|
code: 0,
|
||||||
msg: 'success',
|
msg: 'success',
|
||||||
data: fund
|
data: fund && fund.asset
|
||||||
});
|
});
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
mylog.error("[getFundDetail]", err);
|
mylog.error("[getFundDetail]", err);
|
||||||
@@ -120,8 +120,8 @@ module.exports = {
|
|||||||
msg: '资金不足',
|
msg: '资金不足',
|
||||||
error: 'insufficient fund'
|
error: 'insufficient fund'
|
||||||
});
|
});
|
||||||
const action = createAction(3, { userId, amount, remain: fund.asset, op: 0, detail: { targetAddress } });
|
const action = createAction(3, { userId, amount, remain: fund.asset, op: 0, detail: { targetAddress, coinId } });
|
||||||
const ticket = createTicket('withdraw', { userId, amount: +amount, action, targetAddress });
|
const ticket = createTicket('withdraw', { userId, amount: +amount, action, targetAddress, coinId });
|
||||||
try {
|
try {
|
||||||
await fund.decrease(coinId, cost);
|
await fund.decrease(coinId, cost);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user