diff options
author | Sebastian <sebasjm@gmail.com> | 2021-10-14 20:00:39 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-10-14 20:00:39 -0300 |
commit | 84ca0b1cb9742733a43d1fb8d597c3e25e876ec7 (patch) | |
tree | 43e733b0163999d9335b6ea4f146933afe431d2c /packages/taler-wallet-webextension/src/wallet | |
parent | 1f365d1c425f9c7b190f3682022a9e0817abc71b (diff) | |
download | wallet-core-84ca0b1cb9742733a43d1fb8d597c3e25e876ec7.tar.xz |
show summary on the history page
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/History.stories.tsx | 15 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/History.tsx | 4 |
2 files changed, 13 insertions, 6 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/History.stories.tsx b/packages/taler-wallet-webextension/src/wallet/History.stories.tsx index c2b3bcd51..0ac4be9a6 100644 --- a/packages/taler-wallet-webextension/src/wallet/History.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/History.stories.tsx @@ -41,7 +41,7 @@ const commonTransaction = () => ({ amountEffective: 'USD:9', pending: false, timestamp: { - t_ms: new Date().getTime() - (count++ * 1000*60*60*7) + t_ms: new Date().getTime() - (count++ * 1000 * 60 * 60 * 7) }, transactionId: '12', } as TransactionCommon) @@ -131,7 +131,8 @@ export const One = createExample(TestedComponent, { }); export const OnePending = createExample(TestedComponent, { - list: [{...exampleData.withdraw, + list: [{ + ...exampleData.withdraw, pending: true }], balances: [{ @@ -149,7 +150,13 @@ export const Several = createExample(TestedComponent, { exampleData.payment, exampleData.withdraw, exampleData.payment, - exampleData.refresh, + { + ...exampleData.payment, + info: { + ...exampleData.payment.info, + summary: 'this is a long summary that may be cropped because its too long', + }, + }, exampleData.refund, exampleData.tip, exampleData.deposit, @@ -180,7 +187,7 @@ export const SeveralWithTwoCurrencies = createExample(TestedComponent, { pendingOutgoing: 'TESTKUDOS:0', hasPendingTransactions: false, requiresUserInput: false, - },{ + }, { available: 'USD:10', pendingIncoming: 'USD:0', pendingOutgoing: 'USD:0', diff --git a/packages/taler-wallet-webextension/src/wallet/History.tsx b/packages/taler-wallet-webextension/src/wallet/History.tsx index 43b0a6630..8160f8574 100644 --- a/packages/taler-wallet-webextension/src/wallet/History.tsx +++ b/packages/taler-wallet-webextension/src/wallet/History.tsx @@ -74,8 +74,8 @@ export function HistoryView({ list, balances }: { list: Transaction[], balances: </div>} </header>} <section> - {Object.keys(byDate).map(d => { - return <Fragment> + {Object.keys(byDate).map((d,i) => { + return <Fragment key={i}> <DateSeparator>{d}</DateSeparator> {byDate[d].map((tx, i) => ( <TransactionItem key={i} tx={tx} multiCurrency={multiCurrency}/> |