Trocador: route status updates through prices.neroswap.com webhook

Per Trocador's commercial team, webhook-driven status updates are preferred
over polling. Adding 'webhook' param to /new_trade so Trocador POSTs status
changes to our Cloudflare Worker, which caches them in KV for the wallet to
read.

This commit only adds the producer side. The wallet still polls Trocador
directly (every 5 min via trade_monitor.dart); switching the polling source
to our worker is a follow-up.
This commit is contained in:
jwinterm
2026-05-14 15:58:01 -04:00
parent 4fd8ed4109
commit f4f1bfeec1
8 changed files with 6 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -237,6 +237,12 @@ class TrocadorExchangeProvider extends ExchangeProvider {
'address': request.toAddress,
'refund': request.refundAddress,
'refund_memo': '0',
// Hash Wallet: route trade-status updates through our Cloudflare Worker
// (github.com/Such-Software/hash-wallet-prices). Trocador POSTs the trade
// body on every status change; the wallet polls our worker for the
// cached status instead of hammering Trocador. Per their commercial
// team's request to use webhooks over polling.
'webhook': 'https://prices.neroswap.com/v1/trocador-webhook',
};
if (isFixedRateMode) {