fix: obj -> list
This commit is contained in:
@@ -8,6 +8,7 @@ const { createTicket } = require('../ticket/ticket.handler');
|
|||||||
const { deriveNewAccount } = require('../../utils/account');
|
const { deriveNewAccount } = require('../../utils/account');
|
||||||
const actionFilter = 'id type amount detail op createdAt';
|
const actionFilter = 'id type amount detail op createdAt';
|
||||||
const { inject } = require('../../common/Provider');
|
const { inject } = require('../../common/Provider');
|
||||||
|
const ETH = require('../../utils/erc20').ERC20;
|
||||||
|
|
||||||
const depositCoinsList = [{
|
const depositCoinsList = [{
|
||||||
id: 'usdtBTC',
|
id: 'usdtBTC',
|
||||||
@@ -160,7 +161,13 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
return data ? res.json({
|
return data ? res.json({
|
||||||
code: 0,
|
code: 0,
|
||||||
data
|
data: Object.keys(data).map(key => {
|
||||||
|
return {
|
||||||
|
id: key,
|
||||||
|
label: key,
|
||||||
|
address: data[key] && data[key].address
|
||||||
|
};
|
||||||
|
})
|
||||||
}) : res.json({
|
}) : res.json({
|
||||||
code: 500,
|
code: 500,
|
||||||
msg: '系统错误'
|
msg: '系统错误'
|
||||||
@@ -182,6 +189,7 @@ module.exports = {
|
|||||||
// 查询资金,直接拉数据库,区块链的查询交给定时任务
|
// 查询资金,直接拉数据库,区块链的查询交给定时任务
|
||||||
async refreshFund (req, res) {
|
async refreshFund (req, res) {
|
||||||
// todo: 要求刷新程序去刷新
|
// todo: 要求刷新程序去刷新
|
||||||
|
|
||||||
return this.getFundList(req, res);
|
return this.getFundList(req, res);
|
||||||
},
|
},
|
||||||
async getFundList (req, res) {
|
async getFundList (req, res) {
|
||||||
@@ -234,5 +242,4 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user