FIX: fee_limit when paying

This commit is contained in:
Overtorment
2019-03-19 00:11:25 +00:00
parent 067f2aeae4
commit 0fed216b32
3 changed files with 5 additions and 4 deletions

View File

@@ -30,6 +30,7 @@ let lightning = require('../lightning');
sendResult = await payment.attemptPayToRoute();
} catch (_) {
console.log(_);
console.log('evict lock');
await user.unlockFunds(lockedPayment.pay_req);
continue;
}
@@ -38,7 +39,7 @@ let lightning = require('../lightning');
if (payment.getIsPaid() === true) {
console.log('paid successfully');
sendResult = payment.processSendPaymentResponse(sendResult); // adds fees
console.log('sendResult=', sendResult);
console.log('saving paid invoice:', sendResult);
await user.savePaidLndInvoice(sendResult);
await user.unlockFunds(lockedPayment.pay_req);
} else if (payment.getIsPaid() === false) {