From d6efbd2c657cbfca6941bc99056fcd952432e1d0 Mon Sep 17 00:00:00 2001 From: Padreug Date: Sat, 23 May 2026 19:30:03 +0200 Subject: [PATCH] fix(base): FiatToggleField reads form state via useFormContext MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous version called useField directly with a getter for the field name. That created a child-local field rather than connecting to the parent form's allow_fiat / fiat_currency state — so the Switch's on/off visually toggled but the form never knew, and the conditional Fiat currency dropdown never appeared. Rewrite around the proven pattern used elsewhere in the dialog: bind the inputs through FormField (the shadcn-vue / vee-validate Field component) and reach for cross-field state via useFormContext. showCurrencyDropdown now reads form.values[allowFiatField] directly, which mirrors the parent's actual state, and the denomination-mirror watch goes through form.setFieldValue. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../components/payments/FiatToggleField.vue | 129 +++++++++--------- 1 file changed, 64 insertions(+), 65 deletions(-) diff --git a/src/modules/base/components/payments/FiatToggleField.vue b/src/modules/base/components/payments/FiatToggleField.vue index 23c9c9c..5ddb292 100644 --- a/src/modules/base/components/payments/FiatToggleField.vue +++ b/src/modules/base/components/payments/FiatToggleField.vue @@ -1,9 +1,10 @@