diff --git a/src/@types/Datatoken.ts b/src/@types/Datatoken.ts index e0f87439..31c8b09f 100644 --- a/src/@types/Datatoken.ts +++ b/src/@types/Datatoken.ts @@ -39,6 +39,6 @@ export interface OrderParams { export interface DispenserParams { maxTokens: string maxBalance: string - withMint?: boolean // true if we want to allow the dispenser to be a minter + withMint?: boolean // true if we want to allow the dispenser to be a minter, default true allowedSwapper?: string // only account that can ask tokens. set address(0) if not required } diff --git a/src/@types/Dispenser.ts b/src/@types/Dispenser.ts index 02749dfb..51dac0e5 100644 --- a/src/@types/Dispenser.ts +++ b/src/@types/Dispenser.ts @@ -2,7 +2,7 @@ export interface DispenserCreationParams { dispenserAddress: string maxTokens: string // how many tokens cand be dispensed when someone requests . If maxTokens=2 then someone can't request 3 in one tx maxBalance: string // how many dt the user has in it's wallet before the dispenser will not dispense dt - withMint?: boolean // true if we want to allow the dispenser to be a minter + withMint?: boolean // true if we want to allow the dispenser to be a minter, default true allowedSwapper?: string // only account that can ask tokens. set address(0) if not required } diff --git a/src/@types/FixedPrice.ts b/src/@types/FixedPrice.ts index c7a0c06a..67a7bc70 100644 --- a/src/@types/FixedPrice.ts +++ b/src/@types/FixedPrice.ts @@ -7,7 +7,7 @@ export interface FreCreationParams { datatokenDecimals: number fixedRate: string marketFee: string - withMint?: boolean // add FixedPriced contract as minter if withMint == true + withMint?: boolean // adds FixedPriced contract as minter if withMint is not set to false allowedConsumer?: string // only account that consume the exhchange } diff --git a/src/contracts/Datatoken.ts b/src/contracts/Datatoken.ts index e8f36856..883ca753 100644 --- a/src/contracts/Datatoken.ts +++ b/src/contracts/Datatoken.ts @@ -102,7 +102,7 @@ export class Datatoken extends SmartContract { } if (!fixedRateParams.allowedConsumer) fixedRateParams.allowedConsumer = ZERO_ADDRESS - const withMint = fixedRateParams.withMint ? 1 : 0 + const withMint = fixedRateParams.withMint === false ? 0 : 1 // should check DatatokenDeployer role using NFT level .. @@ -173,7 +173,7 @@ export class Datatoken extends SmartContract { if (!dispenserParams.allowedSwapper) dispenserParams.allowedSwapper = ZERO_ADDRESS - if (!dispenserParams.withMint) dispenserParams.withMint = false + dispenserParams.withMint = dispenserParams.withMint !== false // should check DatatokenDeployer role using NFT level .. diff --git a/src/contracts/NFTFactory.ts b/src/contracts/NFTFactory.ts index 7a9dcddf..5c364000 100644 --- a/src/contracts/NFTFactory.ts +++ b/src/contracts/NFTFactory.ts @@ -594,7 +594,7 @@ export class NftFactory extends SmartContractWithAddress { private getFreCreationParams(freParams: FreCreationParams): any { if (!freParams.allowedConsumer) freParams.allowedConsumer = ZERO_ADDRESS - const withMint = freParams.withMint ? 1 : 0 + const withMint = freParams.withMint === false ? 0 : 1 return { fixedPriceAddress: freParams.fixedRateAddress,