Fix sats conversion on taker helper text for swaps

This commit is contained in:
Reckless_Satoshi 2023-04-27 04:26:07 -07:00
parent 91bbc4c9f5
commit a0627a2028
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
2 changed files with 8 additions and 6 deletions

View File

@ -14,6 +14,7 @@ import {
LinearProgress,
IconButton,
Tooltip,
LinearProgressProps,
} from '@mui/material';
import {
DataGrid,
@ -664,11 +665,11 @@ const BookTable = ({
};
interface GridComponentProps {
LoadingOverlay: JSX.Element;
NoResultsOverlay?: JSX.Element;
NoRowsOverlay?: JSX.Element;
Footer?: JSX.Element;
Toolbar?: JSX.Element;
LoadingOverlay: (props: LinearProgressProps) => JSX.Element;
NoResultsOverlay?: (props: any) => JSX.Element;
NoRowsOverlay?: (props: any) => JSX.Element;
Footer?: (props: any) => JSX.Element;
Toolbar?: (props: any) => JSX.Element;
}
const NoResultsOverlay = function () {

View File

@ -55,8 +55,9 @@ const TakeButton = ({ order, setOrder, baseUrl, hasRobot, info }: TakeButtonProp
const defaultRoutingBudget = 0.001;
const btc_now = order.satoshis_now / 100000000;
const rate = order.amount ? order.amount / btc_now : order.max_amount / btc_now;
const amount = order.currency === 1000 ? Number(takeAmount) / 100000000 : Number(takeAmount);
const satoshis = computeSats({
amount: Number(takeAmount),
amount: amount,
routingBudget: order.is_buyer ? defaultRoutingBudget : 0,
fee: tradeFee,
rate: rate,