Skip to content

Commit

Permalink
Generate correct predicate for Gitcoin non-weifhted no stamp census
Browse files Browse the repository at this point in the history
  • Loading branch information
emmdim authored and elboletaire committed Mar 21, 2024
1 parent ca09c0b commit 46b6a0b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/ProcessCreate/Steps/Confirm.tsx
Expand Up @@ -493,7 +493,15 @@ const getGitcoinStrategyId = async (form: CensusGitcoinValues, c3client: Vocdoni
chainID: scoreToken.chainID,
minBalance: form.passportScore.toString(),
}
predicate = `${scoreToken.symbol} ${predicate}`
if (predicate.length == 0) {
if (form.gpsWeighted) {
predicate = `${scoreToken.symbol}`
} else {
predicate = `${scoreToken.symbol} OR ${scoreToken.symbol}`
}
} else {
predicate = `${scoreToken.symbol} ${predicate}`
}
return await c3client.createStrategy('gitcoin_onvote_' + Date.now(), predicate, strategyTokens)
}

Expand Down

3 comments on commit 46b6a0b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://onvote-stg.netlify.app as production
πŸš€ Deployed on https://65fc4b0a1fd3fe2e085baa97--onvote-stg.netlify.app

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.