mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
Always show addresses page for Monero and remove unused text showing up for wallets it shouldn't be (#1363)
This commit is contained in:
parent
2877cc160c
commit
69587e813f
2 changed files with 6 additions and 48 deletions
|
@ -163,12 +163,7 @@ class AddressPage extends BasePage {
|
||||||
if (addressListViewModel.hasAddressList) {
|
if (addressListViewModel.hasAddressList) {
|
||||||
return SelectButton(
|
return SelectButton(
|
||||||
text: addressListViewModel.buttonTitle,
|
text: addressListViewModel.buttonTitle,
|
||||||
onTap: () async => dashboardViewModel.isAutoGenerateSubaddressesEnabled &&
|
onTap: () async => Navigator.of(context).pushNamed(Routes.receive),
|
||||||
(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),
|
|
||||||
textColor: Theme.of(context).extension<SyncIndicatorTheme>()!.textColor,
|
textColor: Theme.of(context).extension<SyncIndicatorTheme>()!.textColor,
|
||||||
color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
|
color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
|
||||||
borderColor: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor,
|
borderColor: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor,
|
||||||
|
@ -176,17 +171,11 @@ class AddressPage extends BasePage {
|
||||||
textSize: 14,
|
textSize: 14,
|
||||||
height: 50,
|
height: 50,
|
||||||
);
|
);
|
||||||
} else if (dashboardViewModel.isAutoGenerateSubaddressesEnabled ||
|
}
|
||||||
addressListViewModel.isElectrumWallet) {
|
else {
|
||||||
return Text(S.of(context).electrum_address_disclaimer,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 15,
|
|
||||||
color: Theme.of(context).extension<BalancePageTheme>()!.labelTextColor));
|
|
||||||
} else {
|
|
||||||
return const SizedBox();
|
return const SizedBox();
|
||||||
}
|
}
|
||||||
})
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
|
@ -99,12 +99,7 @@ class ReceivePage extends BasePage {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget body(BuildContext context) {
|
Widget body(BuildContext context) {
|
||||||
final isElectrumWallet = addressListViewModel.isElectrumWallet;
|
return KeyboardActions(
|
||||||
return (addressListViewModel.type == WalletType.monero ||
|
|
||||||
addressListViewModel.type == WalletType.haven ||
|
|
||||||
addressListViewModel.type == WalletType.nano ||
|
|
||||||
isElectrumWallet)
|
|
||||||
? KeyboardActions(
|
|
||||||
config: KeyboardActionsConfig(
|
config: KeyboardActionsConfig(
|
||||||
keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
|
keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
|
||||||
keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
|
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)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue