From 8c58c131ac75150687b8fce3344ef316914624ce Mon Sep 17 00:00:00 2001 From: MananTank Date: Thu, 16 Oct 2025 11:15:36 +0000 Subject: [PATCH] [MNY-250] Fix Save button not enabled after changing Royalty BPS in contract settings page (#8252) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR introduces a modification to the form handling in two components, adding the `shouldDirty` option to the `setValue` function calls for better form state management. ### Detailed summary - In `royalties.tsx`, added `shouldDirty: true` to `form.setValue` for `seller_fee_basis_points`. - In `platform-fees.tsx`, added `shouldDirty: true` to `form.setValue` for `platform_fee_basis_points`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` ## Summary by CodeRabbit * **Bug Fixes** * Platform Fees and Royalties settings now mark field edits as dirty immediately, enabling the Save action when values are changed. * Unsaved-changes indicators and prompts update right away, reducing the risk of losing edits. --- .../[contractAddress]/settings/components/platform-fees.tsx | 1 + .../[contractAddress]/settings/components/royalties.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/platform-fees.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/platform-fees.tsx index a2a552a9c14..31635dd9650 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/platform-fees.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/platform-fees.tsx @@ -137,6 +137,7 @@ export function SettingsPlatformFees({ onChange={(value) => form.setValue("platform_fee_basis_points", value, { shouldValidate: true, + shouldDirty: true, }) } value={form.watch("platform_fee_basis_points")} diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/royalties.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/royalties.tsx index e47d83d6cb4..44376b7792d 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/royalties.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/royalties.tsx @@ -151,6 +151,7 @@ export function SettingsRoyalties({ onChange={(value) => form.setValue("seller_fee_basis_points", value, { shouldValidate: true, + shouldDirty: true, }) } value={form.watch("seller_fee_basis_points")}