mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-10-05 19:28:26 +00:00
fix(db): drop mint_counters + reservations in cleanAll
cleanAll only dropped transactions/proofs/dbversion, leaving the mint_counters and reservations tables (added by later migrations) behind. A wallet wipe would keep stale derivation counters, which the next launch would hydrate. Drop them too (IF EXISTS, so an old DB lacking them doesn't abort the atomic batch). Tables are recreated on next launch via the IF-NOT-EXISTS schema bootstrap. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
de85703b4d
commit
196caca42a
@@ -59,6 +59,10 @@ export const cleanAll = function () {
|
||||
['DROP TABLE transactions'],
|
||||
['DROP TABLE proofs'],
|
||||
['DROP TABLE dbversion'],
|
||||
// IF EXISTS: these tables were added by later migrations, so a very old DB
|
||||
// may lack them; without the guard a missing table aborts the atomic batch.
|
||||
['DROP TABLE IF EXISTS reservations'],
|
||||
['DROP TABLE IF EXISTS mint_counters'],
|
||||
] as SQLBatchTuple[]
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user