Skip to content

Commit 87c9855

Browse files
committed
Merge branch 'frontend-fix-preselected-account-buy-page'
2 parents 79ebb57 + ec4b836 commit 87c9855

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

frontends/web/src/components/groupedaccountselector/groupedaccountselector.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ const GroupHeading = (
118118

119119
export const GroupedAccountSelector = ({ title, disabled, selected, onChange, onProceed, accounts }: TAccountSelector) => {
120120
const { t } = useTranslation();
121-
const [selectedAccount, setSelectedAccount] = useState<string>();
122121
const [options, setOptions] = useState<TGroupedOption[]>();
123122

124123
useEffect(() => {
@@ -146,11 +145,10 @@ export const GroupedAccountSelector = ({ title, disabled, selected, onChange, on
146145
label: t('buy.info.selectLabel'),
147146
value: 'choose',
148147
disabled: true
149-
} : options.flatMap(o => o.options).find(oo => oo.value === selectedAccount)}
148+
} : options.flatMap(o => o.options).find(opt => opt.value === selected)}
150149
onChange={(e) => {
151150
const value = (e as SingleValue<TOption>)?.value || '';
152151
onChange(value);
153-
setSelectedAccount(value);
154152
}}
155153
components={{
156154
Group,

0 commit comments

Comments
 (0)