diff options
Diffstat (limited to 'lib/webhooks.js')
| -rw-r--r-- | lib/webhooks.js | 9 |
1 files changed, 5 insertions, 4 deletions
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) { |
