@@ -10,6 +10,7 @@ import {
1010 ItemPermission ,
1111 ItemVisibilityRequest ,
1212 SessionExpiredError ,
13+ WalletType ,
1314} from "../lib/api" ;
1415import toast from "react-hot-toast" ;
1516
@@ -162,7 +163,7 @@ export default function CreateVaultItemModal({
162163 setVisibilities ( defaultVisibilities ) ;
163164 }
164165 }
165- } , [ isOpen , editingItem , members ] ) ;
166+ } , [ isOpen , editingItem , members , currentUserEmail ] ) ;
166167
167168 if ( ! isOpen ) return null ;
168169
@@ -197,7 +198,7 @@ export default function CreateVaultItemModal({
197198 noteContent : noteContent || undefined ,
198199 url : url || undefined ,
199200 linkNotes : linkNotes || undefined ,
200- walletType : walletType as any ,
201+ walletType : walletType as WalletType ,
201202 platformName : platformName || undefined ,
202203 blockchain : blockchain || undefined ,
203204 publicAddress : publicAddress || undefined ,
@@ -238,7 +239,7 @@ export default function CreateVaultItemModal({
238239 noteContent : noteContent || undefined ,
239240 url : url || undefined ,
240241 linkNotes : linkNotes || undefined ,
241- walletType : walletType as any ,
242+ walletType : walletType as WalletType ,
242243 platformName : platformName || undefined ,
243244 blockchain : blockchain || undefined ,
244245 publicAddress : publicAddress || undefined ,
@@ -252,12 +253,12 @@ export default function CreateVaultItemModal({
252253
253254 onSuccess ( ) ;
254255 onClose ( ) ;
255- } catch ( error : any ) {
256+ } catch ( error : unknown ) {
256257 // Don't show toast for session expiration - it's already handled in API client
257258 if ( error instanceof SessionExpiredError ) {
258259 return ;
259260 }
260- toast . error ( error . message || "Failed to save item" ) ;
261+ toast . error ( error instanceof Error ? error . message : "Failed to save item" ) ;
261262 } finally {
262263 setLoading ( false ) ;
263264 }
@@ -449,7 +450,7 @@ export default function CreateVaultItemModal({
449450 </ label >
450451 < select
451452 value = { walletType }
452- onChange = { ( e ) => setWalletType ( e . target . value as any ) }
453+ onChange = { ( e ) => setWalletType ( e . target . value as WalletType ) }
453454 className = "w-full bg-slate-900/50 border border-slate-700 rounded-lg px-4 py-2 text-slate-100 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent cursor-pointer"
454455 >
455456 < option value = "SeedPhrase" > Seed Phrase</ option >
0 commit comments