Skip to content

Commit

Permalink
changes to accomodate different web3 versions
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsam4 committed Feb 19, 2019
1 parent 31d12c0 commit 2613f60
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/o_security_token.js
Original file line number Diff line number Diff line change
Expand Up @@ -1330,10 +1330,14 @@ contract("SecurityToken", async (accounts) => {
Controller address from the contract: ${await stGetter.controller.call()}
Controller address from the storage: ${await readStorage(I_SecurityToken.address, 7)}
`)

assert.equal(
(await stGetter.controller.call()).substring(0, 4),
await readStorage(I_SecurityToken.address, 7)
// Different versions of web3 behave differently :/
assert.oneOf(
await readStorage(I_SecurityToken.address, 7),
[
(await stGetter.controller.call()).substring(0, 4),
(await stGetter.controller.call()).substring(0, 3),
await stGetter.controller.call()
]
);

console.log(`
Expand Down

0 comments on commit 2613f60

Please sign in to comment.