diff --git a/src/balancer/OceanPool.ts b/src/balancer/OceanPool.ts index 4b0b4c76..6bca604a 100644 --- a/src/balancer/OceanPool.ts +++ b/src/balancer/OceanPool.ts @@ -65,10 +65,10 @@ export class OceanPool extends Pool { this.web3.utils.toWei(String(oceanAmount)) as any ) - super.setup( + await super.setup( account, address, - token, String(amount), String(weight), - this.oceanAddress, String(oceanAmount), String(oceanWeight), + token, this.web3.utils.toWei(String(amount)), this.web3.utils.toWei(String(weight)), + this.oceanAddress, this.web3.utils.toWei(String(oceanAmount)), this.web3.utils.toWei(String(oceanWeight)), this.web3.utils.toWei(fee) ) diff --git a/src/balancer/Pool.ts b/src/balancer/Pool.ts index d4a87687..5c849abd 100644 --- a/src/balancer/Pool.ts +++ b/src/balancer/Pool.ts @@ -72,7 +72,7 @@ export class Pool extends PoolFactory { swapFee ).send({ from: account, gas: this.GASLIMIT_DEFAULT }) } catch (e) { - console.error(e) + console.error('Pool.setup failed:' + e) } return result diff --git a/test/unit/balancer/Balancer.test.ts b/test/unit/balancer/Balancer.test.ts index c8cf83d0..b719dffd 100644 --- a/test/unit/balancer/Balancer.test.ts +++ b/test/unit/balancer/Balancer.test.ts @@ -109,7 +109,9 @@ describe('Balancer flow', () => { }) it('Alice creates a new OceanPool pool', async () => { /// new pool with total DT = 45 , dt weight=90% with swap fee 2% - alicePoolAddress = await Pool.createDTPool(alice, tokenAddress, 45, 9, '0.02') + alicePoolAddress = await Pool.createDTPool(alice, tokenAddress, '45', '9', '0.02') + assert(await Pool.totalSupply(alicePoolAddress) == 100) + assert(await Pool.getNumTokens(alice, alicePoolAddress) == 2) }) it('Get pool information', async () => { const currentTokens = await Pool.getCurrentTokens(alice, alicePoolAddress)