Custodial financial storage

This commit is contained in:
2026-10-20 15:21:47 -04:00
parent e48081f041
commit c254c4c537
19 changed files with 1041 additions and 14 deletions
+3
View File
@@ -76,6 +76,9 @@ export class CustodyMarket {
db.exec('BEGIN IMMEDIATE');
let id: string;
try {
if (db.prepare("SELECT 1 FROM custody_meta WHERE key='postgres_cutover'").get()) {
throw new Error('SQLite custody was frozen for PostgreSQL cutover; resume the import, never restart SQLite');
}
const row = db.prepare('SELECT value FROM custody_meta WHERE key=?').get('identity') as { value: string } | undefined;
if (row) {
const identity = JSON.parse(row.value);