Skip to content

Commit 0861378

Browse files
authored
Fix/sell no lock (#575)
* sell is no longer limited by lock * added test case
1 parent e7efa6d commit 0861378

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

contracts/Whitelist.sol

+1
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,7 @@ contract Whitelist is IWhitelist, Ownable, OperatorRole {
879879
// a more clear error message.
880880
require(balance >= _value, "INSUFFICIENT_BALANCE");
881881
require(
882+
_isSell ||
882883
balance >= info.totalTokensLocked.add(_value),
883884
"INSUFFICIENT_TRANSFERABLE_BALANCE"
884885
);

test/whitelist/authorizeTransfer.js

+6
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@ contract("whitelist / authorizeTransfer", (accounts) => {
235235
);
236236
});
237237

238+
it("can sell: lockup", async () => {
239+
await contracts.dat.sell(trader, "100000000", 1, {
240+
from: trader,
241+
});
242+
});
243+
238244
describe("after unlock", async () => {
239245
beforeEach(async () => {
240246
await time.increase(31);

0 commit comments

Comments
 (0)