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

dispenser creation: transform maxTokens and maxBalance to wei (#1328)

This commit is contained in:
Norbi 2022-03-11 13:04:55 +02:00 committed by GitHub
parent b543c63ec7
commit bd32b950a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -867,6 +867,9 @@ export class NftFactory {
): Promise<TransactionReceipt> { ): Promise<TransactionReceipt> {
const ercCreateData = getErcCreationParams(ercParams) const ercCreateData = getErcCreationParams(ercParams)
dispenserParams.maxBalance = Web3.utils.toWei(dispenserParams.maxBalance)
dispenserParams.maxTokens = Web3.utils.toWei(dispenserParams.maxTokens)
const estGas = await this.estGasCreateNftErc20WithDispenser( const estGas = await this.estGasCreateNftErc20WithDispenser(
address, address,
nftCreateData, nftCreateData,

View File

@ -262,8 +262,8 @@ describe('Publish tests', async () => {
const dispenserParams: DispenserCreationParams = { const dispenserParams: DispenserCreationParams = {
dispenserAddress: addresses.Dispenser, dispenserAddress: addresses.Dispenser,
maxTokens: web3.utils.toWei('1'), maxTokens: '1',
maxBalance: web3.utils.toWei('1'), maxBalance: '1',
withMint: true, withMint: true,
allowedSwapper: ZERO_ADDRESS allowedSwapper: ZERO_ADDRESS
} }

View File

@ -254,8 +254,8 @@ describe('Nft Factory test', () => {
const dispenserParams = { const dispenserParams = {
dispenserAddress: contracts.dispenserAddress, dispenserAddress: contracts.dispenserAddress,
maxTokens: web3.utils.toWei('1'), maxTokens: '1',
maxBalance: web3.utils.toWei('1'), maxBalance: '1',
withMint: true, withMint: true,
allowedSwapper: ZERO_ADDRESS allowedSwapper: ZERO_ADDRESS
} }