Skip to content

Commit

Permalink
fixup! chore(suite): use generics for field values (RHF checks got st…
Browse files Browse the repository at this point in the history
…ricter)
  • Loading branch information
komret committed Jul 3, 2023
1 parent d09a2f8 commit e2e5e5d
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const AddressOptions = <TFieldValues extends AddressOptionsFormState>({

const addresses = account?.addresses;
const addressDictionary = useAccountAddressDictionary(account);
const value = address ? addressDictionary[address].address : undefined;
const value = address ? addressDictionary[address] : undefined;

const handleChange = (accountAddress: AccountAddress) =>
setValue('address', accountAddress.address);
Expand All @@ -103,10 +103,8 @@ export const AddressOptions = <TFieldValues extends AddressOptionsFormState>({
<Controller
control={control}
name="address"
defaultValue={value}
render={({ ...field }) => (
render={() => (
<Select
{...field}
onChange={handleChange}
isClearable={false}
value={value}
Expand Down

0 comments on commit e2e5e5d

Please sign in to comment.