Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set withMint default to true #1693

Merged
merged 2 commits into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/@types/Datatoken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion src/@types/Dispenser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion src/@types/FixedPrice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions src/contracts/Datatoken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..

Expand Down Expand Up @@ -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 ..

Expand Down
2 changes: 1 addition & 1 deletion src/contracts/NFTFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down