aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/Transaction.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/Transaction.tsx38
1 files changed, 19 insertions, 19 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
index 8c2839324..cd240ffea 100644
--- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
@@ -18,7 +18,6 @@ import {
AbsoluteTime,
AmountJson,
Amounts,
- ExtendedStatus,
Location,
MerchantInfo,
NotificationType,
@@ -29,6 +28,7 @@ import {
TalerProtocolTimestamp,
Transaction,
TransactionDeposit,
+ TransactionMajorState,
TransactionType,
TranslatedString,
WithdrawalType,
@@ -136,9 +136,9 @@ export function TransactionPage({
});
goToWalletHistory(currency);
}}
- onRefund={async (purchaseId) => {
- await api.wallet.call(WalletApiOperation.ApplyRefundFromPurchaseId, {
- purchaseId,
+ onRefund={async (transactionId) => {
+ await api.wallet.call(WalletApiOperation.StartRefundQuery, {
+ transactionId,
});
}}
onBack={() => goToWalletHistory(currency)}
@@ -186,7 +186,7 @@ function TransactionTemplate({
async function doCheckBeforeForget(): Promise<void> {
if (
- transaction.extendedStatus === ExtendedStatus.Pending &&
+ transaction.txState.major === TransactionMajorState.Pending &&
transaction.type === TransactionType.Withdrawal
) {
setConfirmBeforeForget(true);
@@ -206,16 +206,16 @@ function TransactionTemplate({
transaction.type === TransactionType.Payment;
const transactionStillActive =
- transaction.extendedStatus !== ExtendedStatus.Aborted &&
- transaction.extendedStatus !== ExtendedStatus.Done &&
- transaction.extendedStatus !== ExtendedStatus.Failed;
+ transaction.txState.major !== TransactionMajorState.Aborted &&
+ transaction.txState.major !== TransactionMajorState.Done &&
+ transaction.txState.major !== TransactionMajorState.Failed;
// show retry if there is an error in an active state, or after some time
// if it is not aborting
const showRetry =
transactionStillActive &&
(transaction.error !== undefined ||
- (transaction.extendedStatus !== ExtendedStatus.Aborting &&
+ (transaction.txState.major === TransactionMajorState.Aborting &&
(transaction.timestamp.t_s === "never" ||
differenceInSeconds(new Date(), transaction.timestamp.t_s * 1000) >
SHOWING_RETRY_THRESHOLD_SECS)));
@@ -252,7 +252,7 @@ function TransactionTemplate({
/>
)
) : undefined}
- {transaction.extendedStatus === ExtendedStatus.Pending && (
+ {transaction.txState.major === TransactionMajorState.Pending && (
<WarningBox>
<i18n.Translate>This transaction is not completed</i18n.Translate>
</WarningBox>
@@ -417,9 +417,10 @@ export function TransactionView({
{transaction.exchangeBaseUrl}
</Header>
- {transaction.extendedStatus !==
- ExtendedStatus.Pending ? undefined : transaction.withdrawalDetails
- .type === WithdrawalType.ManualTransfer ? (
+ {/**FIXME: DD37 check if this holds */}
+ {transaction.txState.major ===
+ TransactionMajorState.Pending ? undefined : transaction
+ .withdrawalDetails.type === WithdrawalType.ManualTransfer ? (
//manual withdrawal
<Fragment>
<BankDetailsByPaytoType
@@ -822,12 +823,12 @@ export function TransactionView({
total={effective}
kind="positive"
>
- {transaction.info.summary}
+ {"transaction.info.summary"}
</Header>
<Part
title={i18n.str`Merchant`}
- text={transaction.info.merchant.name as TranslatedString}
+ text={"transaction.info.merchant.name" as TranslatedString}
kind="neutral"
/>
<Part
@@ -838,14 +839,14 @@ export function TransactionView({
tid: transaction.refundedTransactionId,
})}
>
- {transaction.info.orderId}
+ {"transaction.info.orderId"}
</a>
}
kind="neutral"
/>
<Part
title={i18n.str`Purchase summary`}
- text={transaction.info.summary as TranslatedString}
+ text={"transaction.info.summary" as TranslatedString}
kind="neutral"
/>
<Part
@@ -890,8 +891,7 @@ export function TransactionView({
text={transaction.exchangeBaseUrl as TranslatedString}
kind="neutral"
/>
- {transaction.extendedStatus ===
- ExtendedStatus.Pending /** pending is not-pay */ &&
+ {transaction.txState.major === TransactionMajorState.Pending &&
!transaction.error && (
<Part
title={i18n.str`URI`}