From 253484faae98e043fa6c2ec32ac79bc158008061 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 16 Feb 2021 14:31:01 -0500 Subject: check for account --- lib/send.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); } -- cgit v1.2.3