tiny review fixes

This commit is contained in:
Robert Malikowski
2026-09-11 13:07:06 +02:00
parent 85b79a3f41
commit 8bbaa3fef0
2 changed files with 14 additions and 2 deletions
@@ -290,6 +290,7 @@ class BuySellCustomAmountInput extends StatelessWidget {
Padding(
padding: const EdgeInsets.all(18),
child: NewPrimaryButton(
disabled: controller.text.isEmpty,
onPressed: onContinuePressed,
isLoading: isLoading,
text: S.of(context).continue_text,
+13 -2
View File
@@ -96,10 +96,21 @@ abstract class BuySellViewModelBase extends WalletChangeListenerViewModel with S
// sets based on the absolute amout (from the fiat/charts api)
// works even if you have no rates
Future<void> setCryptoAmountFromFiat(String fiatAmount) async => changeCryptoAmount(
amount: (double.parse(fiatAmount) / (fiatConversionStore.prices[cryptoCurrency] ?? 0))
Future<void> setCryptoAmountFromFiat(String fiatAmount) async {
if(fiatAmount.isEmpty) {
await changeCryptoAmount(amount: "");
return;
}
if(fiatConversionStore.prices[cryptoCurrency] == null) {
return;
}
await changeCryptoAmount(
amount: (double.parse(fiatAmount) / (fiatConversionStore.prices[cryptoCurrency]!))
.toString(),
);
}
final AppStore _appStore;