@@ -128,29 +128,21 @@ library VolumeRestrictionLib {
128
128
counter = 0 ;
129
129
for (i = 0 ; i < investors.length ; i++ ) {
130
130
if (_isVolRestricted (IDataStore (_dataStore).getUint256 (_getKey (INVESTORFLAGS, investors[i])))) {
131
- uint256 typeValue = (holderToRestrictionType[investors[i]] == uint8 (2 ) ? 2 : 1 );
132
- if (typeValue == 2 ) {
133
- allAddresses[counter] = investors[i];
131
+ allAddresses[counter] = investors[i];
132
+ if (holderToRestrictionType[investors[i]] == uint8 (VolumeRestrictionTMStorage.TypeOfPeriod.MultipleDays)) {
133
+ _setValues (_individualRestrictions.individualRestriction[investors[i]], allowedTokens, startTime, rollingPeriodInDays, endTime, typeOfRestriction, counter);
134
+ }
135
+ else if (holderToRestrictionType[investors[i]] == uint8 (VolumeRestrictionTMStorage.TypeOfPeriod.OneDay)) {
136
+ _setValues (_individualRestrictions.individualDailyRestriction[investors[i]], allowedTokens, startTime, rollingPeriodInDays, endTime, typeOfRestriction, counter);
137
+ }
138
+ else if (holderToRestrictionType[investors[i]] == uint8 (VolumeRestrictionTMStorage.TypeOfPeriod.Both)) {
139
+ _setValues (_individualRestrictions.individualRestriction[investors[i]], allowedTokens, startTime, rollingPeriodInDays, endTime, typeOfRestriction, counter);
134
140
counter++ ;
141
+ allAddresses[counter] = investors[i];
142
+ _setValues (_individualRestrictions.individualDailyRestriction[investors[i]], allowedTokens, startTime, rollingPeriodInDays, endTime, typeOfRestriction, counter);
135
143
}
136
- allAddresses[counter] = investors[i];
137
- counter++ ;
138
- }
139
- }
140
- counter = 0 ;
141
- for (i = 0 ; i < allAddresses.length ; i++ ) {
142
- if (holderToRestrictionType[allAddresses[i]] == uint8 (VolumeRestrictionTMStorage.TypeOfPeriod.MultipleDays)) {
143
- _setValues (_individualRestrictions.individualRestriction[allAddresses[i]], allowedTokens, startTime, rollingPeriodInDays, endTime, typeOfRestriction, counter);
144
- }
145
- else if (holderToRestrictionType[allAddresses[i]] == uint8 (VolumeRestrictionTMStorage.TypeOfPeriod.OneDay)) {
146
- _setValues (_individualRestrictions.individualDailyRestriction[allAddresses[i]], allowedTokens, startTime, rollingPeriodInDays, endTime, typeOfRestriction, counter);
147
- }
148
- else if (holderToRestrictionType[allAddresses[i]] == uint8 (VolumeRestrictionTMStorage.TypeOfPeriod.Both)) {
149
- _setValues (_individualRestrictions.individualRestriction[allAddresses[i]], allowedTokens, startTime, rollingPeriodInDays, endTime, typeOfRestriction, counter);
150
144
counter++ ;
151
- _setValues (_individualRestrictions.individualDailyRestriction[allAddresses[i]], allowedTokens, startTime, rollingPeriodInDays, endTime, typeOfRestriction, counter);
152
145
}
153
- counter++ ;
154
146
}
155
147
}
156
148
0 commit comments