diff options
| author | Adam Soltys <[email protected]> | 2021-08-12 13:27:47 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-08-12 13:27:47 -0700 |
| commit | 683cb1c1c8e5ed0fa5e9fdc9aafb3cf1bd086860 (patch) | |
| tree | 65a9c9466e23a450e5fb07807b3073018afb7803 /lib | |
| parent | da864d3ae0f6ad2c81e6b676735e5381f6df815c (diff) | |
| parent | 30598010bf13159b62ef77fde9c3338bb405f270 (diff) | |
| download | coinos-server-683cb1c1c8e5ed0fa5e9fdc9aafb3cf1bd086860.tar.gz coinos-server-683cb1c1c8e5ed0fa5e9fdc9aafb3cf1bd086860.zip | |
Merge branch 'master' into dev
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/webhooks.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/webhooks.js b/lib/webhooks.js index f21607fb..86e1a07b 100644 --- a/lib/webhooks.js +++ b/lib/webhooks.js @@ -8,19 +8,23 @@ callWebhook = (invoice, payment) => { let { address, text, webhook } = invoice; if (webhook) { - let { amount, confirmed, hash, memo } = payment; + let { amount, confirmed, hash, memo, account } = payment; + let { asset } = account; + let secret = config.webhooks[webhook]; l.info("calling webhook", webhook); return wretch() + .headers({ "x-webhook": secret }) .url(webhook) .post({ address, + asset, amount, hash, memo, confirmed, text, - webhook + webhook, }) .json() .catch(console.log); |
