Skip to content

Commit

Permalink
removed isWhiteListReady function (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
YouStillAlive authored Oct 30, 2022
1 parent b9e8306 commit 98db677
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 0 additions & 4 deletions contracts/WhiteListHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ contract WhiteListHelper{
WhitelistDB[_Id][user] = 0;
}

function isWhiteListReady(uint256 _Id) public view returns(bool){
return WhitelistSettings[_Id].isReady;
}

//View function to Check if address is whitelisted
function Check(address _user, uint256 _id) public view returns(uint){
if (_id == 0) return type(uint).max;
Expand Down
8 changes: 4 additions & 4 deletions test/1_WhiteList.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ contract( 'WhiteList Contract' , async accounts => {
})

it('isReady is false before adding the first address', async () => {
const isReady = await instance.isWhiteListReady(id)
assert.isFalse(isReady)
const result = await instance.WhitelistSettings(id)
assert.isFalse(result.isReady)
})

it('should add addresses to whitelist', async () => {
Expand All @@ -51,8 +51,8 @@ contract( 'WhiteList Contract' , async accounts => {
})

it('isReady is true after adding the first address', async () => {
const isReady = await instance.isWhiteListReady(id)
assert.isTrue(isReady)
const result = await instance.WhitelistSettings(id)
assert.isTrue(result.isReady)
})

it('reverts when array length of users and amounts is not equal', async () => {
Expand Down

0 comments on commit 98db677

Please sign in to comment.