Skip to content

Commit dbadc23

Browse files
committed
Dashboard: Disable pay modal in ERC1155 set claim conditions if cost estimation is already done in dashboard (#8161)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## 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}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## 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. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 21d5d0b commit dbadc23

File tree

1 file changed

+2
-0
lines changed
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft

1 file changed

+2
-0
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/create-nft-page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ export function CreateNFTPage(props: {
328328
);
329329
}
330330

331+
await sendAndConfirmTxNoPayModal.mutateAsync(tx);
332+
} else if (totalBatches > 1) {
331333
await sendAndConfirmTxNoPayModal.mutateAsync(tx);
332334
} else {
333335
await sendAndConfirmTx.mutateAsync(tx);

0 commit comments

Comments
 (0)