Skip to content

Commit

Permalink
fix: donation percentage default 0
Browse files Browse the repository at this point in the history
  • Loading branch information
bucurdavid committed Apr 23, 2024
1 parent d5712d2 commit 7dce0f9
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/sft-minter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,21 +294,15 @@ export class SftMinter extends Minter {
datasetDescription: string,
amountToSend: number,
lockPeriod?: number,
donationPercentage = 0,
options?: {
imageUrl?: string;
traitsUrl?: string;
nftStorageToken?: string;
extraAssets?: string[];
donationPercentage?: number;
}
): Promise<Transaction> {
const {
imageUrl,
traitsUrl,
nftStorageToken,
extraAssets,
donationPercentage
} = options ?? {};
const { imageUrl, traitsUrl, nftStorageToken, extraAssets } = options ?? {};

const tokenNameValidator = new StringValidator()
.notEmpty()
Expand Down Expand Up @@ -426,9 +420,7 @@ export class SftMinter extends Minter {
data.addArg(new U64Value(lockPeriod));
}

if (donationPercentage) {
data.addArg(new U64Value(donationPercentage));
}
data.addArg(new U64Value(donationPercentage));

for (const extraAsset of extraAssets ?? []) {
data.addArg(new StringValue(extraAsset));
Expand Down

0 comments on commit 7dce0f9

Please sign in to comment.