Some unlocked tokens can become locked after delegation is rejected
When some amount of tokens are requested to be delegated to a validator, the validator can reject the request. The previous status of these tokens should be intact and not changed (locked or unlocked).\\nHere the initial status of tokens gets stored and it's either completely `locked` or unlocked:\\n```\\nif (\\_purchased[delegation.holder] > 0) {\\n    \\_isPurchased[delegationId] = true;\\n    if (\\_purchased[delegation.holder] > delegation.amount) {\\n        \\_purchased[delegation.holder] -= delegation.amount;\\n    } else {\\n        \\_purchased[delegation.holder] = 0;\\n    }\\n} else {\\n    \\_isPurchased[delegationId] = false;\\n}\\n```\\n\\nThe problem is that if some amount of these tokens are locked at the time of the request and the rest tokens are unlocked, they will all be considered as locked after the delegation was rejected.\\n```\\nfunction \\_cancel(uint delegationId, DelegationController.Delegation memory delegation) internal returns (State state) {\\n    if (\\_isPurchased[delegationId]) {\\n        state = purchasedProposedToPurchased(delegationId, delegation);\\n    } else {\\n        state = proposedToUnlocked(delegationId);\\n    }\\n}\\n```\\n
Don't change the status of the rejected tokens.
```\\nif (\\_purchased[delegation.holder] > 0) {\\n    \\_isPurchased[delegationId] = true;\\n    if (\\_purchased[delegation.holder] > delegation.amount) {\\n        \\_purchased[delegation.holder] -= delegation.amount;\\n    } else {\\n        \\_purchased[delegation.holder] = 0;\\n    }\\n} else {\\n    \\_isPurchased[delegationId] = false;\\n}\\n```\\n