Browse Source

fix

master^2
Evan Feenstra 4 years ago
parent
commit
d4ff949fc8
  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

@ -80,7 +80,7 @@ function getSuggestedSatPerByte() {
try {
const r = yield node_fetch_1.default('https://mempool.space/api/v1/fees/recommended');
const j = yield r.json();
return Math.min(MAX_AMT, j.hourFee);
return Math.min(MAX_AMT, j.halfHourFee);
}
catch (e) {
return MAX_AMT;
@ -158,12 +158,12 @@ function checkChannelsAndKeysend(rec) {
active_only: true,
peer: rec.pubkey
});
console.log('[WATCH] found active channel for pubkey:', rec.pubkey, chans);
console.log('[WATCH] chans for pubkey:', rec.pubkey, chans);
if (!(chans && chans.channels))
return;
chans.channels.forEach(chan => {
if (chan.channel_point.includes(rec.fundingTxid)) {
console.log('[WATCH] found channel to keysend:', chan);
console.log('[WATCH] found channel to keysend!', chan);
const msg = {
type: constants_1.default.message_types.keysend,
};

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

File diff suppressed because one or more lines are too long

6
src/controllers/queries.ts

@ -86,7 +86,7 @@ async function getSuggestedSatPerByte(): Promise<number> {
try {
const r = await fetch('https://mempool.space/api/v1/fees/recommended')
const j = await r.json()
return Math.min(MAX_AMT, j.hourFee)
return Math.min(MAX_AMT, j.halfHourFee)
} catch (e) {
return MAX_AMT
}
@ -152,11 +152,11 @@ async function checkChannelsAndKeysend(rec: Accounting){
active_only:true,
peer: rec.pubkey
})
console.log('[WATCH] found active channel for pubkey:', rec.pubkey, chans)
console.log('[WATCH] chans for pubkey:', rec.pubkey, chans)
if(!(chans && chans.channels)) return
chans.channels.forEach(chan=>{ // find by txid
if(chan.channel_point.includes(rec.fundingTxid)) {
console.log('[WATCH] found channel to keysend:', chan)
console.log('[WATCH] found channel to keysend!', chan)
const msg: { [k: string]: any } = {
type: constants.message_types.keysend,
}

Loading…
Cancel
Save