From 9d4dea98238ac6d7cab8ff0c86d3863a92f006af Mon Sep 17 00:00:00 2001 From: Gerardo Nardelli Date: Thu, 22 Aug 2019 17:35:53 -0300 Subject: [PATCH] Fix amb subsidized mode e2e test --- oracle-e2e/test/amb.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/oracle-e2e/test/amb.js b/oracle-e2e/test/amb.js index 2aafbffc..deb0e0b0 100644 --- a/oracle-e2e/test/amb.js +++ b/oracle-e2e/test/amb.js @@ -23,7 +23,7 @@ const foreignAMB = new foreignWeb3.eth.Contract(FOREIGN_AMB_ABI, amb.foreign) const foreignBox = new foreignWeb3.eth.Contract(BOX_ABI, amb.foreignBox) const oneEther = foreignWeb3.utils.toWei('1', 'ether') -const subsidizedMode = homeWeb3.utils.toBN(0) +const subsidizedMode = toBN(0) describe('arbitrary message bridging', () => { describe('Home to Foreign', () => { @@ -155,8 +155,8 @@ describe('arbitrary message bridging', () => { }) const foreignMode = await foreignAMB.methods.homeToForeignMode().call() - assert(homeMode.eq(subsidizedMode), 'home mode incorrect') - assert(foreignMode.eq(subsidizedMode), 'foreign mode incorrect') + assert(toBN(homeMode).eq(subsidizedMode), 'home mode incorrect') + assert(toBN(foreignMode).eq(subsidizedMode), 'foreign mode incorrect') const initialValue = await foreignBox.methods.value().call() assert(!toBN(initialValue).eq(toBN(newValue)), 'initial value should be different from new value') @@ -298,8 +298,8 @@ describe('arbitrary message bridging', () => { const foreignMode = await foreignAMB.methods.foreignToHomeMode().call() - assert(homeMode.eq(subsidizedMode), 'home mode incorrect') - assert(foreignMode.eq(subsidizedMode), 'foreign mode incorrect') + assert(toBN(homeMode).eq(subsidizedMode), 'home mode incorrect') + assert(toBN(foreignMode).eq(subsidizedMode), 'foreign mode incorrect') const initialValue = await homeBox.methods.value().call() assert(!toBN(initialValue).eq(toBN(newValue)), 'initial value should be different from new value')