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:
parent
b543c63ec7
commit
bd32b950a8
@ -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,
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user