diff --git a/src/contracts/pools/Pool.ts b/src/contracts/pools/Pool.ts index 4d8d4e89..84175030 100644 --- a/src/contracts/pools/Pool.ts +++ b/src/contracts/pools/Pool.ts @@ -169,7 +169,7 @@ export class Pool extends SmartContract { * @param {String} poolAddress * @return {String} */ - async getBaseToken(poolAddress: string): Promise { + async getBasetoken(poolAddress: string): Promise { const pool = this.getContract(poolAddress) let result = null try { @@ -599,7 +599,7 @@ export class Pool extends SmartContract { const maxPrice = amountsInOutMaxFee.maxPrice ? await this.amountToUnits( - await this.getBaseToken(poolAddress), + await this.getBasetoken(poolAddress), amountsInOutMaxFee.maxPrice ) : MAX_UINT_256 @@ -686,7 +686,7 @@ export class Pool extends SmartContract { const maxPrice = amountsInOutMaxFee.maxPrice ? this.amountToUnits( - await this.getBaseToken(poolAddress), + await this.getBasetoken(poolAddress), amountsInOutMaxFee.maxPrice ) : MAX_UINT_256 @@ -755,7 +755,7 @@ export class Pool extends SmartContract { ): Promise { const pool = this.getContract(poolAddress) let result = null - const tokenIn = await this.getBaseToken(poolAddress) + const tokenIn = await this.getBasetoken(poolAddress) const maxSwap = await this.getMaxAddLiquidity(poolAddress, tokenIn) if (new Decimal(tokenAmountIn).greaterThan(maxSwap)) { throw new Error(`tokenAmountOut is greater than ${maxSwap.toString()}`) @@ -803,7 +803,7 @@ export class Pool extends SmartContract { * @param {number} poolDecimals optional number of decimals of the poool * @return {TransactionReceipt} */ - async exitswapPoolAmountIn( + async exitSwapPoolAmountIn( account: string, poolAddress: string, poolAmountIn: string, @@ -813,7 +813,7 @@ export class Pool extends SmartContract { ): Promise { const pool = this.getContract(poolAddress) let result = null - const tokenOut = await this.getBaseToken(poolAddress) + const tokenOut = await this.getBasetoken(poolAddress) const tokenAmountOut = await this.calcSingleOutGivenPoolIn( poolAddress, @@ -827,7 +827,7 @@ export class Pool extends SmartContract { } const minTokenOutFormatted = await this.amountToUnits( - await this.getBaseToken(poolAddress), + await this.getBasetoken(poolAddress), minTokenAmountOut, poolDecimals ) diff --git a/test/unit/pools/balancer/Pool.test.ts b/test/unit/pools/balancer/Pool.test.ts index 4b2e1677..46da70ca 100644 --- a/test/unit/pools/balancer/Pool.test.ts +++ b/test/unit/pools/balancer/Pool.test.ts @@ -215,8 +215,8 @@ describe('Pool unit test', () => { expect(await pool.getDenormalizedWeight(poolAddress, datatoken)).to.equal('5') }) - it('#getBaseToken - should return the baseToken address', async () => { - expect(await pool.getBaseToken(poolAddress)).to.equal(contracts.daiAddress) + it('#getBasetoken - should return the baseToken address', async () => { + expect(await pool.getBasetoken(poolAddress)).to.equal(contracts.daiAddress) }) it('#getDatatoken - should return the datatoken address', async () => { @@ -301,11 +301,11 @@ describe('Pool unit test', () => { ) }) - it('#exitswapPoolAmountIn- user2 exit the pool receiving only DAI', async () => { + it('#exitSwapPoolAmountIn- user2 exit the pool receiving only DAI', async () => { const BPTAmountIn = '0.5' const minDAIOut = '0.5' - const tx = await pool.exitswapPoolAmountIn( + const tx = await pool.exitSwapPoolAmountIn( user1, poolAddress, BPTAmountIn, @@ -324,7 +324,7 @@ describe('Pool unit test', () => { const maxBTPIn = '0.5' const exactDAIOut = '1' - const tx = await pool.exitswapPoolAmountIn( + const tx = await pool.exitSwapPoolAmountIn( user1, poolAddress, maxBTPIn, @@ -673,8 +673,8 @@ describe('Pool unit test', () => { expect(await pool.getDenormalizedWeight(poolAddress, datatoken)).to.equal('5') }) - it('#getBaseToken - should return the baseToken address', async () => { - expect(await pool.getBaseToken(poolAddress)).to.equal(contracts.usdcAddress) + it('#getBasetoken - should return the baseToken address', async () => { + expect(await pool.getBasetoken(poolAddress)).to.equal(contracts.usdcAddress) }) it('#getDatatoken - should return the datatoken address', async () => { @@ -758,11 +758,11 @@ describe('Pool unit test', () => { ) }) - it('#exitswapPoolAmountIn- user2 exit the pool receiving only USDC', async () => { + it('#exitSwapPoolAmountIn- user2 exit the pool receiving only USDC', async () => { const BPTAmountIn = '0.5' const minUSDCOut = '0.5' - const tx = await pool.exitswapPoolAmountIn( + const tx = await pool.exitSwapPoolAmountIn( user1, poolAddress, BPTAmountIn,