From 467c895f6e7149de018b579d7ea1e2b1b34caa86 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Sat, 10 Feb 2024 19:15:57 +0000 Subject: [PATCH] show selected currency on currency chooser --- src/components/ChooseCurrency.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/ChooseCurrency.tsx b/src/components/ChooseCurrency.tsx index 3134282e..024e31ad 100644 --- a/src/components/ChooseCurrency.tsx +++ b/src/components/ChooseCurrency.tsx @@ -23,7 +23,7 @@ const COMBINED_OPTIONS: Currency[] = [USD_OPTION, BTC_OPTION, ...FIAT_OPTIONS]; export function ChooseCurrency() { const i18n = useI18n(); const [error, setError] = createSignal(); - const [_state, actions] = useMegaStore(); + const [state, actions] = useMegaStore(); const [loading, setLoading] = createSignal(false); const navigate = useNavigate(); @@ -37,7 +37,7 @@ export function ChooseCurrency() { const [_chooseCurrencyForm, { Form, Field }] = createForm({ initialValues: { - fiatCurrency: "" + fiatCurrency: state.fiat.value }, validate: (values) => { const errors: Record = {}; @@ -82,7 +82,12 @@ export function ChooseCurrency() { > {({ value, label }) => ( - + )}