@@ -7,7 +7,7 @@ import { Dropdown } from '../common/Dropdown';
77import { Account } from './Account' ;
88import { createAccountOptions } from 'ui/util/dropdown' ;
99import type { DropdownOption , DropdownProps , ValidFormField } from 'types' ;
10- import { useApi , useDatabase } from 'ui/contexts' ;
10+ import { useApi , useDatabase , useVersion } from 'ui/contexts' ;
1111import { classes } from 'lib/util' ;
1212import { useDbQuery } from 'ui/hooks' ;
1313
@@ -43,15 +43,21 @@ function Select({
4343
4444export function AccountSelect ( { placeholder = 'Select account' , ...props } : Props ) {
4545 const { accounts } = useApi ( ) ;
46+ const { version } = useVersion ( ) ;
4647
4748 return (
48- < Select options = { createAccountOptions ( accounts || [ ] ) } placeholder = { placeholder } { ...props } />
49+ < Select
50+ options = { createAccountOptions ( accounts || [ ] , version ) }
51+ placeholder = { placeholder }
52+ { ...props }
53+ />
4954 ) ;
5055}
5156
5257export function AddressSelect ( { placeholder = 'Select account' , onChange, ...props } : Props ) {
5358 const { accounts } = useApi ( ) ;
5459 const { db } = useDatabase ( ) ;
60+ const { version } = useVersion ( ) ;
5561 const [ contracts ] = useDbQuery ( ( ) => db . contracts . toArray ( ) , [ db ] ) ;
5662 const [ recent , setRecent ] = useState < DropdownOption < string > [ ] > ( [ ] ) ;
5763
@@ -63,7 +69,7 @@ export function AddressSelect({ placeholder = 'Select account', onChange, ...pro
6369 } ,
6470 {
6571 label : 'My Accounts' ,
66- options : createAccountOptions ( accounts || [ ] ) ,
72+ options : createAccountOptions ( accounts || [ ] , version ) ,
6773 } ,
6874 {
6975 label : 'Uploaded Contracts' ,
0 commit comments