From 4880d4a5cc0a5af8f74041fea248e653faeb17fc Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 7 Oct 2022 22:28:14 -0700 Subject: prettier --- lib/webhooks.js | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'lib/webhooks.js') diff --git a/lib/webhooks.js b/lib/webhooks.js index 51a9a99e..4741932a 100644 --- a/lib/webhooks.js +++ b/lib/webhooks.js @@ -4,34 +4,34 @@ import { l } from "$lib/logging"; export const callWebhook = async (invoice, payment) => { try { - if (!invoice || !payment) return; + if (!invoice || !payment) return; - let { address, received, text, webhook } = invoice; + let { address, received, text, webhook } = invoice; - if (webhook) { - let { amount, confirmed, hash, memo, account } = payment; - let { asset } = account; - let secret = config.webhooks[webhook]; + if (webhook) { + let { amount, confirmed, hash, memo, account } = payment; + let { asset } = account; + let secret = config.webhooks[webhook]; - l("calling webhook", webhook, amount, hash, address, text); - let res = await wretch() - .headers({ "x-webhook": secret }) - .url(webhook) - .post({ - address, - amount, - asset, - confirmed, - hash, - memo, - received, - text, - webhook - }) - .res() - return res; + l("calling webhook", webhook, amount, hash, address, text); + let res = await wretch() + .headers({ "x-webhook": secret }) + .url(webhook) + .post({ + address, + amount, + asset, + confirmed, + hash, + memo, + received, + text, + webhook + }) + .res(); + return res; + } + } catch (e) { + console.log("problem calling webhook", e); } - } catch(e) { - console.log("problem calling webhook", e) - } }; -- cgit v1.2.3