Skip to content

Commit

Permalink
rm core param
Browse files Browse the repository at this point in the history
  • Loading branch information
dovgopoly committed Oct 30, 2023
1 parent d8ae236 commit a2bc904
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions contracts/libs/gov/gov-pool/GovPoolVote.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,11 @@ library GovPoolVote {
userKeeper.lockNfts(msg.sender, voteType, nftIds);
}

_vote(
core,
rawVotes[IGovPool.VoteType.PersonalVote],
amount,
nftIds,
address(0),
voteType
);
_vote(rawVotes[IGovPool.VoteType.PersonalVote], amount, nftIds, address(0), voteType);
}

if (voteType != IGovPool.VoteType.DelegatedVote) {
_voteDelegated(
core,
userInfos,
rawVotes[IGovPool.VoteType.MicropoolVote],
proposalId,
Expand All @@ -79,7 +71,6 @@ library GovPoolVote {
);

_voteDelegated(
core,
userInfos,
rawVotes[IGovPool.VoteType.TreasuryVote],
proposalId,
Expand Down Expand Up @@ -122,7 +113,7 @@ library GovPoolVote {
}

_cancel(rawVote);
_voteDelegated(core, userInfos, rawVote, proposalId, voter, voteType);
_voteDelegated(userInfos, rawVote, proposalId, voter, voteType);

_updateGlobalState(core, userInfos, proposalId, voter, voteInfo.isVoteFor);
}
Expand Down Expand Up @@ -163,7 +154,6 @@ library GovPoolVote {
}

function _voteDelegated(
IGovPool.ProposalCore storage core,
mapping(address => IGovPool.UserInfo) storage userInfos,
IGovPool.RawVote storage rawVote,
uint256 proposalId,
Expand All @@ -181,11 +171,10 @@ library GovPoolVote {

(uint256 amount, ) = IGovUserKeeper(userKeeper).tokenBalance(voter, voteType);

_vote(core, rawVote, amount, new uint256[](0), voter, voteType);
_vote(rawVote, amount, new uint256[](0), voter, voteType);
}

function _vote(
IGovPool.ProposalCore storage core,
IGovPool.RawVote storage rawVote,
uint256 amount,
uint256[] memory nftIds,
Expand Down

0 comments on commit a2bc904

Please sign in to comment.