aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-11-17 17:07:24 -0300
committerSebastian <sebasjm@gmail.com>2022-11-17 17:07:24 -0300
commit6dc4fda73ac3f69af3a18d71f49c815ab6dbda21 (patch)
tree9b86d98592f0778c1110e4c4d541911c109d252d /packages/taler-wallet-webextension
parent1a63d56bfdd091cc7aefdf1e25f3a074bfdf5e0e (diff)
fix #7477
Diffstat (limited to 'packages/taler-wallet-webextension')
-rw-r--r--packages/taler-wallet-webextension/src/components/Part.tsx19
-rw-r--r--packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx3
-rw-r--r--packages/taler-wallet-webextension/src/wallet/Transaction.tsx12
3 files changed, 31 insertions, 3 deletions
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>
);
}