Always show addresses page for Monero and remove unused text showing up for wallets it shouldn't be (#1363)

This commit is contained in:
tuxsudo 2024-04-08 19:04:16 -04:00 committed by GitHub
parent 2877cc160c
commit 69587e813f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 48 deletions

View file

@ -163,12 +163,7 @@ class AddressPage extends BasePage {
if (addressListViewModel.hasAddressList) {
return SelectButton(
text: addressListViewModel.buttonTitle,
onTap: () async => dashboardViewModel.isAutoGenerateSubaddressesEnabled &&
(WalletType.monero == addressListViewModel.wallet.type ||
WalletType.haven == addressListViewModel.wallet.type)
? await showPopUp<void>(
context: context, builder: (_) => getIt.get<MoneroAccountListPage>())
: Navigator.of(context).pushNamed(Routes.receive),
onTap: () async => Navigator.of(context).pushNamed(Routes.receive),
textColor: Theme.of(context).extension<SyncIndicatorTheme>()!.textColor,
color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
borderColor: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor,
@ -176,17 +171,11 @@ class AddressPage extends BasePage {
textSize: 14,
height: 50,
);
} else if (dashboardViewModel.isAutoGenerateSubaddressesEnabled ||
addressListViewModel.isElectrumWallet) {
return Text(S.of(context).electrum_address_disclaimer,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 15,
color: Theme.of(context).extension<BalancePageTheme>()!.labelTextColor));
} else {
}
else {
return const SizedBox();
}
})
}),
],
),
));

View file

@ -99,12 +99,7 @@ class ReceivePage extends BasePage {
@override
Widget body(BuildContext context) {
final isElectrumWallet = addressListViewModel.isElectrumWallet;
return (addressListViewModel.type == WalletType.monero ||
addressListViewModel.type == WalletType.haven ||
addressListViewModel.type == WalletType.nano ||
isElectrumWallet)
? KeyboardActions(
return KeyboardActions(
config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
@ -213,32 +208,6 @@ class ReceivePage extends BasePage {
})),
],
),
))
: Padding(
padding: EdgeInsets.fromLTRB(24, 24, 24, 32),
child: Column(
children: [
Expanded(
flex: 7,
child: QRWidget(
formKey: _formKey,
heroTag: _heroTag,
addressListViewModel: addressListViewModel,
amountTextFieldFocusNode: _cryptoAmountFocus,
amountController: _amountController,
isLight: currentTheme.type == ThemeType.light),
),
Expanded(
flex: 2,
child: SizedBox(),
),
Text(S.of(context).electrum_address_disclaimer,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 15,
color: Theme.of(context).extension<BalancePageTheme>()!.labelTextColor)),
],
),
);
));
}
}