mirror of
https://codeberg.org/wownero/wownero-lws
synced 2026-01-10 23:55:16 -08:00
Add ZMQ-PUB support for webhooks (#75)
This commit is contained in:
committed by
Lee *!* Clagett
parent
d59fed6da2
commit
15e2be618a
@@ -177,3 +177,4 @@ namespace lws
|
||||
}
|
||||
} // lws
|
||||
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@ namespace db
|
||||
map_webhook_value(dest, source, payment_id);
|
||||
}
|
||||
|
||||
void write_bytes(wire::json_writer& dest, const webhook_tx_confirmation& self)
|
||||
void write_bytes(wire::writer& dest, const webhook_tx_confirmation& self)
|
||||
{
|
||||
crypto::hash8 payment_id;
|
||||
static_assert(sizeof(payment_id) == sizeof(self.value.first.payment_id), "bad memcpy");
|
||||
|
||||
@@ -299,7 +299,7 @@ namespace db
|
||||
webhook_value value;
|
||||
output tx_info;
|
||||
};
|
||||
void write_bytes(wire::json_writer&, const webhook_tx_confirmation&);
|
||||
void write_bytes(wire::writer&, const webhook_tx_confirmation&);
|
||||
|
||||
//! References a specific output that triggered a webhook
|
||||
struct webhook_output
|
||||
|
||||
@@ -2192,6 +2192,7 @@ namespace db
|
||||
|
||||
expect<void> storage::add_webhook(const webhook_type type, const account_address& address, const webhook_value& event)
|
||||
{
|
||||
if (event.second.url != "zmq")
|
||||
{
|
||||
epee::net_utils::http::url_content url{};
|
||||
if (event.second.url.empty() || !epee::net_utils::parse_url(event.second.url, url))
|
||||
|
||||
Reference in New Issue
Block a user