Skip to content

Commit 5dcdd05

Browse files
committed
Linting fixes
1 parent 2b35a6d commit 5dcdd05

File tree

2 files changed

+58
-54
lines changed

2 files changed

+58
-54
lines changed

components/workflow/config/action-config-renderer.tsx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -140,31 +140,31 @@ function AbiFunctionSelectField({
140140
}
141141

142142
// Filter functions based on functionFilter prop
143-
const filterFn = functionFilter === "write"
144-
? (item: { type: string; stateMutability?: string }) =>
145-
item.type === "function" &&
146-
item.stateMutability !== "view" &&
147-
item.stateMutability !== "pure"
148-
: (item: { type: string; stateMutability?: string }) =>
149-
item.type === "function" &&
150-
(item.stateMutability === "view" || item.stateMutability === "pure");
151-
152-
return abi
153-
.filter(filterFn)
154-
.map((func) => {
155-
const inputs = func.inputs || [];
156-
const params = inputs
157-
.map(
158-
(input: { name: string; type: string }) =>
159-
`${input.type} ${input.name}`
160-
)
161-
.join(", ");
162-
return {
163-
name: func.name,
164-
label: `${func.name}(${params})`,
165-
stateMutability: func.stateMutability || "nonpayable",
166-
};
167-
});
143+
const filterFn =
144+
functionFilter === "write"
145+
? (item: { type: string; stateMutability?: string }) =>
146+
item.type === "function" &&
147+
item.stateMutability !== "view" &&
148+
item.stateMutability !== "pure"
149+
: (item: { type: string; stateMutability?: string }) =>
150+
item.type === "function" &&
151+
(item.stateMutability === "view" ||
152+
item.stateMutability === "pure");
153+
154+
return abi.filter(filterFn).map((func) => {
155+
const inputs = func.inputs || [];
156+
const params = inputs
157+
.map(
158+
(input: { name: string; type: string }) =>
159+
`${input.type} ${input.name}`
160+
)
161+
.join(", ");
162+
return {
163+
name: func.name,
164+
label: `${func.name}(${params})`,
165+
stateMutability: func.stateMutability || "nonpayable",
166+
};
167+
});
168168
} catch {
169169
return [];
170170
}

components/workflow/node-config-panel.tsx

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -698,35 +698,39 @@ export const PanelInner = () => {
698698
selectedNode.data.config?.actionType ? (
699699
<>
700700
{/* Hide Label and Description for read-contract and write-contract actions */}
701-
{selectedNode.data.config?.actionType !== "web3/read-contract" &&
702-
selectedNode.data.config?.actionType !== "web3/write-contract" && (
703-
<>
704-
<div className="space-y-2">
705-
<Label className="ml-1" htmlFor="label">
706-
Label
707-
</Label>
708-
<Input
709-
disabled={isGenerating}
710-
id="label"
711-
onChange={(e) => handleUpdateLabel(e.target.value)}
712-
value={selectedNode.data.label}
713-
/>
714-
</div>
715-
716-
<div className="space-y-2">
717-
<Label className="ml-1" htmlFor="description">
718-
Description
719-
</Label>
720-
<Input
721-
disabled={isGenerating}
722-
id="description"
723-
onChange={(e) => handleUpdateDescription(e.target.value)}
724-
placeholder="Optional description"
725-
value={selectedNode.data.description || ""}
726-
/>
727-
</div>
728-
</>
729-
)}
701+
{selectedNode.data.config?.actionType !==
702+
"web3/read-contract" &&
703+
selectedNode.data.config?.actionType !==
704+
"web3/write-contract" && (
705+
<>
706+
<div className="space-y-2">
707+
<Label className="ml-1" htmlFor="label">
708+
Label
709+
</Label>
710+
<Input
711+
disabled={isGenerating}
712+
id="label"
713+
onChange={(e) => handleUpdateLabel(e.target.value)}
714+
value={selectedNode.data.label}
715+
/>
716+
</div>
717+
718+
<div className="space-y-2">
719+
<Label className="ml-1" htmlFor="description">
720+
Description
721+
</Label>
722+
<Input
723+
disabled={isGenerating}
724+
id="description"
725+
onChange={(e) =>
726+
handleUpdateDescription(e.target.value)
727+
}
728+
placeholder="Optional description"
729+
value={selectedNode.data.description || ""}
730+
/>
731+
</div>
732+
</>
733+
)}
730734
</>
731735
) : null}
732736
</div>

0 commit comments

Comments
 (0)