Skip to content

Commit

Permalink
fix: hardcode strategies limits (#4969)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR authored Feb 13, 2025
1 parent 6d594d9 commit ea5c9cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/SettingsStrategiesBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { SpaceStrategy } from '@/helpers/interfaces';
import { clone } from '@snapshot-labs/snapshot.js/src/utils';
import schemas from '@snapshot-labs/snapshot.js/src/schemas';
import { STRATEGIES_LIMITS } from '@/helpers/constants';
const spaceSchema = schemas.space;

Check warning on line 7 in src/components/SettingsStrategiesBlock.vue

View workflow job for this annotation

GitHub Actions / build (16.x)

'spaceSchema' is assigned a value but never used
Expand All @@ -18,7 +19,7 @@ const { form, validationErrors } = useFormSpaceSettings(props.context, {
});
const strategiesLimit = computed(
() => spaceSchema.properties.strategies.maxItemsWithSpaceType[props.spaceType]
() => STRATEGIES_LIMITS[props.spaceType || 'default']
);
const strategies = computed(() => form.value.strategies);
Expand Down
6 changes: 6 additions & 0 deletions src/helpers/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,9 @@ export const BOOST_ENABLED_VOTING_TYPES = [
'single-choice',
'ranked-choice'
];

export const STRATEGIES_LIMITS = {
default: 8,
verified: 8,
turbo: 10
};

0 comments on commit ea5c9cc

Please sign in to comment.