mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-31 10: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,
|
LinearProgress,
|
||||||
IconButton,
|
IconButton,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
|
LinearProgressProps,
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
import {
|
import {
|
||||||
DataGrid,
|
DataGrid,
|
||||||
@ -664,11 +665,11 @@ const BookTable = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
interface GridComponentProps {
|
interface GridComponentProps {
|
||||||
LoadingOverlay: JSX.Element;
|
LoadingOverlay: (props: LinearProgressProps) => JSX.Element;
|
||||||
NoResultsOverlay?: JSX.Element;
|
NoResultsOverlay?: (props: any) => JSX.Element;
|
||||||
NoRowsOverlay?: JSX.Element;
|
NoRowsOverlay?: (props: any) => JSX.Element;
|
||||||
Footer?: JSX.Element;
|
Footer?: (props: any) => JSX.Element;
|
||||||
Toolbar?: JSX.Element;
|
Toolbar?: (props: any) => JSX.Element;
|
||||||
}
|
}
|
||||||
|
|
||||||
const NoResultsOverlay = function () {
|
const NoResultsOverlay = function () {
|
||||||
|
@ -55,8 +55,9 @@ const TakeButton = ({ order, setOrder, baseUrl, hasRobot, info }: TakeButtonProp
|
|||||||
const defaultRoutingBudget = 0.001;
|
const defaultRoutingBudget = 0.001;
|
||||||
const btc_now = order.satoshis_now / 100000000;
|
const btc_now = order.satoshis_now / 100000000;
|
||||||
const rate = order.amount ? order.amount / btc_now : order.max_amount / btc_now;
|
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({
|
const satoshis = computeSats({
|
||||||
amount: Number(takeAmount),
|
amount: amount,
|
||||||
routingBudget: order.is_buyer ? defaultRoutingBudget : 0,
|
routingBudget: order.is_buyer ? defaultRoutingBudget : 0,
|
||||||
fee: tradeFee,
|
fee: tradeFee,
|
||||||
rate: rate,
|
rate: rate,
|
||||||
|
Loading…
Reference in New Issue
Block a user