Skip to content

Commit d095658

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

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/pages/CreateApp/ERC8004Form.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,17 @@ 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+
4754
setAppDataForm({
4855
inputs: {
4956
...values,
50-
secrets: {
51-
...values.secrets,
52-
ERC8004_RPC_URL: addROFL8004RpcPrefix(values.secrets.ERC8004_RPC_URL || ''),
53-
},
57+
secrets: nonEmptySecrets,
5458
} as AppDataInputs,
5559
})
5660
}
@@ -84,7 +88,7 @@ export const ERC8004Form: FC<Props> = ({ handleNext, handleBack, inputs, metadat
8488
type="password"
8589
name="secrets.ERC8004_SIGNING_KEY"
8690
label="Private key for agent submittion"
87-
placeholder="0x1234567890abcde1234567890abcde1234567890abcde1234567890abcde123"
91+
placeholder="1234567890abcde1234567890abcde1234567890abcde1234567890abcde123"
8892
disabled={skipERC8004}
8993
info="The private key used to sign and submit your agent to the ERC-8004 registry. Add some funds on Sepolia network."
9094
/>

0 commit comments

Comments
 (0)