Browse Source

fix parseInt

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

3
dist/src/controllers/queries.js

@ -167,7 +167,8 @@ function checkChannelsAndKeysend(rec) {
const msg = { const msg = {
type: constants_1.default.message_types.keysend, type: constants_1.default.message_types.keysend,
}; };
const amount = rec.amount - (chan.local_chan_reserve_sat || 0) - (chan.commit_fee || 0); const amount = rec.amount - parseInt(chan.local_chan_reserve_sat || 0) - parseInt(chan.commit_fee || 0);
console.log('[WATCH] amt to final keysend', amount);
helpers.performKeysendMessage({ helpers.performKeysendMessage({
sender: owner, sender: owner,
destination_key: rec.pubkey, destination_key: rec.pubkey,

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

File diff suppressed because one or more lines are too long

3
src/controllers/queries.ts

@ -160,7 +160,8 @@ async function checkChannelsAndKeysend(rec: Accounting){
const msg: { [k: string]: any } = { const msg: { [k: string]: any } = {
type: constants.message_types.keysend, type: constants.message_types.keysend,
} }
const amount = rec.amount - (chan.local_chan_reserve_sat||0) - (chan.commit_fee||0) const amount = rec.amount - parseInt(chan.local_chan_reserve_sat||0) - parseInt(chan.commit_fee||0)
console.log('[WATCH] amt to final keysend', amount)
helpers.performKeysendMessage({ helpers.performKeysendMessage({
sender: owner, sender: owner,
destination_key: rec.pubkey, destination_key: rec.pubkey,

Loading…
Cancel
Save