diff options
Diffstat (limited to 'lib/send.js')
| -rw-r--r-- | lib/send.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/send.js b/lib/send.js index e7255219..5997b379 100644 --- a/lib/send.js +++ b/lib/send.js @@ -68,10 +68,7 @@ export default async (amount, memo, hash, user) => { conversionFeeDeduction = Math.min(account.lightning_credits, conversionFee); total = amount + conversionFee - conversionFeeDeduction; - if ( - !account || - account.balance < total - ) { + if (!account || account.balance < total) { warn( "user attempting to send more than they have", user.id, @@ -104,7 +101,10 @@ export default async (amount, memo, hash, user) => { ({ fee, secret, tokens: total } = m); preimage = secret.toString("hex"); } else { - let { msatoshi, msatoshi_sent, payment_preimage } = await ln.pay(hash, tokens ? `${tokens}sats` : undefined); + let { msatoshi, msatoshi_sent, payment_preimage } = await ln.pay( + hash, + tokens ? `${tokens}sats` : undefined + ); preimage = payment_preimage; fee = parseInt((msatoshi_sent - msatoshi) / 1000); total = parseInt(msatoshi / 1000); |
