wip: refactor request.rs to allow type safety

This commit is contained in:
binarybaron 2024-08-07 22:51:18 +02:00
parent 757183e857
commit 472e3a57b3
No known key found for this signature in database
GPG key ID: 99B75D3E1476A26E
16 changed files with 955 additions and 743 deletions

View file

@ -1,6 +1,6 @@
import { piconerosToXmr, satsToBtc } from 'utils/conversionUtils';
import { Tooltip } from '@material-ui/core';
import { useAppSelector } from 'store/hooks';
import { piconerosToXmr, satsToBtc } from "utils/conversionUtils";
import { Tooltip } from "@material-ui/core";
import { useAppSelector } from "store/hooks";
type Amount = number | null | undefined;
@ -21,13 +21,13 @@ export function AmountWithUnit({
title={
dollarRate != null && amount != null
? `$${(dollarRate * amount).toFixed(2)}`
: ''
: ""
}
>
<span>
{amount != null
? Number.parseFloat(amount.toFixed(fixedPrecision))
: '?'}{' '}
: "?"}{" "}
{unit}
</span>
</Tooltip>