diff options
author | Florian Dold <florian@dold.me> | 2024-03-31 16:54:57 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-03-31 16:54:57 +0200 |
commit | c0146d7e7c209159930d695ccc740570173fbc43 (patch) | |
tree | 10ab4b6ae124faa65d47e86918895c55093a6e6e /packages/taler-wallet-core/src | |
parent | f45340eb11435f47a3a561c724cd356e5b4ba885 (diff) | |
download | wallet-core-c0146d7e7c209159930d695ccc740570173fbc43.tar.xz |
wallet-core: allow deleting denom loss transactions
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r-- | packages/taler-wallet-core/src/exchanges.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/exchanges.ts b/packages/taler-wallet-core/src/exchanges.ts index a57215ee4..2680ede78 100644 --- a/packages/taler-wallet-core/src/exchanges.ts +++ b/packages/taler-wallet-core/src/exchanges.ts @@ -1826,12 +1826,15 @@ export class DenomLossTransactionContext implements TransactionContext { failTransaction(): Promise<void> { throw new Error("Method not implemented."); } - deleteTransaction(): Promise<void> { + async deleteTransaction(): Promise<void> { + await this.wex.db.runReadWriteTx(["denomLossEvents"], async (tx) => { + await tx.denomLossEvents.delete(this.denomLossEventId); + }); throw new Error("Method not implemented."); } constructor( - wex: WalletExecutionContext, + private wex: WalletExecutionContext, public denomLossEventId: string, ) { this.transactionId = constructTransactionIdentifier({ |