This commit is contained in:
Sebastian 2022-11-17 17:07:24 -03:00
parent 1a63d56bfd
commit 6dc4fda73a
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1
5 changed files with 34 additions and 3 deletions

View File

@ -527,6 +527,8 @@ export interface TransactionDeposit extends TransactionCommon {
* Effective amount that is being deposited * Effective amount that is being deposited
*/ */
amountEffective: AmountString; amountEffective: AmountString;
wireTransferDeadline: TalerProtocolTimestamp;
} }
export interface TransactionByIdRequest { export interface TransactionByIdRequest {

View File

@ -527,6 +527,7 @@ function buildTransactionForDeposit(
frozen: false, frozen: false,
timestamp: dg.timestampCreated, timestamp: dg.timestampCreated,
targetPaytoUri: dg.wire.payto_uri, targetPaytoUri: dg.wire.payto_uri,
wireTransferDeadline: dg.contractTermsRaw.wire_transfer_deadline,
transactionId: makeTransactionId( transactionId: makeTransactionId(
TransactionType.Deposit, TransactionType.Deposit,
dg.depositGroupId, dg.depositGroupId,

View File

@ -144,7 +144,11 @@ export function PartPayto({ payto, kind, big }: PropsPayto): VNode {
const { i18n } = useTranslationContext(); const { i18n } = useTranslationContext();
if (payto.isKnown) { if (payto.isKnown) {
if (payto.targetType === "x-taler-bank") { 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`; title = i18n.str`Bank account`;
} else if (payto.targetType === "bitcoin") { } else if (payto.targetType === "bitcoin") {
text = text =
@ -159,10 +163,19 @@ export function PartPayto({ payto, kind, big }: PropsPayto): VNode {
); );
title = i18n.str`Bitcoin address`; title = i18n.str`Bitcoin address`;
} else if (payto.targetType === "iban") { } else if (payto.targetType === "iban") {
text = <Fragment>{payto.targetPath}</Fragment>; 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`; title = i18n.str`IBAN`;
} }
} }
}
if (!text) { if (!text) {
text = <Fragment>{stringifyPaytoUri(payto)}</Fragment>; text = <Fragment>{stringifyPaytoUri(payto)}</Fragment>;
title = "Payto URI"; title = "Payto URI";

View File

@ -110,6 +110,9 @@ const exampleData = {
deposit: { deposit: {
...commonTransaction, ...commonTransaction,
type: TransactionType.Deposit, type: TransactionType.Deposit,
wireTransferDeadline: {
t_s: new Date().getTime() / 1000,
},
depositGroupId: "#groupId", depositGroupId: "#groupId",
targetPaytoUri: "payto://x-taler-bank/bank.demo.taler.net/Exchange", targetPaytoUri: "payto://x-taler-bank/bank.demo.taler.net/Exchange",
} as TransactionDeposit, } as TransactionDeposit,

View File

@ -524,6 +524,18 @@ export function TransactionView({
text={<DepositDetails transaction={transaction} />} text={<DepositDetails transaction={transaction} />}
kind="neutral" 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> </TransactionTemplate>
); );
} }