mirror of
https://github.com/status-im/community-dapp.git
synced 2025-02-23 03:28:21 +00:00
Fix getCommunityVoting (#89)
This commit is contained in:
parent
cbd319db3f
commit
167c34a42a
@ -16,7 +16,7 @@ interface EnvConfigs {
|
||||
|
||||
const contracts = {
|
||||
3: {
|
||||
votingContract: '0xF8739d0dDC51aCC421808b6b887f4A34bEB92960',
|
||||
votingContract: '0x942C8248d14c20b9E79d7A60178B5b17Dd7186c3',
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -51,8 +51,6 @@ contract MockContract {
|
||||
uint256 roomNumber
|
||||
)
|
||||
{
|
||||
require(communityVotingId[publicKey] > 0, 'vote not found');
|
||||
require(votingRoomMap[communityVotingId[publicKey]].endAt > block.timestamp, 'vote ended');
|
||||
startBlock = votingRoomMap[communityVotingId[publicKey]].startBlock;
|
||||
endAt = votingRoomMap[communityVotingId[publicKey]].endAt;
|
||||
voteType = votingRoomMap[communityVotingId[publicKey]].voteType;
|
||||
|
@ -186,10 +186,7 @@ describe('Contract', () => {
|
||||
BigNumber.from(1),
|
||||
])
|
||||
|
||||
await expect(contract.getCommunityVoting(secondAddress.address)).to.be.revertedWith('vote not found')
|
||||
|
||||
await provider.send('evm_mine', [Math.floor(Date.now() + 10000)])
|
||||
await expect(contract.getCommunityVoting(firstAddress.address)).to.be.revertedWith('vote ended')
|
||||
await contract.initializeVotingRoom(1, secondAddress.address)
|
||||
expect((await contract.getCommunityVoting(secondAddress.address)).slice(2)).to.deep.eq([
|
||||
1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user