diff options
| author | Adam Soltys <[email protected]> | 2022-08-23 18:54:13 -0400 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-08-23 18:54:15 -0400 |
| commit | 653d14e8f7b8bee93847f1d330ad1d38ac2ffddf (patch) | |
| tree | b5d4428b01ed1b60cd850074a2ad6ed47c47dc30 /lib | |
| parent | 52de78167f0a9a4f28e06c8e4d2883305a6046d5 (diff) | |
| download | coinos-server-653d14e8f7b8bee93847f1d330ad1d38ac2ffddf.tar.gz coinos-server-653d14e8f7b8bee93847f1d330ad1d38ac2ffddf.zip | |
deduct fee before warning
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/send.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/send.js b/lib/send.js index 247ad9f5..414c7e3e 100644 --- a/lib/send.js +++ b/lib/send.js @@ -63,7 +63,8 @@ send = async (amount, memo, hash, user) => { conversionFee ); - if (!account || account.balance < amount + conversionFee) { + if (!account || account.balance < amount + conversionFee - conversionFeeDeduction) { + l.warn("user attempting to send more than they have", user.id, amount, conversionFee); throw new Error("Insufficient funds"); } |
