-
Notifications
You must be signed in to change notification settings - Fork 17
Add generic redeemRewards function ; removed redundant code #517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/plugins/proposal.ts
Outdated
if (state.name === 'ContributionReward') { | ||
const pluginState = await state.plugin.entity.fetchState() | ||
pluginAddress = pluginState.address | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this condition is needed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old functions are not exactly the same - they are similar but not the same. There is a different in the way pluginAddress
is fetched between the functions and we need to distinguish between the ways. Without this condition some of the tests fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a need to understand why this behave differently .
does pluginAddress
get different value for different cases ? why ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it gets a different value when state.name
is ContributionReward
or different.
src/plugins/proposal.ts
Outdated
).address | ||
} | ||
let method | ||
if (state.name === 'ContributionRewardExt') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ((state.name === 'ContributionRewardExt') || (state.name === 'Competition')) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please bump version.
Resolves: #516
This PR is necessary to solve issue daostack/alchemy#1993 in Alchemy