diff options
author | Florian Dold <florian@dold.me> | 2023-02-14 13:02:59 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-02-14 13:02:59 +0100 |
commit | 55f868d5e83f577cd20ad6f33e0cf8776b4d0f45 (patch) | |
tree | a4bb2803384f558308552bc5606423a52090f79e /packages/taler-wallet-webextension | |
parent | 97fac057c2f66cf8c00e50c555b761d5062fb4cf (diff) |
wallet-core: allow inclusion of refreshes in transactions list
Diffstat (limited to 'packages/taler-wallet-webextension')
4 files changed, 8 insertions, 2 deletions
diff --git a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx b/packages/taler-wallet-webextension/src/components/TransactionItem.tsx index 71d7edaf0..934a0fe52 100644 --- a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx +++ b/packages/taler-wallet-webextension/src/components/TransactionItem.tsx @@ -110,7 +110,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode { id={tx.transactionId} amount={tx.amountEffective} debitCreditIndicator={"credit"} - title={new URL(tx.exchangeBaseUrl).hostname} + title={"Refresh"} timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} iconPath={"R"} // pending={tx.pending} diff --git a/packages/taler-wallet-webextension/src/wallet/History.stories.tsx b/packages/taler-wallet-webextension/src/wallet/History.stories.tsx index d89027e5f..2ebaf8536 100644 --- a/packages/taler-wallet-webextension/src/wallet/History.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/History.stories.tsx @@ -21,6 +21,7 @@ import { PaymentStatus, + RefreshReason, ScopeType, TalerProtocolTimestamp, TransactionCommon, @@ -90,6 +91,7 @@ const exampleData = { totalRefundRaw: "USD:0", proposalId: "1EMJJH8EP1NX3XF7733NCYS2DBEJW4Q2KA5KEB37MCQJQ8Q5HMC0", status: PaymentStatus.Accepted, + refundQueryActive: false, } as TransactionPayment, deposit: { ...commonTransaction(), @@ -101,6 +103,7 @@ const exampleData = { ...commonTransaction(), type: TransactionType.Refresh, exchangeBaseUrl: "http://exchange.taler", + refreshReason: RefreshReason.PayMerchant, } as TransactionRefresh, tip: { ...commonTransaction(), diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx index a2aa9f26f..c29cd99cc 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx @@ -23,6 +23,7 @@ import { AbsoluteTime, ExtendedStatus, PaymentStatus, + RefreshReason, TalerProtocolTimestamp, TransactionCommon, TransactionDeposit, @@ -111,6 +112,7 @@ const exampleData = { totalRefundRaw: "KUDOS:0", proposalId: "1EMJJH8EP1NX3XF7733NCYS2DBEJW4Q2KA5KEB37MCQJQ8Q5HMC0", status: PaymentStatus.Accepted, + refundQueryActive: false, } as TransactionPayment, deposit: { ...commonTransaction, @@ -125,6 +127,7 @@ const exampleData = { ...commonTransaction, type: TransactionType.Refresh, exchangeBaseUrl: "http://exchange.taler", + refreshReason: RefreshReason.Manual, } as TransactionRefresh, tip: { ...commonTransaction, diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx index d91f621db..fc94f977a 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx @@ -729,7 +729,7 @@ export function TransactionView({ total={effective} kind="negative" > - {transaction.exchangeBaseUrl} + {"Refresh"} </Header> <Part title={i18n.str`Details`} |