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.
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
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) {
|
||||
|
||||