Skip to content

Commit f37f86f

Browse files
authored
fn input accepts more than just numbers for uint array types
1 parent bb49374 commit f37f86f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/app/features/function-call/FunctionCall.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,13 @@ const FunctionForm = ({ fn }) => {
9191
{fn.inputs?.map((input, idx) => (
9292
<div key={input.name} style={{ marginBottom: `1rem` }}>
9393
<div>{input.name}:</div>
94-
<Input
95-
type={input.type.substring(0, 4) === "uint" ? "number" : "text"}
94+
<Input
95+
type={
96+
input.type.substring(0, 4) === 'uint' &&
97+
!input.type.includes('[]')
98+
? 'number'
99+
: 'text'
100+
}
96101
placeholder={input.type}
97102
value={formState[idx] || ""}
98103
onChange={(e) => handleInputChange(idx, e.target.value)}

0 commit comments

Comments
 (0)