diff --git a/src/balancer/OceanPool.ts b/src/balancer/OceanPool.ts index 64790f5a..a7f539cc 100644 --- a/src/balancer/OceanPool.ts +++ b/src/balancer/OceanPool.ts @@ -119,9 +119,8 @@ export class OceanPool extends Pool { const oceanWeight = 10 - parseFloat(dtWeight) this.dtAddress = dtAddress let txid - let dtAllowance - dtAllowance = await this.allowance(dtAddress, account, address) - if (dtAllowance < dtAmount){ + const dtAllowance = await this.allowance(dtAddress, account, address) + if (dtAllowance < dtAmount) { observer.next(PoolCreateProgressStep.ApprovingDatatoken) txid = await this.approve( account, @@ -132,11 +131,10 @@ export class OceanPool extends Pool { if (!txid) { this.logger.error('ERROR: Failed to call approve DT token') return null - } + } } - let oceanAllowance - oceanAllowance = await this.allowance(dtAddress, account, address) - if (oceanAllowance < oceanAmount){ + const oceanAllowance = await this.allowance(this.oceanAddress, account, address) + if (oceanAllowance < oceanAmount) { observer.next(PoolCreateProgressStep.ApprovingOcean) txid = await this.approve( account, diff --git a/src/balancer/Pool.ts b/src/balancer/Pool.ts index 82a64dfd..6dec245e 100644 --- a/src/balancer/Pool.ts +++ b/src/balancer/Pool.ts @@ -119,7 +119,7 @@ export class Pool extends PoolFactory { owner: string, spender: string ): Promise { - const tokenAbi = (defaultDatatokensABI.abi as AbiItem[]) + const tokenAbi = defaultDatatokensABI.abi as AbiItem[] const datatoken = new this.web3.eth.Contract(tokenAbi, tokenAdress, { from: spender })