aboutsummaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/components/Transactions/views.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-12-20 10:16:39 -0300
committerSebastian <sebasjm@gmail.com>2022-12-20 10:17:02 -0300
commit8c8aad4c21fde2cd37e25ccd4c723a308b79439b (patch)
treebb331bb101e31afca0144b1df82e75dc12a741f6 /packages/demobank-ui/src/components/Transactions/views.tsx
parent5ae63982c3d0e31ddc7c4df389fe2ec2e0062906 (diff)
downloadwallet-core-8c8aad4c21fde2cd37e25ccd4c723a308b79439b.tar.gz
wallet-core-8c8aad4c21fde2cd37e25ccd4c723a308b79439b.tar.bz2
wallet-core-8c8aad4c21fde2cd37e25ccd4c723a308b79439b.zip
fix #7524: do not break if the account is in an invalid state
Diffstat (limited to 'packages/demobank-ui/src/components/Transactions/views.tsx')
-rw-r--r--packages/demobank-ui/src/components/Transactions/views.tsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/demobank-ui/src/components/Transactions/views.tsx b/packages/demobank-ui/src/components/Transactions/views.tsx
index b3683b743..1822f9d94 100644
--- a/packages/demobank-ui/src/components/Transactions/views.tsx
+++ b/packages/demobank-ui/src/components/Transactions/views.tsx
@@ -54,7 +54,13 @@ export function ReadyView({ transactions }: State.Ready): VNode {
</td>
<td>
{item.negative ? "-" : ""}
- {Amounts.stringifyValue(item.amount)} {item.amount.currency}
+ {item.amount ? (
+ `${Amounts.stringifyValue(item.amount)} ${
+ item.amount.currency
+ }`
+ ) : (
+ <span style={{ color: "grey" }}>&lt;invalid value&gt;</span>
+ )}
</td>
<td>{item.counterpart}</td>
<td>{item.subject}</td>