Skip to content

Commit eaa3b6a

Browse files
committed
Remove empty entries in ERC8004 form
- update signing key placeholder to reflect the validation
1 parent bbd44e4 commit eaa3b6a

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

src/pages/CreateApp/ERC8004Form.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,18 @@ export const ERC8004Form: FC<Props> = ({ handleNext, handleBack, inputs, metadat
4444
} as AppDataInputs,
4545
})
4646
} else {
47+
const nonEmptySecrets = Object.fromEntries(
48+
Object.entries({
49+
...values.secrets,
50+
ERC8004_RPC_URL: addROFL8004RpcPrefix(values.secrets.ERC8004_RPC_URL || ''),
51+
}).filter(([, value]) => value !== '' && value !== null && value !== undefined),
52+
)
53+
54+
console.log(nonEmptySecrets)
4755
setAppDataForm({
4856
inputs: {
4957
...values,
50-
secrets: {
51-
...values.secrets,
52-
ERC8004_RPC_URL: addROFL8004RpcPrefix(values.secrets.ERC8004_RPC_URL || ''),
53-
},
58+
secrets: nonEmptySecrets,
5459
} as AppDataInputs,
5560
})
5661
}
@@ -84,7 +89,7 @@ export const ERC8004Form: FC<Props> = ({ handleNext, handleBack, inputs, metadat
8489
type="password"
8590
name="secrets.ERC8004_SIGNING_KEY"
8691
label="Private key for agent submittion"
87-
placeholder="0x1234567890abcde1234567890abcde1234567890abcde1234567890abcde123"
92+
placeholder="1234567890abcde1234567890abcde1234567890abcde1234567890abcde123"
8893
disabled={skipERC8004}
8994
info="The private key used to sign and submit your agent to the ERC-8004 registry. Add some funds on Sepolia network."
9095
/>

0 commit comments

Comments
 (0)