summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-05-24 14:46:03 +0200
committerFlorian Dold <florian@dold.me>2023-05-24 14:46:03 +0200
commita2ef2e391a8f030857d0f9cd56c6157cffb33659 (patch)
tree7da5030d2695b4c6ba24b007198726bea6016b13 /packages/taler-wallet-webextension/src
parentf475f98f86d03e808d2c88c13eafa712c2013fe3 (diff)
downloadwallet-core-a2ef2e391a8f030857d0f9cd56c6157cffb33659.tar.gz
wallet-core-a2ef2e391a8f030857d0f9cd56c6157cffb33659.tar.bz2
wallet-core-a2ef2e391a8f030857d0f9cd56c6157cffb33659.zip
wallet-core: remove legacy non-DD37 tx status fields
Diffstat (limited to 'packages/taler-wallet-webextension/src')
-rw-r--r--packages/taler-wallet-webextension/src/components/TransactionItem.tsx23
-rw-r--r--packages/taler-wallet-webextension/src/wallet/History.stories.tsx1
-rw-r--r--packages/taler-wallet-webextension/src/wallet/Transaction.tsx5
3 files changed, 27 insertions, 2 deletions
diff --git a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx b/packages/taler-wallet-webextension/src/components/TransactionItem.tsx
index dc11c4b7e..124729349 100644
--- a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx
+++ b/packages/taler-wallet-webextension/src/components/TransactionItem.tsx
@@ -69,6 +69,29 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
}
/>
);
+ case TransactionType.InternalWithdrawal:
+ return (
+ <TransactionLayout
+ id={tx.transactionId}
+ amount={tx.amountEffective}
+ debitCreditIndicator={"credit"}
+ title={new URL(tx.exchangeBaseUrl).hostname}
+ timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)}
+ iconPath={"I"}
+ pending={
+ tx.txState.major === TransactionMajorState.Pending
+ ? tx.withdrawalDetails.type ===
+ WithdrawalType.TalerBankIntegrationApi
+ ? !tx.withdrawalDetails.confirmed
+ ? i18n.str`Need approval in the Bank`
+ : i18n.str`Exchange is waiting the wire transfer`
+ : tx.withdrawalDetails.type === WithdrawalType.ManualTransfer
+ ? i18n.str`Exchange is waiting the wire transfer`
+ : "" //pending but no message
+ : undefined
+ }
+ />
+ );
case TransactionType.Payment:
return (
<TransactionLayout
diff --git a/packages/taler-wallet-webextension/src/wallet/History.stories.tsx b/packages/taler-wallet-webextension/src/wallet/History.stories.tsx
index 93d61ba2b..b9c408fe1 100644
--- a/packages/taler-wallet-webextension/src/wallet/History.stories.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/History.stories.tsx
@@ -52,7 +52,6 @@ const commonTransaction = (): TransactionCommon =>
({
amountRaw: "USD:10",
amountEffective: "USD:9",
- pending: false,
txState: {
major: TransactionMajorState.Done,
},
diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
index f4c50a8d5..9541cc33f 100644
--- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
@@ -398,7 +398,10 @@ export function TransactionView({
const raw = Amounts.parseOrThrow(transaction.amountRaw);
const effective = Amounts.parseOrThrow(transaction.amountEffective);
- if (transaction.type === TransactionType.Withdrawal) {
+ if (
+ transaction.type === TransactionType.Withdrawal ||
+ transaction.type === TransactionType.InternalWithdrawal
+ ) {
return (
<TransactionTemplate
transaction={transaction}