From a72f6dd09181ecdd77cc9697d59c999a4f32a85c Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Mon, 13 Jan 2020 22:05:53 -0400 Subject: [PATCH] check auth --- services/gunDB/contact-api/actions.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/gunDB/contact-api/actions.js b/services/gunDB/contact-api/actions.js index b9f4da32..9a994731 100644 --- a/services/gunDB/contact-api/actions.js +++ b/services/gunDB/contact-api/actions.js @@ -849,6 +849,10 @@ const sendHRWithInitialMsg = async ( * @returns {Promise} */ const sendPayment = async (to, amount, memo, gun, user, SEA) => { + if (!user.is) { + throw new Error(ErrorCode.NOT_AUTH) + } + const recipientEpub = await Utils.pubToEpub(to) const ourSecret = await SEA.secret(recipientEpub, user._.sea)