Merge pull request #2099 from RoboSats/fix-order-match

Fix order match
This commit is contained in:
KoalaSat
2025-07-20 14:06:08 +00:00
committed by GitHub
3 changed files with 9 additions and 4 deletions

View File

@ -6,6 +6,7 @@ import { filterOrders, genBase62Token } from '../../utils';
import MakerForm from '../../components/MakerForm'; import MakerForm from '../../components/MakerForm';
import BookTable from '../../components/BookTable'; import BookTable from '../../components/BookTable';
import thirdParties from '../../../static/thirdparties.json';
import { AppContext, type UseAppStoreType } from '../../contexts/AppContext'; import { AppContext, type UseAppStoreType } from '../../contexts/AppContext';
import { NoRobotDialog } from '../../components/Dialogs'; import { NoRobotDialog } from '../../components/Dialogs';
@ -20,6 +21,7 @@ const MakerPage = (): React.JSX.Element => {
const { garage, maker } = useContext<UseGarageStoreType>(GarageContext); const { garage, maker } = useContext<UseGarageStoreType>(GarageContext);
const { t } = useTranslation(); const { t } = useTranslation();
const navigate = useNavigate(); const navigate = useNavigate();
const mobileView = windowSize?.width < 50;
const maxHeight = (windowSize.height - navbarHeight) * 0.85 - 3; const maxHeight = (windowSize.height - navbarHeight) * 0.85 - 3;
const [showMatches, setShowMatches] = useState<boolean>(false); const [showMatches, setShowMatches] = useState<boolean>(false);
@ -76,6 +78,9 @@ const MakerPage = (): React.JSX.Element => {
} }
}; };
const tableMaxWidth = mobileView ? windowSize.width * 0.8 : Math.min(windowSize.width, 60);
const tableMaxHeight = Math.min(matches.length * 3.25 + 3, windowSize.height * 0.68);
return ( return (
<Grid container direction='column' alignItems='center' spacing={1}> <Grid container direction='column' alignItems='center' spacing={1}>
<VisitThirdParty <VisitThirdParty
@ -113,8 +118,8 @@ const MakerPage = (): React.JSX.Element => {
<Grid item> <Grid item>
<BookTable <BookTable
orderList={matches} orderList={matches}
maxWidth={Math.min(windowSize.width, 60)} // EM units maxWidth={tableMaxWidth} // EM units
maxHeight={Math.min(matches.length * 3.25 + 3, 16)} // EM units maxHeight={tableMaxHeight} // EM units
defaultFullscreen={false} defaultFullscreen={false}
showControls={false} showControls={false}
showFooter={false} showFooter={false}

View File

@ -58,7 +58,7 @@ const SelectCoordinator: React.FC<SelectCoordinatorProps> = ({
} }
sx={{ marginTop: 2 }} sx={{ marginTop: 2 }}
> >
{coordinator?.info {!coordinator?.loadingInfo
? coordinator?.info?.swap_enabled ? coordinator?.info?.swap_enabled
? t('Supports on-chain swaps.') ? t('Supports on-chain swaps.')
: t('Does not support on-chain swaps.') : t('Does not support on-chain swaps.')

View File

@ -290,7 +290,7 @@ const OrderDetails = ({
} }
style={{ width: '100%' }} style={{ width: '100%' }}
> >
{coordinator?.info {!coordinator?.loadingInfo
? coordinator?.info?.swap_enabled ? coordinator?.info?.swap_enabled
? t('Supports on-chain swaps.') ? t('Supports on-chain swaps.')
: t('Does not support on-chain swaps.') : t('Does not support on-chain swaps.')