From 4b5c6dde01fd99fc5962420be37fb850f1fdaeb5 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 6 Jun 2023 00:31:54 -0700 Subject: pass webhook secret --- lib/webhooks.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/webhooks.js') diff --git a/lib/webhooks.js b/lib/webhooks.js index 1158fe9d..e5403b51 100644 --- a/lib/webhooks.js +++ b/lib/webhooks.js @@ -6,13 +6,13 @@ export const callWebhook = async (invoice, payment) => { try { if (!invoice || !payment) return; - let { address, received, text, webhook } = invoice; + let { address, received, text, webhook, secret } = invoice; if (webhook) { let { amount, confirmed, hash, memo } = payment; l("calling webhook", webhook, amount, hash, address, text); - let res = await got(webhook, { + let res = await got.post(webhook, { json: { address, amount, @@ -20,9 +20,10 @@ export const callWebhook = async (invoice, payment) => { hash, memo, received, - text + text, + secret } - }).res(); + }); return res; } } catch (e) { -- cgit v1.2.3