SHA256
Перевести донаты на Stars и обновить Devnet
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user