diff --git a/contracts/token/GrantableToken.sol b/contracts/token/GrantableToken.sol index 9f2111b8d..a97c2ed62 100644 --- a/contracts/token/GrantableToken.sol +++ b/contracts/token/GrantableToken.sol @@ -83,7 +83,7 @@ contract GrantableToken is StandardToken { } } - function transferrableTokens(address holder, uint64 time) constant public returns (uint256 nonVested) { + function transferableTokens(address holder, uint64 time) constant public returns (uint256 nonVested) { uint256 grantIndex = grants[holder].length; for (uint256 i = 0; i < grantIndex; i++) { @@ -94,7 +94,7 @@ contract GrantableToken is StandardToken { } function transfer(address _to, uint _value) returns (bool success){ - if (_value > transferrableTokens(msg.sender, uint64(now))) throw; + if (_value > transferableTokens(msg.sender, uint64(now))) throw; return super.transfer(_to, _value); } diff --git a/test/GrantableToken.js b/test/GrantableToken.js index 1f423e116..8f7ee4ac7 100644 --- a/test/GrantableToken.js +++ b/test/GrantableToken.js @@ -19,7 +19,7 @@ contract('GrantableToken', function(accounts) { await token.grantTokens(receiver, tokenAmount, { from: granter }) assert.equal(await token.balanceOf(receiver), tokenAmount); - assert.equal(await token.transferrableTokens(receiver, +new Date()/1000), tokenAmount); + assert.equal(await token.transferableTokens(receiver, +new Date()/1000), tokenAmount); }) describe('getting a token grant', async () => { @@ -34,12 +34,12 @@ contract('GrantableToken', function(accounts) { assert.equal(await token.balanceOf(receiver), tokenAmount); }) - it('has 0 transferrable tokens before cliff', async () => { - assert.equal(await token.transferrableTokens(receiver, now), 0); + it('has 0 transferable tokens before cliff', async () => { + assert.equal(await token.transferableTokens(receiver, now), 0); }) - it('all tokens are transferrable after vesting', async () => { - assert.equal(await token.transferrableTokens(receiver, now + vesting + 1), tokenAmount); + it('all tokens are transferable after vesting', async () => { + assert.equal(await token.transferableTokens(receiver, now + vesting + 1), tokenAmount); }) it('throws when trying to transfer non vested tokens', async () => {