Skip to content

Commit

Permalink
Fix/sell no lock (#575)
Browse files Browse the repository at this point in the history
* sell is no longer limited by lock

* added test case
  • Loading branch information
leekt committed Dec 6, 2020
1 parent e7efa6d commit 0861378
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions contracts/Whitelist.sol
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,7 @@ contract Whitelist is IWhitelist, Ownable, OperatorRole {
// a more clear error message.
require(balance >= _value, "INSUFFICIENT_BALANCE");
require(
_isSell ||
balance >= info.totalTokensLocked.add(_value),
"INSUFFICIENT_TRANSFERABLE_BALANCE"
);
Expand Down
6 changes: 6 additions & 0 deletions test/whitelist/authorizeTransfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ contract("whitelist / authorizeTransfer", (accounts) => {
);
});

it("can sell: lockup", async () => {
await contracts.dat.sell(trader, "100000000", 1, {
from: trader,
});
});

describe("after unlock", async () => {
beforeEach(async () => {
await time.increase(31);
Expand Down

0 comments on commit 0861378

Please sign in to comment.