Skip to content

Commit e2c9d4d

Browse files
committed
[TOOL-3606] playground: Remove Ethereum as default selected chain in insight playground (#6413)
<!-- start pr-codex --> ## PR-Codex overview This PR refines the logic for setting default values in the `values` object within the `blueprint-playground.client.tsx` file. It consolidates the conditions for assigning a default value to parameters. ### Detailed summary - Removed the specific check for `param.name === "chain"` that assigned a hardcoded value of `"1"`. - Simplified the condition to check if `param.schema` has a `type` and a `default` property. - Updated the assignment of `values[param.name]` to use `param.schema.default` when applicable, otherwise setting it to an empty string. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 0f6aa6b commit e2c9d4d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

apps/playground-web/src/app/insight/[blueprint_slug]/blueprint-playground.client.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,7 @@ export function BlueprintPlaygroundUI(props: {
157157
const defaultValues = useMemo(() => {
158158
const values: Record<string, string | number> = {};
159159
for (const param of parameters) {
160-
if (param.name === "chain") {
161-
values.chain = "1";
162-
} else if (
163-
param.schema &&
164-
"type" in param.schema &&
165-
param.schema.default
166-
) {
160+
if (param.schema && "type" in param.schema && param.schema.default) {
167161
values[param.name] = param.schema.default;
168162
} else {
169163
values[param.name] = "";

0 commit comments

Comments
 (0)