Fix after merge

This commit is contained in:
Mike Fluff 2019-03-06 11:34:17 +07:00
parent f624ced5ce
commit cb722e1608
2 changed files with 5 additions and 5 deletions

View File

@ -312,6 +312,7 @@ export class User {
delete invoice.payment_route; delete invoice.payment_route;
delete invoice.pay_req; delete invoice.pay_req;
delete invoice.decoded; delete invoice.decoded;
result.push(invoice);
} }
return result; return result;
} }

View File

@ -18,8 +18,7 @@ let lightning = require('../lightning');
let identity_pubkey = false; let identity_pubkey = false;
// ###################### SMOKE TESTS ######################## // ###################### SMOKE TESTS ########################
bitcoinclient.request('getinfo', false, function(err, info) { bitcoinclient.request('getblockchaininfo', false, function(err, info) {
console.log(err)
if (info && info.result && info.result.blocks) { if (info && info.result && info.result.blocks) {
if (info.result.blocks < 550000) { if (info.result.blocks < 550000) {
console.error('bitcoind is not caught up'); console.error('bitcoind is not caught up');
@ -252,7 +251,7 @@ router.get('/balance', async function(req, res) {
} }
if (!(await u.getAddress())) await u.generateAddress(); // onchain address needed further if (!(await u.getAddress())) await u.generateAddress(); // onchain address needed further
u.accountForPosibleTxids(); await u.accountForPosibleTxids();
let balance = await u.getBalance(); let balance = await u.getBalance();
if (balance < 0) balance = 0; if (balance < 0) balance = 0;
res.send({ BTC: { AvailableBalance: balance } }); res.send({ BTC: { AvailableBalance: balance } });
@ -280,7 +279,7 @@ router.get('/gettxs', async function(req, res) {
if (!(await u.getAddress())) await u.generateAddress(); // onchain addr needed further if (!(await u.getAddress())) await u.generateAddress(); // onchain addr needed further
try { try {
u.accountForPosibleTxids(); await u.accountForPosibleTxids();
let txs = await u.getTxs(); let txs = await u.getTxs();
res.send(txs); res.send(txs);
} catch (Err) { } catch (Err) {
@ -317,7 +316,7 @@ router.get('/getpending', async function(req, res) {
} }
if (!(await u.getAddress())) await u.generateAddress(); // onchain address needed further if (!(await u.getAddress())) await u.generateAddress(); // onchain address needed further
u.accountForPosibleTxids(); await u.accountForPosibleTxids();
let txs = await u.getPendingTxs(); let txs = await u.getPendingTxs();
res.send(txs); res.send(txs);
}); });