diff --git a/.changeset/rotten-trains-fry.md b/.changeset/rotten-trains-fry.md new file mode 100644 index 000000000..4e5072917 --- /dev/null +++ b/.changeset/rotten-trains-fry.md @@ -0,0 +1,5 @@ +--- +"@rabbitholegg/questdk-plugin-soundxyz": patch +--- + +fix for quantity zero diff --git a/packages/soundxyz/src/Soundxyz.ts b/packages/soundxyz/src/Soundxyz.ts index f0d55a5d3..971267a6c 100644 --- a/packages/soundxyz/src/Soundxyz.ts +++ b/packages/soundxyz/src/Soundxyz.ts @@ -23,6 +23,8 @@ import { type MintIntentParams, chainIdToViemChain, getExitAddresses, + formatAmount, + getMintAmount, } from '@rabbitholegg/questdk-plugin-utils' import { type Address, @@ -48,7 +50,7 @@ export const mint = async ( $abiAbstract: SUPERMINTER_V2_ABI, p: { edition: contractAddress, - quantity: amount, + quantity: formatAmount(amount), tier: tokenId, to: recipient, // Can be given as gift, so recipient will not always match sender }, @@ -61,7 +63,7 @@ export const getMintIntent = async ( ): Promise => { const { contractAddress, recipient, tokenId, amount } = mint const tier = await getDefaultMintTier(mint.chainId, contractAddress, tokenId) - const quantity = amount ?? 1 + const quantity = getMintAmount(amount) const mintTo = { edition: contractAddress, @@ -114,7 +116,7 @@ export const simulateMint = async ( tokenId, _client, ) - const quantity = amount ?? 1 + const quantity = getMintAmount(amount) const mintTo = { edition: contractAddress, @@ -181,7 +183,7 @@ export const getFees = async ( tokenId, client, ) - const quantity = amount ?? 1 + const quantity = getMintAmount(amount) try { const totalPriceAndFees = (await client.readContract({