Skip to content

Commit

Permalink
fix(camp): ignore update candies when matching proposal <> candidate
Browse files Browse the repository at this point in the history
For now, treat original candidate as the source for a proposal, ignoring any
later candidates used as proposal updates.
  • Loading branch information
pedropregueiro committed Oct 1, 2024
1 parent 0f7322d commit 1da919a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/nouns-camp/src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,9 @@ const createStore = ({ initialState, publicClient }) =>
);
return mergeIntoStore({
proposalsById: value.reduce((acc, v) => {
if (v.proposalId == null) return acc;
if (v.proposalId == null || v.targetProposalId != null)
return acc;

return {
...acc,
[v.proposalId]: {
Expand Down Expand Up @@ -563,6 +565,7 @@ const createStore = ({ initialState, publicClient }) =>
values
signatures
calldatas
proposalIdToUpdate
}
}
}
Expand Down Expand Up @@ -829,7 +832,7 @@ const createStore = ({ initialState, publicClient }) =>
createdTimestamp
updateMessage
proposal { id }
content { matchingProposalIds }
content { matchingProposalIds, proposalIdToUpdate }
}
}`,
});
Expand Down

0 comments on commit 1da919a

Please sign in to comment.