@@ -112,7 +112,7 @@ contract VolumeRestrictionTM is VolumeRestrictionTMStorage, ITransferManager {
112112 */
113113 function verifyTransfer (address _from , address /*_to */ , uint256 _amount , bytes /*_data*/ , bool _isTransfer ) public returns (Result) {
114114 // If `_from` is present in the exemptionList or it is `0x0` address then it will not follow the vol restriction
115- if (! paused && _from != address (0 ) && ! exemptList [_from]) {
115+ if (! paused && _from != address (0 ) && exemptIndex [_from] == 0 ) {
116116 // Function must only be called by the associated security token if _isTransfer == true
117117 require (msg .sender == securityToken || ! _isTransfer);
118118 // Checking the individual restriction if the `_from` comes in the individual category
@@ -137,15 +137,14 @@ contract VolumeRestrictionTM is VolumeRestrictionTMStorage, ITransferManager {
137137 */
138138 function changeExemptWalletList (address _wallet , bool _change ) public withPerm (ADMIN) {
139139 require (_wallet != address (0 ));
140- require (exemptList [_wallet] ! = _change);
140+ require ((exemptIndex [_wallet] == 0 ) = = _change);
141141 if (_change) {
142142 exemptAddresses.push (_wallet);
143143 exemptIndex[_wallet] = exemptAddresses.length ;
144- exemptList[_wallet] = true ;
145144 } else {
146- exemptAddresses[exemptIndex[_wallet] - 1 ] = exemptAddresses[exemptAddresses.length - 1 ];
147- exemptIndex[exemptAddresses[exemptIndex[_wallet] - 1 ]] = exemptIndex[_wallet];
148- delete exemptList [_wallet];
145+ exemptAddresses[exemptIndex[_wallet] - 1 ] = exemptAddresses[exemptAddresses.length - 1 ];
146+ exemptIndex[exemptAddresses[exemptIndex[_wallet] - 1 ]] = exemptIndex[_wallet];
147+ delete exemptIndex [_wallet];
149148 exemptAddresses.length -- ;
150149 }
151150 emit ChangedExemptWalletList (_wallet, _change);
@@ -200,7 +199,7 @@ contract VolumeRestrictionTM is VolumeRestrictionTMStorage, ITransferManager {
200199 individualRestriction[_holder].endTime < now ,
201200 "Not Allowed "
202201 );
203- require (_holder != address (0 ) && ! exemptList [_holder], "Invalid address " );
202+ require (_holder != address (0 ) && exemptIndex [_holder] == 0 , "Invalid address " );
204203 _checkInputParams (_allowedTokens, _startTime, _rollingPeriodInDays, _endTime, _restrictionType, now );
205204
206205 if (individualRestriction[_holder].endTime != 0 ) {
@@ -1129,15 +1128,15 @@ contract VolumeRestrictionTM is VolumeRestrictionTMStorage, ITransferManager {
11291128 function getExemptAddress () external view returns (address []) {
11301129 return exemptAddresses;
11311130 }
1132-
1131+
11331132 /**
11341133 * @notice Provide the restriction details of all the restricted addresses
11351134 * @return address List of the restricted addresses
11361135 * @return uint256 List of the tokens allowed to the restricted addresses corresponds to restricted address
11371136 * @return uint256 List of the start time of the restriction corresponds to restricted address
11381137 * @return uint256 List of the rolling period in days for a restriction corresponds to restricted address.
11391138 * @return uint256 List of the end time of the restriction corresponds to restricted address.
1140- * @return uint8 List of the type of restriction to validate the value of the `allowedTokens`
1139+ * @return uint8 List of the type of restriction to validate the value of the `allowedTokens`
11411140 * of the restriction corresponds to restricted address
11421141 */
11431142 function getRestrictedData () external view returns (
@@ -1186,7 +1185,7 @@ contract VolumeRestrictionTM is VolumeRestrictionTMStorage, ITransferManager {
11861185 uint256 [] memory endTime ,
11871186 uint8 [] memory typeOfRestriction ,
11881187 uint256 index
1189- )
1188+ )
11901189 internal
11911190 pure
11921191 {
0 commit comments