Перевести донаты на Stars и обновить Devnet

This commit is contained in:
AidarKC
2026-11-14 00:55:02 +03:00
parent c972a975fd
commit 97db033eb8
39 changed files with 1020 additions and 198 deletions
@@ -13,9 +13,9 @@ export function loadVerifiedSupportTotals(selector) {
const messages = new Map();
for (const row of response?.messages || []) {
const id = `${String(row.blockNumber)}:${String(row.blockHash).toLowerCase()}`;
messages.set(id, String(row.receivedLamports));
messages.set(id, String(row.receivedStarCents));
}
return { channelReceivedLamports: String(response?.channelReceivedLamports || '0'), messages };
return { channelReceivedStarCents: String(response?.channelReceivedStarCents || '0'), messages };
})
.catch(() => { cache.delete(key); return null; });
cache.set(key, promise);
@@ -23,12 +23,12 @@ export function loadVerifiedSupportTotals(selector) {
return cache.get(key);
}
export function formatVerifiedSupportLamports(value) {
export function formatVerifiedSupportStars(value) {
try {
const n = BigInt(value);
if (n <= 0n) return null;
const whole = n / 1_000_000_000n;
const fraction = String(n % 1_000_000_000n).padStart(9, '0').replace(/0+$/, '');
return `${whole}${fraction ? '.' + fraction : ''} SOL`;
const whole = n / 100n;
const fraction = String(n % 100n).padStart(2, '0');
return `${whole}.${fraction} ⭐`;
} catch { return null; }
}