Перевести донаты на 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
+7 -7
View File
@@ -5,10 +5,10 @@ import { supportStatsValues } from '../js/components/support-stats.js';
function file(path) { return readFileSync(new URL(path, import.meta.url), 'utf8'); }
test('three displayed counters: full sent, net received, sent/10 + direct', () => {
assert.deepEqual(supportStatsValues({ supportSent: 1_000_000_000n, supportReceived: 900_000_000n, daoDirect: 200_000_000n }), [1_000_000_000n, 900_000_000n, 300_000_000n]);
test('three displayed counters: sent, received, direct DAO in star cents', () => {
assert.deepEqual(supportStatsValues({ supportSent: 1_000_000_000n, supportReceived: 900_000_000n, daoDirect: 200_000_000n }), [1_000_000_000n, 900_000_000n, 200_000_000n]);
assert.deepEqual(supportStatsValues({}), [0n, 0n, 0n]);
assert.deepEqual(supportStatsValues({ supportSent: '10000000000000000000', supportReceived: '9000000000000000000', daoDirect: '250000000000000000' }), [10000000000000000000n, 9000000000000000000n, 1250000000000000000n]);
assert.deepEqual(supportStatsValues({ supportSent: '10000000000000000000', supportReceived: '9000000000000000000', daoDirect: '250000000000000000' }), [10000000000000000000n, 9000000000000000000n, 250000000000000000n]);
});
test('profile views attach counters from server cache and support user action', () => {
@@ -35,13 +35,13 @@ test('message buttons pass checked block hashes, not message text', () => {
}
});
test('shared modal protects direct and tracked workflows', () => {
test('shared modal requires Stars and oracle quote', () => {
const src = file('../js/components/shine-support-dialog.js');
assert.match(src, /supportShineUserOnSolana/);
assert.match(src, /supportShineDaoOnSolana/);
assert.match(src, /transferSolLamports/);
assert.match(src, /window\.confirm\(t\('screens\.support_phase2\.direct_warning'\)\)/);
assert.match(src, /amount % 10n/);
assert.match(src, /starCentsToLamports/);
assert.match(src, /getStarsQuoteFromRpc/);
assert.match(src, /parseStarCents/);
});
test('profile statistics use server API without Solana RPC', () => {