diff options
author | Florian Dold <florian@dold.me> | 2023-05-26 12:19:32 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-05-26 12:19:32 +0200 |
commit | cd8f76db61f4a1ab1a8a8a4d29b2f3e863b59854 (patch) | |
tree | 423ed7c6fc42ec5e05f655eb093b3b4bdc885996 /packages/taler-wallet-webextension/src/components | |
parent | 557dcec30db6573c5d11ca26432008ac6621642e (diff) | |
download | wallet-core-cd8f76db61f4a1ab1a8a8a4d29b2f3e863b59854.tar.gz wallet-core-cd8f76db61f4a1ab1a8a8a4d29b2f3e863b59854.tar.bz2 wallet-core-cd8f76db61f4a1ab1a8a8a4d29b2f3e863b59854.zip |
taler-util,wallet-core: implement TalerPreciseTimestamp
Fixes #7703
Diffstat (limited to 'packages/taler-wallet-webextension/src/components')
3 files changed, 17 insertions, 17 deletions
diff --git a/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx b/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx index 3866fc991..9c11170cd 100644 --- a/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx +++ b/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx @@ -136,7 +136,7 @@ export function PendingTransactionsView({ </Typography> - <Time - timestamp={AbsoluteTime.fromTimestamp(t.timestamp)} + timestamp={AbsoluteTime.fromPreciseTimestamp(t.timestamp)} format="dd MMMM yyyy" /> </Grid> diff --git a/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx b/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx index 9cbc2899f..392a7d0e8 100644 --- a/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx +++ b/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx @@ -179,7 +179,7 @@ export function HiddenView({ showHandler }: States.Hidden): VNode { } export function ShowView({ contractTerms, hideHandler }: States.Show): VNode { - const createdAt = AbsoluteTime.fromTimestamp(contractTerms.timestamp); + const createdAt = AbsoluteTime.fromProtocolTimestamp(contractTerms.timestamp); const { i18n } = useTranslationContext(); return ( @@ -266,7 +266,7 @@ export function ShowView({ contractTerms, hideHandler }: States.Show): VNode { <td> {contractTerms.deliveryDate && ( <Time - timestamp={AbsoluteTime.fromTimestamp( + timestamp={AbsoluteTime.fromProtocolTimestamp( contractTerms.deliveryDate, )} format="dd MMMM yyyy, HH:mm" @@ -299,7 +299,7 @@ export function ShowView({ contractTerms, hideHandler }: States.Show): VNode { <td> {contractTerms.timestamp && ( <Time - timestamp={AbsoluteTime.fromTimestamp( + timestamp={AbsoluteTime.fromProtocolTimestamp( contractTerms.timestamp, )} format="dd MMMM yyyy, HH:mm" @@ -314,7 +314,7 @@ export function ShowView({ contractTerms, hideHandler }: States.Show): VNode { <td> { <Time - timestamp={AbsoluteTime.fromTimestamp( + timestamp={AbsoluteTime.fromProtocolTimestamp( contractTerms.refundDeadline, )} format="dd MMMM yyyy, HH:mm" @@ -349,7 +349,7 @@ export function ShowView({ contractTerms, hideHandler }: States.Show): VNode { <td> { <Time - timestamp={AbsoluteTime.fromTimestamp( + timestamp={AbsoluteTime.fromProtocolTimestamp( contractTerms.payDeadline, )} format="dd MMMM yyyy, HH:mm" diff --git a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx b/packages/taler-wallet-webextension/src/components/TransactionItem.tsx index 124729349..15669e63d 100644 --- a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx +++ b/packages/taler-wallet-webextension/src/components/TransactionItem.tsx @@ -53,7 +53,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode { amount={tx.amountEffective} debitCreditIndicator={"credit"} title={new URL(tx.exchangeBaseUrl).hostname} - timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} + timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)} iconPath={"W"} pending={ tx.txState.major === TransactionMajorState.Pending @@ -76,7 +76,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode { amount={tx.amountEffective} debitCreditIndicator={"credit"} title={new URL(tx.exchangeBaseUrl).hostname} - timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} + timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)} iconPath={"I"} pending={ tx.txState.major === TransactionMajorState.Pending @@ -100,7 +100,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode { debitCreditIndicator={"debit"} title={tx.info.merchant.name} subtitle={tx.info.summary} - timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} + timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)} iconPath={"P"} pending={ tx.txState.major === TransactionMajorState.Pending @@ -121,7 +121,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode { ? tx.paymentInfo.merchant.name : "--unknown merchant--" } //FIXME: DD37 wallet-core is not returning this value - timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} + timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)} iconPath={"R"} pending={ tx.txState.major === TransactionMajorState.Pending @@ -137,7 +137,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode { amount={tx.amountEffective} debitCreditIndicator={"credit"} title={new URL(tx.merchantBaseUrl).hostname} - timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} + timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)} iconPath={"T"} pending={ tx.txState.major === TransactionMajorState.Pending @@ -153,7 +153,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode { amount={tx.amountEffective} debitCreditIndicator={"credit"} title={"Refresh"} - timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} + timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)} iconPath={"R"} pending={ tx.txState.major === TransactionMajorState.Pending @@ -169,7 +169,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode { amount={tx.amountEffective} debitCreditIndicator={"debit"} title={tx.targetPaytoUri} - timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} + timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)} iconPath={"D"} pending={ tx.txState.major === TransactionMajorState.Pending @@ -185,7 +185,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode { amount={tx.amountEffective} debitCreditIndicator={"credit"} title={tx.info.summary || "Invoice"} - timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} + timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)} iconPath={"I"} pending={ tx.txState.major === TransactionMajorState.Pending @@ -201,7 +201,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode { amount={tx.amountEffective} debitCreditIndicator={"debit"} title={tx.info.summary || "Invoice"} - timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} + timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)} iconPath={"I"} pending={ tx.txState.major === TransactionMajorState.Pending @@ -217,7 +217,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode { amount={tx.amountEffective} debitCreditIndicator={"credit"} title={tx.info.summary || "Transfer"} - timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} + timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)} iconPath={"T"} pending={ tx.txState.major === TransactionMajorState.Pending @@ -233,7 +233,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode { amount={tx.amountEffective} debitCreditIndicator={"debit"} title={tx.info.summary || "Transfer"} - timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} + timestamp={AbsoluteTime.fromPreciseTimestamp(tx.timestamp)} iconPath={"T"} pending={ tx.txState.major === TransactionMajorState.Pending |