diff --git a/contracts/Shareable.sol b/contracts/Shareable.sol index b73f31eee..d416f80be 100644 --- a/contracts/Shareable.sol +++ b/contracts/Shareable.sol @@ -4,7 +4,7 @@ pragma solidity ^0.4.4; /* * Shareable * - * Based on https://github.com/ethereum/dapp-bin/blob/master/wallet/wallet.sol + * Based on https://github.com/ethereum/dapp-bin/blob/master/wallet/wallet.sol * * inheritable "property" contract that enables methods to be protected by requiring the acquiescence of either a single, or, crucially, each of a number of, designated owners. * @@ -98,7 +98,7 @@ contract Shareable { return address(owners[ownerIndex + 1]); } - function isOwner(address _addr) returns (bool) { + function isOwner(address _addr) constant returns (bool) { return ownerIndex[uint(_addr)] > 0; } @@ -162,4 +162,3 @@ contract Shareable { } } - diff --git a/contracts/test-helpers/ShareableMock.sol b/contracts/test-helpers/ShareableMock.sol index 82530e888..ebf06546e 100644 --- a/contracts/test-helpers/ShareableMock.sol +++ b/contracts/test-helpers/ShareableMock.sol @@ -13,7 +13,4 @@ contract ShareableMock is Shareable { count = count + 1; } - function isOwnerConst(address _addr) constant returns (bool) { - return isOwner(_addr); - } } diff --git a/test/Shareable.js b/test/Shareable.js index 36bb7a89d..fba268268 100644 --- a/test/Shareable.js +++ b/test/Shareable.js @@ -12,7 +12,7 @@ contract('Shareable', function(accounts) { for(let i = 0; i < accounts.length; i++) { let owner = await shareable.getOwner(i); - let isowner = await shareable.isOwnerConst(accounts[i]); + let isowner = await shareable.isOwner(accounts[i]); if(i <= owners.length) { assert.equal(accounts[i], owner); assert.isTrue(isowner); @@ -67,7 +67,6 @@ contract('Shareable', function(accounts) { let hash = 1234; let initCount = await shareable.count(); - //initCount = initCount.toString(); for(let i = 0; i < requiredSigs * 3; i++) { await shareable.increaseCount(hash, {from: accounts[i % 4]}); @@ -76,7 +75,7 @@ contract('Shareable', function(accounts) { initCount = Number(initCount)+1; assert.equal(initCount, count); } else { - assert.equal(initCount, count); + assert.equal(initCount.toString(), count); } } }); @@ -95,7 +94,7 @@ contract('Shareable', function(accounts) { } await shareable.increaseCount(hash, {from: accounts[i]}); let count = await shareable.count(); - assert.equal(initCount, count); + assert.equal(initCount.toString(), count); } });