diff options
author | Florian Dold <florian@dold.me> | 2021-05-20 18:27:35 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-05-20 18:27:35 +0200 |
commit | 9a861b80efc1b753296b477ce61b8abf24137dee (patch) | |
tree | cf0e50ba1ba6e7e4a17950ae29ffdee9afc1c312 /packages/taler-wallet-core/src | |
parent | 6f1b7f5b998c1d7c385cad2f29a85db311999131 (diff) | |
download | wallet-core-9a861b80efc1b753296b477ce61b8abf24137dee.tar.xz |
allow deletion via API
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index c380786ab..317d81ceb 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -25,6 +25,7 @@ import { BackupRecovery, codecForAny, + codecForDeleteTransactionRequest, DeleteTransactionRequest, TalerErrorCode, WalletCurrencyInfo, @@ -1191,9 +1192,15 @@ export class Wallet { const req = codecForCreateDepositGroupRequest().decode(payload); return await createDepositGroup(this.ws, req); } - case "trackDepositGroup": + case "trackDepositGroup": { const req = codecForTrackDepositGroupRequest().decode(payload); return trackDepositGroup(this.ws, req); + } + case "deleteTransaction": { + const req = codecForDeleteTransactionRequest().decode(payload); + await deleteTransaction(this.ws, req.transactionId); + return {}; + } } throw OperationFailedError.fromCode( TalerErrorCode.WALLET_CORE_API_OPERATION_UNKNOWN, |