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
*/
amountEffective: AmountString;
wireTransferDeadline: TalerProtocolTimestamp;
}
export interface TransactionByIdRequest {

View File

@ -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,

View File

@ -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) {

View File

@ -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,

View File

@ -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>
);
}