From e61aae74d7551582d2eaa498665a96c012a16019 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 28 Nov 2016 08:19:06 +0100 Subject: prettyier amount rendering --- src/popup/popup.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/popup/popup.tsx b/src/popup/popup.tsx index 47dbd0b8f..dd87963c6 100644 --- a/src/popup/popup.tsx +++ b/src/popup/popup.tsx @@ -195,6 +195,18 @@ function ExtensionLink(props: any) { ) } + +export function bigAmount(amount: AmountJson): JSX.Element { + let v = amount.value + amount.fraction / Amounts.fractionalBase; + return ( + + {v} + {" "} + {amount.currency} + + ); +} + class WalletBalanceView extends React.Component { balance: WalletBalance; gotError = false; @@ -306,7 +318,7 @@ class WalletBalanceView extends React.Component { let entry: WalletBalanceEntry = wallet[key]; return (

- {prettyAmount(entry.available)} + {bigAmount(entry.available)} {" "} {this.formatPending(entry)}

-- cgit v1.2.3