Skip to content

Commit 37c3e3e

Browse files
authored
feat: support custom choices for basic voting (#456)
1 parent 4e6b1fb commit 37c3e3e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/helpers/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { BigNumber } from '@ethersproject/bignumber';
66
import { capture } from '@snapshot-labs/snapshot-sentry';
77
import snapshot from '@snapshot-labs/snapshot.js';
88
import { Response } from 'express';
9-
import isEqual from 'lodash/isEqual';
109
import fetch from 'node-fetch';
1110

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

0 commit comments

Comments
 (0)