diff options
| author | Adam Soltys <[email protected]> | 2021-02-16 14:31:01 -0500 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-02-16 14:31:01 -0500 |
| commit | 253484faae98e043fa6c2ec32ac79bc158008061 (patch) | |
| tree | 2718d7a59f502bdede01e001a5cd504590fadaa3 | |
| parent | 9d4e7bee7d884fba7da27df7180390bad9a80bdc (diff) | |
| download | coinos-server-253484faae98e043fa6c2ec32ac79bc158008061.tar.gz coinos-server-253484faae98e043fa6c2ec32ac79bc158008061.zip | |
check for account
| -rw-r--r-- | lib/send.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/send.js b/lib/send.js index 98fa4d2c..6aff80c4 100644 --- a/lib/send.js +++ b/lib/send.js @@ -27,7 +27,7 @@ send = async (amount, memo, hash, user) => { transaction }); - if (account.balance < amount) { + if (!account || account.balance < amount) { throw new Error("Insufficient funds"); } |
