allow deletion via API
This commit is contained in:
parent
6f1b7f5b99
commit
9a861b80ef
@ -68,8 +68,6 @@ export class CreateReserveResponse {
|
||||
reservePub: string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
export interface Balance {
|
||||
available: AmountString;
|
||||
pendingIncoming: AmountString;
|
||||
@ -949,4 +947,9 @@ export interface WalletCurrencyInfo {
|
||||
|
||||
export interface DeleteTransactionRequest {
|
||||
transactionId: string;
|
||||
}
|
||||
}
|
||||
|
||||
export const codecForDeleteTransactionRequest = (): Codec<DeleteTransactionRequest> =>
|
||||
buildCodecForObject<DeleteTransactionRequest>()
|
||||
.property("transactionId", codecForString())
|
||||
.build("DeleteTransactionRequest");
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user