mirror of
https://github.com/mempool/mempool.git
synced 2026-08-13 12:33:11 +02:00
Fix: /fee-estimates BDK-Esplora protocol compliance
This commit is contained in:
parent
b3bfdd8c26
commit
a42730d1bc
1 changed files with 12 additions and 1 deletions
|
|
@ -143,8 +143,19 @@ class BitcoinRoutes {
|
|||
}
|
||||
const result = feeApi.getPreciseRecommendedFee();
|
||||
|
||||
// Note: Manually tested against rust-esplora-client 0.12.3
|
||||
// to make sure the status code and extra header didn't blow everything up.
|
||||
// 3xx redirects with a Location header were silently followed and caused the client to
|
||||
// blow up, 4xx and 5xx caused errors in the client as well, so only 2xx was acceptable for this endpoint.
|
||||
|
||||
// HTTP 203 Non-Authoritative Information is used to indicate
|
||||
// that the response is not the original from the server, but a transformed version of it.
|
||||
res.statusCode = 203;
|
||||
res.setHeader(
|
||||
'x-warning-from-mempool',
|
||||
`This endpoint is deprecated and will be removed in a future release. Please use /api/v1/fees/precise instead.`,
|
||||
);
|
||||
res.json({
|
||||
'warning': 'This endpoint is deprecated and will be removed in a future release. Please use /api/v1/fees/precise instead.',
|
||||
'1': result.fastestFee,
|
||||
'2': result.fastestFee,
|
||||
'3': result.halfHourFee,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue