From dbadc23e0488f42aefb9c911edb1ff215c853477 Mon Sep 17 00:00:00 2001 From: MananTank Date: Tue, 30 Sep 2025 19:01:52 +0000 Subject: [PATCH] Dashboard: Disable pay modal in ERC1155 set claim conditions if cost estimation is already done in dashboard (#8161) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR updates the logic for handling transaction confirmations in the `create-nft-page.tsx` file, specifically addressing scenarios with multiple batches. ### Detailed summary - Added a conditional check for `totalBatches > 1`. - If true, it uses `sendAndConfirmTxNoPayModal.mutateAsync(tx)` for transaction confirmation. - If false, it defaults to `sendAndConfirmTx.mutateAsync(tx)` for single batch transactions. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` ## Summary by CodeRabbit * **New Features** * Streamlined multi-batch transaction confirmation when configuring NFT claim conditions. When multiple batches are required and a wallet is connected, a no-payment confirmation modal is used to reduce prompts and improve reliability. Single-batch flows continue to use the standard confirmation path. --- .../(sidebar)/tokens/create/nft/create-nft-page.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/create-nft-page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/create-nft-page.tsx index 4bbb5b33145..711d4a4f178 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/create-nft-page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/create-nft-page.tsx @@ -328,6 +328,8 @@ export function CreateNFTPage(props: { ); } + await sendAndConfirmTxNoPayModal.mutateAsync(tx); + } else if (totalBatches > 1) { await sendAndConfirmTxNoPayModal.mutateAsync(tx); } else { await sendAndConfirmTx.mutateAsync(tx);