Browse Source

cleanup

master^2
Evan Feenstra 4 years ago
parent
commit
1b7e60bedd
  1. 1
      dist/src/controllers/messages.js
  2. 2
      dist/src/controllers/messages.js.map
  3. 6
      dist/src/controllers/queries.js
  4. 2
      dist/src/controllers/queries.js.map
  5. 1
      src/controllers/messages.ts
  6. 6
      src/controllers/queries.ts

1
dist/src/controllers/messages.js

@ -126,7 +126,6 @@ exports.getMsgs = (req, res) => __awaiter(void 0, void 0, void 0, function* () {
clause.limit = limit; clause.limit = limit;
clause.offset = offset; clause.offset = offset;
} }
console.log('=> clause:', clause);
const messages = yield models_1.models.Message.findAll(clause); const messages = yield models_1.models.Message.findAll(clause);
console.log('=> got msgs', (messages && messages.length)); console.log('=> got msgs', (messages && messages.length));
const chatIds = []; const chatIds = [];

2
dist/src/controllers/messages.js.map

File diff suppressed because one or more lines are too long

6
dist/src/controllers/queries.js

@ -130,11 +130,11 @@ function genChannelAndConfirmAccounting(acc) {
} }
function pollUTXOs() { function pollUTXOs() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
console.log("[WATCH]=> pollUTXOs"); // console.log("[WATCH]=> pollUTXOs")
const accs = yield getPendingAccountings(); const accs = yield getPendingAccountings();
if (!accs) if (!accs)
return; return;
console.log("[WATCH]=> accs", accs.length); // console.log("[WATCH]=> accs", accs.length)
yield asyncForEach(accs, (acc) => __awaiter(this, void 0, void 0, function* () { yield asyncForEach(accs, (acc) => __awaiter(this, void 0, void 0, function* () {
if (acc.confirmations <= 0) if (acc.confirmations <= 0)
return; // needs confs return; // needs confs
@ -150,7 +150,7 @@ function pollUTXOs() {
function checkForConfirmedChannels() { function checkForConfirmedChannels() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const received = yield getReceivedAccountings(); const received = yield getReceivedAccountings();
console.log('[WATCH] received accountings:', received); // console.log('[WATCH] received accountings:', received)
yield asyncForEach(received, (rec) => __awaiter(this, void 0, void 0, function* () { yield asyncForEach(received, (rec) => __awaiter(this, void 0, void 0, function* () {
if (rec.amount <= 0) if (rec.amount <= 0)
return; // needs amount return; // needs amount

2
dist/src/controllers/queries.js.map

File diff suppressed because one or more lines are too long

1
src/controllers/messages.ts

@ -136,7 +136,6 @@ export const getMsgs = async (req, res) => {
clause.limit = limit clause.limit = limit
clause.offset = offset clause.offset = offset
} }
console.log('=> clause:',clause)
const messages = await models.Message.findAll(clause) const messages = await models.Message.findAll(clause)
console.log('=> got msgs', (messages && messages.length)) console.log('=> got msgs', (messages && messages.length))
const chatIds: number[] = [] const chatIds: number[] = []

6
src/controllers/queries.ts

@ -131,10 +131,10 @@ async function genChannelAndConfirmAccounting(acc: Accounting) {
} }
async function pollUTXOs() { async function pollUTXOs() {
console.log("[WATCH]=> pollUTXOs") // console.log("[WATCH]=> pollUTXOs")
const accs: Accounting[] = await getPendingAccountings() const accs: Accounting[] = await getPendingAccountings()
if (!accs) return if (!accs) return
console.log("[WATCH]=> accs", accs.length) // console.log("[WATCH]=> accs", accs.length)
await asyncForEach(accs, async (acc: Accounting) => { await asyncForEach(accs, async (acc: Accounting) => {
if (acc.confirmations <= 0) return // needs confs if (acc.confirmations <= 0) return // needs confs
if (acc.amount <= 0) return // needs amount if (acc.amount <= 0) return // needs amount
@ -147,7 +147,7 @@ async function pollUTXOs() {
async function checkForConfirmedChannels(){ async function checkForConfirmedChannels(){
const received = await getReceivedAccountings() const received = await getReceivedAccountings()
console.log('[WATCH] received accountings:', received) // console.log('[WATCH] received accountings:', received)
await asyncForEach(received, async (rec: Accounting) => { await asyncForEach(received, async (rec: Accounting) => {
if (rec.amount <= 0) return // needs amount if (rec.amount <= 0) return // needs amount
if (!rec.pubkey) return // this shouldnt happen if (!rec.pubkey) return // this shouldnt happen

Loading…
Cancel
Save