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 #7477


From: gnunet
Subject: [taler-wallet-core] branch master updated: fix #7477
Date: Thu, 17 Nov 2022 21:07:32 +0100

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 6dc4fda73 fix #7477
6dc4fda73 is described below

commit 6dc4fda73ac3f69af3a18d71f49c815ab6dbda21
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu Nov 17 17:07:24 2022 -0300

    fix #7477
---
 packages/taler-util/src/transactions-types.ts         |  2 ++
 .../taler-wallet-core/src/operations/transactions.ts  |  1 +
 .../taler-wallet-webextension/src/components/Part.tsx | 19 ++++++++++++++++---
 .../src/wallet/Transaction.stories.tsx                |  3 +++
 .../src/wallet/Transaction.tsx                        | 12 ++++++++++++
 5 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/packages/taler-util/src/transactions-types.ts 
b/packages/taler-util/src/transactions-types.ts
index c1870e2e0..62caaa055 100644
--- a/packages/taler-util/src/transactions-types.ts
+++ b/packages/taler-util/src/transactions-types.ts
@@ -527,6 +527,8 @@ export interface TransactionDeposit extends 
TransactionCommon {
    * Effective amount that is being deposited
    */
   amountEffective: AmountString;
+
+  wireTransferDeadline: TalerProtocolTimestamp;
 }
 
 export interface TransactionByIdRequest {
diff --git a/packages/taler-wallet-core/src/operations/transactions.ts 
b/packages/taler-wallet-core/src/operations/transactions.ts
index fd0a343e5..3fb13d2a0 100644
--- a/packages/taler-wallet-core/src/operations/transactions.ts
+++ b/packages/taler-wallet-core/src/operations/transactions.ts
@@ -527,6 +527,7 @@ function buildTransactionForDeposit(
     frozen: false,
     timestamp: dg.timestampCreated,
     targetPaytoUri: dg.wire.payto_uri,
+    wireTransferDeadline: dg.contractTermsRaw.wire_transfer_deadline,
     transactionId: makeTransactionId(
       TransactionType.Deposit,
       dg.depositGroupId,
diff --git a/packages/taler-wallet-webextension/src/components/Part.tsx 
b/packages/taler-wallet-webextension/src/components/Part.tsx
index d47d01040..a488ca4dc 100644
--- a/packages/taler-wallet-webextension/src/components/Part.tsx
+++ b/packages/taler-wallet-webextension/src/components/Part.tsx
@@ -144,7 +144,11 @@ export function PartPayto({ payto, kind, big }: 
PropsPayto): VNode {
   const { i18n } = useTranslationContext();
   if (payto.isKnown) {
     if (payto.targetType === "x-taler-bank") {
-      text = <Fragment>{payto.account}</Fragment>;
+      text = (
+        <a target="_bank" rel="noreferrer" href={payto.host}>
+          {payto.account}
+        </a>
+      );
       title = i18n.str`Bank account`;
     } else if (payto.targetType === "bitcoin") {
       text =
@@ -159,8 +163,17 @@ export function PartPayto({ payto, kind, big }: 
PropsPayto): VNode {
         );
       title = i18n.str`Bitcoin address`;
     } else if (payto.targetType === "iban") {
-      text = <Fragment>{payto.targetPath}</Fragment>;
-      title = i18n.str`IBAN`;
+      if (payto.bic) {
+        text = (
+          <Fragment>
+            {payto.bic}/{payto.iban}
+          </Fragment>
+        );
+        title = i18n.str`BIC/IBAN`;
+      } else {
+        text = <Fragment>{payto.iban}</Fragment>;
+        title = i18n.str`IBAN`;
+      }
     }
   }
   if (!text) {
diff --git 
a/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx 
b/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx
index 812ef93c9..abbc883bd 100644
--- a/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx
@@ -110,6 +110,9 @@ const exampleData = {
   deposit: {
     ...commonTransaction,
     type: TransactionType.Deposit,
+    wireTransferDeadline: {
+      t_s: new Date().getTime() / 1000,
+    },
     depositGroupId: "#groupId",
     targetPaytoUri: "payto://x-taler-bank/bank.demo.taler.net/Exchange",
   } as TransactionDeposit,
diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx 
b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
index 76bfe014b..8ccf15c14 100644
--- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
@@ -524,6 +524,18 @@ export function TransactionView({
           text={<DepositDetails transaction={transaction} />}
           kind="neutral"
         />
+        <Part
+          title={<i18n.Translate>Wire transfer deadline</i18n.Translate>}
+          text={
+            <Time
+              timestamp={AbsoluteTime.fromTimestamp(
+                transaction.wireTransferDeadline,
+              )}
+              format="dd MMMM yyyy 'at' HH:mm"
+            />
+          }
+          kind="neutral"
+        />
       </TransactionTemplate>
     );
   }

-- 
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]