1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

fixed pool unit tests after refactor

This commit is contained in:
Bogdan Fazakas 2021-11-08 21:52:51 +02:00
parent 7e766a585f
commit 6606c6d7d7
3 changed files with 8 additions and 15 deletions

View File

@ -24,7 +24,7 @@
"release": "release-it --non-interactive",
"changelog": "auto-changelog -p",
"prepublishOnly": "npm run build",
"test:pool": "mocha --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/pools/Pool.test.ts'",
"test:pool": "mocha --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/pools/balancer/Pool.test.ts'",
"test:dt": "mocha --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/Datatoken.test.ts'",
"test:nftDt": "mocha --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/NFTDatatoken.test.ts'",
"test:router": "mocha --config=test/unit/.mocharc.json --node-env=test --exit 'test/unit/pools/Router.test.ts'",

View File

@ -701,18 +701,14 @@ export class NFTFactory {
ercParams: ErcCreateParams,
poolParams: PoolParams
): Promise<TransactionReceipt> {
const ercCreateData = this.getErcCreationParams(ercParams)
const poolData = this.getPoolCreationParams(poolParams)
const estGas = await this.estGasCreateNftErcWithPool(
address,
nftCreateData,
ercCreateData,
poolData
ercParams,
poolParams
)
console.log('estGas', estGas)
console.log('ercCreateData', ercCreateData)
console.log('poolData', poolData)
const ercCreateData = this.getErcCreationParams(ercParams)
const poolData = this.getPoolCreationParams(poolParams)
// Invoke createToken function of the contract
const trxReceipt = await this.factory721.methods

View File

@ -597,11 +597,6 @@ describe('Pool unit test', () => {
symbol: 'ERC20DT1Symbol'
}
const basetokenInitialLiq = Number(
await pool.amountToUnits(contracts.usdcAddress, '2000')
)
console.log(basetokenInitialLiq.toString())
const poolParams: PoolParams = {
ssContract: contracts.sideStakingAddress,
basetokenAddress: contracts.usdcAddress,
@ -613,7 +608,9 @@ describe('Pool unit test', () => {
basetokenDecimals: await usdcContract.methods.decimals().call(),
vestingAmount: '10000',
vestedBlocks: 2500000,
initialBasetokenLiquidity: basetokenInitialLiq.toString(),
initialBasetokenLiquidity: web3.utils.fromWei(
await pool.amountToUnits(contracts.usdcAddress, '2000')
),
swapFeeLiquidityProvider: 1e15,
swapFeeMarketPlaceRunner: 1e15
}