diff options
| author | Adam Soltys <[email protected]> | 2022-10-05 12:15:48 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-10-05 12:15:48 -0700 |
| commit | fb91aa048617f0894e01c1e890ec957a3170539f (patch) | |
| tree | 5630fbe3bb5eb67fc0fba2bba79b8b763609d93a /lib/send.js | |
| parent | 160d95f693d7d8a17e864313b06790a841d4e160 (diff) | |
| download | coinos-server-fb91aa048617f0894e01c1e890ec957a3170539f.tar.gz coinos-server-fb91aa048617f0894e01c1e890ec957a3170539f.zip | |
prettier
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); |
