Browse Source

working

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

6
dist/src/controllers/queries.js

@ -167,8 +167,8 @@ function checkChannelsAndKeysend(rec) {
const msg = {
type: constants_1.default.message_types.keysend,
};
const MINUS_AMT = 2500;
const amount = rec.amount - parseInt(chan.local_chan_reserve_sat || 0) - parseInt(chan.commit_fee || 0) - MINUS_AMT;
const MINUS_AMT = 2000;
const amount = rec.amount - parseInt(chan.local_chan_reserve_sat || 0) - parseInt(chan.remote_chan_reserve_sat || 0) - parseInt(chan.commit_fee || 0) - MINUS_AMT;
console.log('[WATCH] amt to final keysend', amount);
helpers.performKeysendMessage({
sender: owner,
@ -192,7 +192,7 @@ function checkChannelsAndKeysend(rec) {
});
}
function startWatchingUTXOs() {
setInterval(pollUTXOs, 60000); // every 10 minutes
setInterval(pollUTXOs, 600000); // every 10 minutes
}
exports.startWatchingUTXOs = startWatchingUTXOs;
function queryOnchainAddress(req, res) {

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

File diff suppressed because one or more lines are too long

6
src/controllers/queries.ts

@ -160,8 +160,8 @@ async function checkChannelsAndKeysend(rec: Accounting){
const msg: { [k: string]: any } = {
type: constants.message_types.keysend,
}
const MINUS_AMT = 2500
const amount = rec.amount - parseInt(chan.local_chan_reserve_sat||0) - parseInt(chan.commit_fee||0) - MINUS_AMT
const MINUS_AMT = 2000
const amount = rec.amount - parseInt(chan.local_chan_reserve_sat||0) - parseInt(chan.remote_chan_reserve_sat||0) - parseInt(chan.commit_fee||0) - MINUS_AMT
console.log('[WATCH] amt to final keysend', amount)
helpers.performKeysendMessage({
sender: owner,
@ -185,7 +185,7 @@ async function checkChannelsAndKeysend(rec: Accounting){
}
export function startWatchingUTXOs() {
setInterval(pollUTXOs, 60000) // every 10 minutes
setInterval(pollUTXOs, 600000) // every 10 minutes
}
export async function queryOnchainAddress(req, res) {

Loading…
Cancel
Save