Skip to content

Commit

Permalink
dispenser creation: transform maxTokens and maxBalance to wei (#1328)
Browse files Browse the repository at this point in the history
  • Loading branch information
KatunaNorbert authored Mar 11, 2022
1 parent b543c63 commit bd32b95
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/factories/NFTFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,9 @@ export class NftFactory {
): Promise<TransactionReceipt> {
const ercCreateData = getErcCreationParams(ercParams)

dispenserParams.maxBalance = Web3.utils.toWei(dispenserParams.maxBalance)
dispenserParams.maxTokens = Web3.utils.toWei(dispenserParams.maxTokens)

const estGas = await this.estGasCreateNftErc20WithDispenser(
address,
nftCreateData,
Expand Down
4 changes: 2 additions & 2 deletions test/integration/PublishFlows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ describe('Publish tests', async () => {

const dispenserParams: DispenserCreationParams = {
dispenserAddress: addresses.Dispenser,
maxTokens: web3.utils.toWei('1'),
maxBalance: web3.utils.toWei('1'),
maxTokens: '1',
maxBalance: '1',
withMint: true,
allowedSwapper: ZERO_ADDRESS
}
Expand Down
4 changes: 2 additions & 2 deletions test/unit/NftFactory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ describe('Nft Factory test', () => {

const dispenserParams = {
dispenserAddress: contracts.dispenserAddress,
maxTokens: web3.utils.toWei('1'),
maxBalance: web3.utils.toWei('1'),
maxTokens: '1',
maxBalance: '1',
withMint: true,
allowedSwapper: ZERO_ADDRESS
}
Expand Down

0 comments on commit bd32b95

Please sign in to comment.