mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-01 19:16:10 -04:00
wip: refactor request.rs to allow type safety
This commit is contained in:
parent
757183e857
commit
472e3a57b3
16 changed files with 955 additions and 743 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue