taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit ace3ce35ddf1c8f6cda9dc7cefc96884ccb77753
parent a84803970b1e6147e4508542b730c7f1a0ba2606
Author: Florian Dold <dold@taler.net>
Date:   Thu,  3 Sep 2026 15:33:41 +0200

wallet-core: settle the transaction promise on abort

A transaction aborted between requests, or whose commit failed, only
fires the abort event; the restore and clear paths then waited forever
under the exclusive DB lock.

Diffstat:
Mpackages/taler-wallet-core/src/db/indexeddb/database.ts | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/packages/taler-wallet-core/src/db/indexeddb/database.ts b/packages/taler-wallet-core/src/db/indexeddb/database.ts @@ -159,7 +159,12 @@ export function promiseFromTransaction( resolve(); }; transaction.onerror = () => { - reject(); + reject(transaction.error ?? Error("transaction failed")); + }; + // An abort without a pending request (explicit abort, or a failed + // commit) fires only the abort event. + transaction.onabort = () => { + reject(transaction.error ?? Error("transaction aborted")); }; }); }