Ledger-side credit and withdrawal-intent paths

This commit is contained in:
2026-10-22 13:28:55 -04:00
parent 4fea176877
commit 52559f65d7
17 changed files with 842 additions and 40 deletions
+11 -7
View File
@@ -108,11 +108,15 @@ test('operator preflight is read-only, fails closed, and does not disclose crede
} finally { await rm(dir, { recursive: true, force: true }); }
});
test('Monero deposit enrollment API cannot be enabled on testnet', () => {
const result = spawnSync(process.execPath, ['--experimental-strip-types', 'server/index.ts'], {
env: { ...process.env, WIKIDECK_NETWORK: 'testnet', WIKIDECK_MONERO_DEPOSIT_ENROLLMENT: '1' },
encoding: 'utf8', timeout: 30000,
});
assert.equal(result.status, 1);
assert.match(result.stderr, /Monero deposit enrollment requires the mainnet profile/);
test('Monero deposit and withdrawal request APIs cannot be enabled on testnet', () => {
for (const [name, value] of [['WIKIDECK_MONERO_DEPOSIT_ENROLLMENT', '1'],
['WIKIDECK_MONERO_WITHDRAWAL_REQUESTS', '1']]) {
const result = spawnSync(process.execPath, ['--experimental-strip-types', 'server/index.ts'], {
env: { ...process.env, WIKIDECK_NETWORK: 'testnet', [name]: value },
encoding: 'utf8', timeout: 30000,
});
assert.equal(result.status, 1);
assert.match(result.stderr, new RegExp(name.includes('DEPOSIT')
? 'Monero deposit enrollment requires the mainnet profile' : 'Monero withdrawal requests require the mainnet profile'));
}
});