summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/wallet.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r--packages/taler-wallet-core/src/wallet.ts17
1 files changed, 9 insertions, 8 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts
index e91d74efb..768d5eb0f 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -94,6 +94,7 @@ import {
PrepareTipResult,
codecForPrepareTipRequest,
codecForAcceptTipRequest,
+ codecForAbortPayWithRefundRequest,
} from "./types/walletTypes";
import { Logger } from "./util/logging";
@@ -132,7 +133,7 @@ import {
PendingOperationType,
} from "./types/pending";
import { WalletNotification, NotificationType } from "./types/notifications";
-import { processPurchaseQueryRefund, applyRefund } from "./operations/refund";
+import { processPurchaseQueryRefund, applyRefund, abortFailedPayWithRefund } from "./operations/refund";
import { durationMin, Duration } from "./util/time";
import { processRecoupGroup } from "./operations/recoup";
import {
@@ -744,8 +745,8 @@ export class Wallet {
return prepareTip(this.ws, talerTipUri);
}
- async abortFailedPayment(contractTermsHash: string): Promise<void> {
- throw Error("not implemented");
+ async abortFailedPayWithRefund(proposalId: string): Promise<void> {
+ return abortFailedPayWithRefund(this.ws, proposalId);
}
/**
@@ -1022,11 +1023,6 @@ export class Wallet {
const req = codecForGetExchangeTosRequest().decode(payload);
return this.getExchangeTos(req.exchangeBaseUrl);
}
- case "abortProposal": {
- const req = codecForAbortProposalRequest().decode(payload);
- await this.refuseProposal(req.proposalId);
- return {};
- }
case "retryPendingNow": {
await this.runPending(true);
return {};
@@ -1039,6 +1035,11 @@ export class Wallet {
const req = codecForConfirmPayRequest().decode(payload);
return await this.confirmPay(req.proposalId, req.sessionId);
}
+ case "abortFailedPayWithRefund": {
+ const req = codecForAbortPayWithRefundRequest().decode(payload);
+ await this.abortFailedPayWithRefund(req.proposalId);
+ return {};
+ }
case "dumpCoins": {
return await this.dumpCoins();
}