gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: fix 7741: add sessionid


From: gnunet
Subject: [taler-wallet-core] branch master updated: fix 7741: add sessionid
Date: Mon, 03 Jul 2023 19:01:29 +0200

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new d98f048fd fix 7741: add sessionid
d98f048fd is described below

commit d98f048fd65c46cd774eabdef8599efb75153ac3
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Mon Jul 3 14:01:23 2023 -0300

    fix 7741: add sessionid
---
 packages/taler-util/src/errors.ts                          |  1 +
 packages/taler-wallet-core/src/operations/pay-merchant.ts  |  3 ++-
 .../src/cta/InvoicePay/stories.tsx                         |  1 +
 .../taler-wallet-webextension/src/cta/InvoicePay/views.tsx |  4 +---
 .../taler-wallet-webextension/src/cta/Payment/state.ts     | 14 --------------
 5 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/packages/taler-util/src/errors.ts 
b/packages/taler-util/src/errors.ts
index 06e338a25..4399dbcf2 100644
--- a/packages/taler-util/src/errors.ts
+++ b/packages/taler-util/src/errors.ts
@@ -54,6 +54,7 @@ export interface DetailsMap {
   };
   [TalerErrorCode.WALLET_ORDER_ALREADY_PAID]: {
     orderId: string;
+    fulfillmentUrl: string;
   };
   [TalerErrorCode.WALLET_CONTRACT_TERMS_MALFORMED]: empty;
   [TalerErrorCode.WALLET_CONTRACT_TERMS_SIGNATURE_INVALID]: {
diff --git a/packages/taler-wallet-core/src/operations/pay-merchant.ts 
b/packages/taler-wallet-core/src/operations/pay-merchant.ts
index d53ee1b43..080191bfd 100644
--- a/packages/taler-wallet-core/src/operations/pay-merchant.ts
+++ b/packages/taler-wallet-core/src/operations/pay-merchant.ts
@@ -1617,6 +1617,7 @@ export async function processPurchasePay(
         type: TaskRunResultType.Error,
         errorDetail: makeErrorDetail(TalerErrorCode.WALLET_ORDER_ALREADY_PAID, 
{
           orderId: purchase.orderId,
+          fulfillmentUrl: download.contractData.fulfillmentUrl,
         }),
       };
     }
@@ -2219,7 +2220,7 @@ export async function sharePayment(
 
       return {
         nonce: p.noncePriv,
-        session: p.lastSessionId,
+        session: p.lastSessionId ?? p.downloadSessionId,
         token: p.claimToken,
       };
     });
diff --git a/packages/taler-wallet-webextension/src/cta/InvoicePay/stories.tsx 
b/packages/taler-wallet-webextension/src/cta/InvoicePay/stories.tsx
index a8f55c512..8993476ea 100644
--- a/packages/taler-wallet-webextension/src/cta/InvoicePay/stories.tsx
+++ b/packages/taler-wallet-webextension/src/cta/InvoicePay/stories.tsx
@@ -43,6 +43,7 @@ export const Ready = tests.createExample(ReadyView, {
     fraction: 0,
   },
   summary: "some subject",
+  uri: "taler://pay/merchant.ar/123",
   payStatus: {
     status: PreparePayResultType.PaymentPossible,
     amountEffective: "ARS:1",
diff --git a/packages/taler-wallet-webextension/src/cta/InvoicePay/views.tsx 
b/packages/taler-wallet-webextension/src/cta/InvoicePay/views.tsx
index e54e54bd1..986b31d77 100644
--- a/packages/taler-wallet-webextension/src/cta/InvoicePay/views.tsx
+++ b/packages/taler-wallet-webextension/src/cta/InvoicePay/views.tsx
@@ -14,14 +14,12 @@
  GNU Taler; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
  */
 
+import { useTranslationContext } from "@gnu-taler/web-util/browser";
 import { Fragment, h, VNode } from "preact";
 import { Amount } from "../../components/Amount.js";
-import { LogoHeader } from "../../components/LogoHeader.js";
 import { Part } from "../../components/Part.js";
 import { PaymentButtons } from "../../components/PaymentButtons.js";
-import { SubTitle, WalletAction } from "../../components/styled/index.js";
 import { Time } from "../../components/Time.js";
-import { useTranslationContext } from "@gnu-taler/web-util/browser";
 import {
   getAmountWithFee,
   InvoicePaymentDetails,
diff --git a/packages/taler-wallet-webextension/src/cta/Payment/state.ts 
b/packages/taler-wallet-webextension/src/cta/Payment/state.ts
index 4468438d1..d171ecbac 100644
--- a/packages/taler-wallet-webextension/src/cta/Payment/state.ts
+++ b/packages/taler-wallet-webextension/src/cta/Payment/state.ts
@@ -141,25 +141,11 @@ export function useComponentState({
   }
 
   async function doPayment(): Promise<void> {
-    // if (payStatus.status !== "payment-possible") {
-    //   throw TalerError.fromUncheckedDetail({
-    //     code: TalerErrorCode.GENERIC_CLIENT_INTERNAL_ERROR,
-    //     when: new Date().toISOString(),
-    //     hint: `payment is not possible: ${payStatus.status}`,
-    //   });
-    // }
     const res = await api.wallet.call(WalletApiOperation.ConfirmPay, {
       proposalId: payStatus.proposalId,
     });
     // handle confirm pay
     if (res.type !== ConfirmPayResultType.Done) {
-      // throw new BackgroundError("Could not confirm payment", res.lastError)
-      // // throw TalerError.fromUncheckedDetail({
-      // //   code: TalerErrorCode.GENERIC_CLIENT_INTERNAL_ERROR,
-      // //   when: new Date().toISOString(),
-      // //   hint: `could not confirm payment`,
-      // //   payResult: res,
-      // // });
       onSuccess(res.transactionId);
       return;
     }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]