mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-19 04:31:35 +00:00
Fix sats conversion on taker helper text for swaps
This commit is contained in:
parent
91bbc4c9f5
commit
a0627a2028
@ -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 () {
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user