aboutsummaryrefslogtreecommitdiffstats
path: root/lib/send.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2021-02-16 14:31:01 -0500
committerAdam Soltys <[email protected]>2021-02-16 14:31:01 -0500
commit253484faae98e043fa6c2ec32ac79bc158008061 (patch)
tree2718d7a59f502bdede01e001a5cd504590fadaa3 /lib/send.js
parent9d4e7bee7d884fba7da27df7180390bad9a80bdc (diff)
downloadcoinos-server-253484faae98e043fa6c2ec32ac79bc158008061.tar.gz
coinos-server-253484faae98e043fa6c2ec32ac79bc158008061.zip
check for account
Diffstat (limited to 'lib/send.js')
-rw-r--r--lib/send.js2
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");
}