Skip to content

Commit

Permalink
feat: support custom choices for basic voting (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
bonustrack authored Oct 13, 2024
1 parent 4e6b1fb commit 37c3e3e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { BigNumber } from '@ethersproject/bignumber';
import { capture } from '@snapshot-labs/snapshot-sentry';
import snapshot from '@snapshot-labs/snapshot.js';
import { Response } from 'express';
import isEqual from 'lodash/isEqual';
import fetch from 'node-fetch';

const MAINNET_NETWORK_ID_WHITELIST = ['s', 'eth', 'matic', 'arb1', 'oeth', 'sn'];
Expand Down Expand Up @@ -96,7 +95,7 @@ export function validateChoices({ type, choices }): boolean {
if (type && choices.length > 0) {
switch (type) {
case 'basic':
return isEqual(['For', 'Against', 'Abstain'], choices);
return choices.length === 3;
default:
return true;
}
Expand Down

0 comments on commit 37c3e3e

Please sign in to comment.