@@ -73,8 +73,8 @@ export function AccountCard() {
7373 variant = "outline"
7474 size = "icon"
7575 onClick = { async ( ) => {
76- const promise = honoClient . accounts [ ':address ' ] . $delete ( {
77- param : { address : account . address } ,
76+ const promise = honoClient . accounts [ ':id ' ] . $delete ( {
77+ param : { id : account . id . toString ( ) } ,
7878 } )
7979
8080 toast . promise ( promise , {
@@ -104,15 +104,15 @@ export function AccountCard() {
104104const addAccountSchema = zfd . formData ( {
105105 name : zfd . text ( z . string ( ) . optional ( ) ) ,
106106 description : zfd . text ( z . string ( ) . optional ( ) ) ,
107- addressOrName : zfd . text ( ) ,
107+ addressOrName : zfd . text ( z . string ( ) . optional ( ) ) ,
108108} )
109109
110110function AccountDialog ( {
111111 address,
112112 prompt,
113113 ...buttonProps
114114} : {
115- address ?: string
115+ address ?: string | null
116116 prompt : 'Add' | 'Edit'
117117} & VariantProps < typeof buttonVariants > ) {
118118 const accounts = useAccounts ( )
@@ -141,7 +141,6 @@ function AccountDialog({
141141 } ,
142142 error : {
143143 message : `Failed to ${ prompt . toLowerCase ( ) } account` ,
144- description : 'Be sure to use the checksummed address' ,
145144 } ,
146145 } )
147146 }
@@ -198,7 +197,7 @@ function AccountDialog({
198197 < Input
199198 name = "addressOrName"
200199 placeholder = "0x1234567890123456789012345678901234567890"
201- defaultValue = { selectedAccount ?. address }
200+ defaultValue = { selectedAccount ?. address ?? '' }
202201 autoComplete = "off"
203202 data-1p-ignore
204203 />
0 commit comments