fixes gh-109: resolve conflict between Ownable and ERC20 token.

This commit is contained in:
qdeswaef
2016-12-15 15:32:08 +01:00
parent e859d53b6c
commit 41fdd5d4c6
2 changed files with 6 additions and 6 deletions

View File

@ -19,7 +19,7 @@ contract Ownable {
_;
}
function transfer(address newOwner) onlyOwner {
function transferOwnership(address newOwner) onlyOwner {
if (newOwner != address(0)) owner = newOwner;
}

View File

@ -12,7 +12,7 @@ contract('Ownable', function(accounts) {
it("changes owner after transfer", async function() {
let other = accounts[1];
let transfer = await ownable.transfer(other);
let transfer = await ownable.transferOwnership(other);
let owner = await ownable.owner();
assert.isTrue(owner === other);
@ -20,7 +20,7 @@ contract('Ownable', function(accounts) {
it("should prevent non-owners from transfering", async function() {
let other = accounts[2];
let transfer = await ownable.transfer(other, {from: accounts[2]});
let transfer = await ownable.transferOwnership(other, {from: accounts[2]});
let owner = await ownable.owner();
assert.isFalse(owner === other);
@ -29,7 +29,7 @@ contract('Ownable', function(accounts) {
it("should guard ownership against stuck state", async function() {
let ownable = Ownable.deployed();
let originalOwner = await ownable.owner();
let transfer = await ownable.transfer(null, {from: originalOwner});
let transfer = await ownable.transferOwnership(null, {from: originalOwner});
let newOwner = await ownable.owner();
assert.equal(originalOwner, newOwner);