Skip to content

Commit 6f581c8

Browse files
committed
Update default config (#7859)
<!-- ## 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 the removal of the `THIRDWEB_PUBLISHER_ADDRESS` constant from the `addresses.ts` file and its associated usage in the `custom-contract.tsx` file, simplifying the logic related to default fee configuration. ### Detailed summary - Removed the `THIRDWEB_PUBLISHER_ADDRESS` constant from `addresses.ts`. - Updated `custom-contract.tsx` to eliminate the use of `THIRDWEB_PUBLISHER_ADDRESS`. - Simplified the `hasInbuiltDefaultFeeConfig` logic by only checking `defaultFeeRecipientFunction`. > ✨ 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** * Corrected default platform-fee selection during contract deployment: when a default fee recipient is configured, the updated default fee rate is applied regardless of publisher identity, ensuring consistent platform fees on non–zero-fee chains. * **Chores** * Removed an unused publisher address constant from configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent b1ac15c commit 6f581c8

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

apps/dashboard/src/@/constants/addresses.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
export const THIRDWEB_DEPLOYER_ADDRESS =
22
"0xdd99b75f095d0c4d5112aCe938e4e6ed962fb024";
33

4-
export const THIRDWEB_PUBLISHER_ADDRESS =
5-
"0xdd99b75f095d0c4d5112aCe938e4e6ed962fb024";
6-
74
export const DEFAULT_FEE_RECIPIENT =
85
"0x1af20c6b23373350ad464700b5965ce4b0d2ad94";
96

apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/custom-contract.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ import {
4747
DEFAULT_FEE_BPS,
4848
DEFAULT_FEE_BPS_NEW,
4949
DEFAULT_FEE_RECIPIENT,
50-
THIRDWEB_PUBLISHER_ADDRESS,
5150
} from "@/constants/addresses";
5251
import { LAST_USED_PROJECT_ID, LAST_USED_TEAM_ID } from "@/constants/cookie";
5352
import { ZERO_FEE_CHAINS } from "@/constants/fee-config";
@@ -218,9 +217,7 @@ export const CustomContractForm: React.FC<CustomContractFormProps> = ({
218217
const defaultFeeRecipientFunction = metadata.abi.find(
219218
(a) => a.type === "function" && a.name === "DEFAULT_FEE_RECIPIENT",
220219
);
221-
const hasInbuiltDefaultFeeConfig =
222-
defaultFeeRecipientFunction &&
223-
metadata.publisher === THIRDWEB_PUBLISHER_ADDRESS;
220+
const hasInbuiltDefaultFeeConfig = defaultFeeRecipientFunction;
224221

225222
const isFeeExempt =
226223
walletChain?.id && ZERO_FEE_CHAINS.includes(walletChain.id);

0 commit comments

Comments
 (0)