diff options
| author | Adam Soltys <[email protected]> | 2024-03-26 06:17:36 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-03-26 06:17:36 +0000 |
| commit | 0fb1c0363e3f3f87b5fc67b44027a263e269fa25 (patch) | |
| tree | b23e19a5ee303bf2fa8ed92aae9f8d41c7b149b3 /lib | |
| parent | d2fe7ed3227a2ab8a7d2c4921aeb6c6fa429a7cd (diff) | |
| download | coinos-server-0fb1c0363e3f3f87b5fc67b44027a263e269fa25.tar.gz coinos-server-0fb1c0363e3f3f87b5fc67b44027a263e269fa25.zip | |
validate amount
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/payments.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/payments.js b/lib/payments.js index 03085280..a754dc93 100644 --- a/lib/payments.js +++ b/lib/payments.js @@ -593,6 +593,7 @@ export let build = async ({ amount, address, feeRate, user, subtract }) => { let node = getNode(type); amount = parseInt(amount); + if (amount < 0) fail("invalid amount"); let fees = await fetch(`${api[type]}/fees/recommended`).then((r) => r.json()); |
