Skip to content

Commit 84f8043

Browse files
committed
[TOOL-4908] Dashboard: Fix 'Owner only' claim condition phase type condition (#7506)
<!-- ## 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 focuses on adding a condition to check if the `maxClaimablePerWallet` is `"0"` and enhancing the validation of the `phase.snapshot` property within the `claim-conditions-form` component. ### Detailed summary - Added a condition to check if `phase.maxClaimablePerWallet` is `"0"`. - Ensured `phase.price` is `"0"`. - Checked that `phase.snapshot` is not a string and has a length of 1. > ✨ 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 * **Bug Fixes** * Improved claim condition handling to more accurately identify "creator" claim types based on updated criteria. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent ac48b24 commit 84f8043

File tree

1 file changed

+1
-0
lines changed
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form

1 file changed

+1
-0
lines changed

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ const getClaimConditionTypeFromPhase = (
130130

131131
if (phase.snapshot) {
132132
if (
133+
phase.maxClaimablePerWallet?.toString() === "0" &&
133134
phase.price === "0" &&
134135
typeof phase.snapshot !== "string" &&
135136
phase.snapshot.length === 1 &&

0 commit comments

Comments
 (0)