From 5a58311e9399d91cd177fe02a0ac7c4f1c1b58ec Mon Sep 17 00:00:00 2001 From: mmackz Date: Tue, 9 Jul 2024 21:49:06 -0700 Subject: [PATCH 1/2] fix(sound): fix for quantity zero --- packages/soundxyz/src/Soundxyz.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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({ From e3dea9a90114892aee4fe874ce9a67b03a5d6faf Mon Sep 17 00:00:00 2001 From: mmackz Date: Tue, 9 Jul 2024 21:49:45 -0700 Subject: [PATCH 2/2] chore: generate changeset --- .changeset/rotten-trains-fry.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/rotten-trains-fry.md 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