aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pay-merchant.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-merchant.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pay-merchant.ts26
1 files changed, 6 insertions, 20 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-merchant.ts b/packages/taler-wallet-core/src/operations/pay-merchant.ts
index c3f288ff7..ad6552f06 100644
--- a/packages/taler-wallet-core/src/operations/pay-merchant.ts
+++ b/packages/taler-wallet-core/src/operations/pay-merchant.ts
@@ -67,7 +67,6 @@ import {
TalerErrorCode,
TalerErrorDetail,
TalerPreciseTimestamp,
- TalerProtocolTimestamp,
TalerProtocolViolationError,
TalerUriAction,
TransactionAction,
@@ -116,12 +115,11 @@ import {
OperationAttemptResult,
OperationAttemptResultType,
RetryInfo,
- scheduleRetry,
TaskIdentifiers,
-} from "../util/retries.js";
+} from "./common.js";
import {
runLongpollAsync,
- runOperationWithErrorReporting,
+ runTaskWithErrorReporting,
spendCoins,
} from "./common.js";
import {
@@ -1254,7 +1252,7 @@ export async function runPayForConfirmPay(
tag: PendingTaskType.Purchase,
proposalId,
});
- const res = await runOperationWithErrorReporting(ws, taskId, async () => {
+ const res = await runTaskWithErrorReporting(ws, taskId, async () => {
return await processPurchasePay(ws, proposalId, { forceNow: true });
});
logger.trace(`processPurchasePay response type ${res.type}`);
@@ -1618,18 +1616,11 @@ export async function processPurchasePay(
// Do this in the background, as it might take some time
handleInsufficientFunds(ws, proposalId, err).catch(async (e) => {
console.log("handling insufficient funds failed");
-
- await scheduleRetry(ws, TaskIdentifiers.forPay(purchase), {
- code: TalerErrorCode.WALLET_UNEXPECTED_EXCEPTION,
- when: AbsoluteTime.now(),
- message: "unexpected exception",
- hint: "unexpected exception",
- details: {
- exception: e.toString(),
- },
- });
+ console.log(`${e.toString()}`);
});
+ // FIXME: Should we really consider this to be pending?
+
return {
type: OperationAttemptResultType.Pending,
result: undefined,
@@ -1694,11 +1685,6 @@ export async function processPurchasePay(
await unblockBackup(ws, proposalId);
}
- ws.notify({
- type: NotificationType.PayOperationSuccess,
- proposalId: purchase.proposalId,
- });
-
return OperationAttemptResult.finishedEmpty();
}