hide fiat currency picker when in incognito and calls are broken

This commit is contained in:
Marco 2022-10-15 14:25:14 -06:00
parent 8f2567f340
commit 5f804b3e69
2 changed files with 108 additions and 106 deletions

View file

@ -27,6 +27,7 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/enums/fee_rate_type_enum.dart';
import 'package:stackwallet/utilities/format.dart';
import 'package:stackwallet/utilities/logger.dart';
import 'package:stackwallet/utilities/prefs.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/animated_text.dart';
@ -1107,9 +1108,11 @@ class _SendViewState extends ConsumerState<SendView> {
),
),
),
if (Prefs.instance.externalCalls)
const SizedBox(
height: 8,
),
if (Prefs.instance.externalCalls)
TextField(
style: STextStyles.smallMed14(context).copyWith(
color: Theme.of(context)
@ -1137,7 +1140,8 @@ class _SendViewState extends ConsumerState<SendView> {
if (baseAmountString.isNotEmpty &&
baseAmountString != "." &&
baseAmountString != ",") {
final baseAmount = baseAmountString.contains(",")
final baseAmount = baseAmountString
.contains(",")
? Decimal.parse(
baseAmountString.replaceFirst(",", "."))
: Decimal.parse(baseAmountString);
@ -1188,7 +1192,8 @@ class _SendViewState extends ConsumerState<SendView> {
// Format.decimalAmountToSatoshis(
// _amountToSend!));
// });
_updatePreviewButtonState(_address, _amountToSend);
_updatePreviewButtonState(
_address, _amountToSend);
},
decoration: InputDecoration(
contentPadding: const EdgeInsets.only(
@ -1196,7 +1201,8 @@ class _SendViewState extends ConsumerState<SendView> {
right: 12,
),
hintText: "0",
hintStyle: STextStyles.fieldLabel(context).copyWith(
hintStyle:
STextStyles.fieldLabel(context).copyWith(
fontSize: 14,
),
prefixIcon: FittedBox(

View file

@ -408,12 +408,11 @@ class ContinueButton extends StatelessWidget {
.extension<StackColors>()!
.getPrimaryEnabledButtonColor(context),
onPressed: () {
print("Output of isEasy:");
print(isEasy);
Prefs.instance.externalCalls = isEasy;
if (!isSettings) {
Navigator.of(context).pushNamed(CreatePinView.routeName);
} else {
Navigator.pop(context);
}
},
child: Text(
@ -429,9 +428,6 @@ class ContinueButton extends StatelessWidget {
.extension<StackColors>()!
.getPrimaryEnabledButtonColor(context),
onPressed: () {
print("Output of isEasy:");
print(isEasy);
Prefs.instance.externalCalls = isEasy;
if (!isSettings) {