MoonPay fallback: use the working /buy/matic page (the /buy/pol slug 404s)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -613,7 +613,7 @@ const server = http.createServer(async (req, res) => {
|
|||||||
const sig = crypto.createHmac('sha256', sk).update(qs).digest('base64');
|
const sig = crypto.createHmac('sha256', sk).update(qs).digest('base64');
|
||||||
return json(res, 200, { url: 'https://buy.moonpay.com/' + qs + '&signature=' + encodeURIComponent(sig), signed: true, pol });
|
return json(res, 200, { url: 'https://buy.moonpay.com/' + qs + '&signature=' + encodeURIComponent(sig), signed: true, pol });
|
||||||
}
|
}
|
||||||
return json(res, 200, { url: 'https://www.moonpay.com/buy/pol', signed: false, pol });
|
return json(res, 200, { url: 'https://www.moonpay.com/buy/matic', signed: false, pol }); // MoonPay's Polygon page still lives at the old slug; /buy/pol renders their 404 (same fix as RM Circle)
|
||||||
}
|
}
|
||||||
if (p === '/api/catalog' && req.method === 'GET') {
|
if (p === '/api/catalog' && req.method === 'GET') {
|
||||||
// five live quotes per call: serve a 20-second cache so pages that load the
|
// five live quotes per call: serve a 20-second cache so pages that load the
|
||||||
|
|||||||
Reference in New Issue
Block a user