From 98db67799fcb2363c7361a383204f0c29704e4ed Mon Sep 17 00:00:00 2001 From: Andrew Dmytrenko <68740472+YouStillAlive@users.noreply.github.com> Date: Sun, 30 Oct 2022 22:40:31 +0200 Subject: [PATCH] removed isWhiteListReady function (#19) --- contracts/WhiteListHelper.sol | 4 ---- test/1_WhiteList.js | 8 ++++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/contracts/WhiteListHelper.sol b/contracts/WhiteListHelper.sol index 04ed892..79f01cb 100644 --- a/contracts/WhiteListHelper.sol +++ b/contracts/WhiteListHelper.sol @@ -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; diff --git a/test/1_WhiteList.js b/test/1_WhiteList.js index 0cf136a..bf464ee 100644 --- a/test/1_WhiteList.js +++ b/test/1_WhiteList.js @@ -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 () => { @@ -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 () => {