Skip to content

Commit

Permalink
Hide compression option for ramplot/diskplot
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiaMineJP committed Aug 8, 2023
1 parent 7ee45b8 commit c53e672
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/gui/src/components/plot/add/PlotAddChooseSize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import React, { useEffect, useState } from 'react';
import { useFormContext } from 'react-hook-form';
import styled from 'styled-components';

import PlotterName from '../../../constants/PlotterName';
import { getPlotSizeOptions } from '../../../constants/plotSizes';
import Plotter from '../../../types/Plotter';

Expand All @@ -25,8 +26,6 @@ export default function PlotAddChooseSize(props: Props) {
const openDialog = useOpenDialog();

const op = plotter.options;
const isBladebit3OrNewer =
plotter.defaults.plotterName.startsWith('bladebit') && plotter.version && +plotter.version.split('.')[0] >= 3;

const plotterName = watch('plotterName');
const plotSize = watch('plotSize');
Expand All @@ -35,7 +34,7 @@ export default function PlotAddChooseSize(props: Props) {
const compressionLevel = compressionLevelStr ? +compressionLevelStr : undefined;
const isKLow = plotSize < MIN_MAINNET_K_SIZE;

const compressionAvailable = op.haveBladebitCompressionLevel && isBladebit3OrNewer;
const compressionAvailable = op.haveBladebitCompressionLevel && plotterName === PlotterName.BLADEBIT_CUDA;

const [allowedPlotSizes, setAllowedPlotSizes] = useState(
getPlotSizeOptions(plotterName, compressionLevel).filter((option) => plotter.options.kSizes.includes(option.value))
Expand Down

0 comments on commit c53e672

Please sign in to comment.