Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions contracts/tokens/SecurityToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -540,34 +540,34 @@ contract SecurityToken is StandardToken, DetailedERC20, ReentrancyGuard, Registr
uint256 _value,
bytes _data,
bool _isTransfer
) internal checkGranularity(_value) returns (bool) {
)
internal
checkGranularity(_value)
returns (bool)
{
if (!transfersFrozen) {
if (modules[TRANSFER_KEY].length == 0) {
if (modules[TRANSFER_KEY].length == 0)
return true;
}
bool isInvalid = false;
bool isValid = false;
bool isForceValid = false;
bool unarchived = false;

bool isValid;
bool isInvalid;
address module;
for (uint8 i = 0; i < modules[TRANSFER_KEY].length; i++) {

for (uint256 i = 0; i < modules[TRANSFER_KEY].length; i++) {
module = modules[TRANSFER_KEY][i];
if (!modulesToData[module].isArchived) {
unarchived = true;
ITransferManager.Result valid = ITransferManager(module).verifyTransfer(_from, _to, _value, _data, _isTransfer);
if (valid == ITransferManager.Result.INVALID) {
isInvalid = true;
}
if (valid == ITransferManager.Result.VALID) {
} else if (valid == ITransferManager.Result.VALID) {
isValid = true;
}
if (valid == ITransferManager.Result.FORCE_VALID) {
isForceValid = true;
} else if (valid == ITransferManager.Result.FORCE_VALID) {
return true;
}
}
}
// If no unarchived modules, return true by default
return unarchived ? (isForceValid ? true : (isInvalid ? false : isValid)) : true;
if (isValid && !isInvalid)
return true;
}
return false;
}
Expand Down