prettyier amount rendering
This commit is contained in:
parent
58a339cf51
commit
e61aae74d7
@ -195,6 +195,18 @@ function ExtensionLink(props: any) {
|
|||||||
</a>)
|
</a>)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function bigAmount(amount: AmountJson): JSX.Element {
|
||||||
|
let v = amount.value + amount.fraction / Amounts.fractionalBase;
|
||||||
|
return (
|
||||||
|
<span>
|
||||||
|
<span style={{fontSize: "300%"}}>{v}</span>
|
||||||
|
{" "}
|
||||||
|
<span>{amount.currency}</span>
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
class WalletBalanceView extends React.Component<any, any> {
|
class WalletBalanceView extends React.Component<any, any> {
|
||||||
balance: WalletBalance;
|
balance: WalletBalance;
|
||||||
gotError = false;
|
gotError = false;
|
||||||
@ -306,7 +318,7 @@ class WalletBalanceView extends React.Component<any, any> {
|
|||||||
let entry: WalletBalanceEntry = wallet[key];
|
let entry: WalletBalanceEntry = wallet[key];
|
||||||
return (
|
return (
|
||||||
<p>
|
<p>
|
||||||
{prettyAmount(entry.available)}
|
{bigAmount(entry.available)}
|
||||||
{" "}
|
{" "}
|
||||||
{this.formatPending(entry)}
|
{this.formatPending(entry)}
|
||||||
</p>
|
</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user