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

tuxsudo committed Apr 8, 2024 at 19:04 UTC 69587e813fb0bba4686d79626baa9baf72a50ed6
2 files changed +6 -48
lib/src/screens/dashboard/pages/address_page.dart
+4 -15
@@ -163,12 +163,7 @@ class AddressPage extends BasePage {
163 if (addressListViewModel.hasAddressList) {
164 return SelectButton(
165 text: addressListViewModel.buttonTitle,
166 - onTap: () async => dashboardViewModel.isAutoGenerateSubaddressesEnabled &&
167 - (WalletType.monero == addressListViewModel.wallet.type ||
168 - WalletType.haven == addressListViewModel.wallet.type)
169 - ? await showPopUp<void>(
170 - context: context, builder: (_) => getIt.get<MoneroAccountListPage>())
171 - : Navigator.of(context).pushNamed(Routes.receive),
166 + onTap: () async => Navigator.of(context).pushNamed(Routes.receive),
167 textColor: Theme.of(context).extension<SyncIndicatorTheme>()!.textColor,
168 color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
169 borderColor: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor,
@@ -176,17 +171,11 @@ class AddressPage extends BasePage {
171 textSize: 14,
172 height: 50,
173 );
179 - } else if (dashboardViewModel.isAutoGenerateSubaddressesEnabled ||
180 - addressListViewModel.isElectrumWallet) {
181 - return Text(S.of(context).electrum_address_disclaimer,
182 - textAlign: TextAlign.center,
183 - style: TextStyle(
184 - fontSize: 15,
185 - color: Theme.of(context).extension<BalancePageTheme>()!.labelTextColor));
186 - } else {
174 + }
175 + else {
176 return const SizedBox();
177 }
189 - })
178 + }),
179 ],
180 ),
181 ));
lib/src/screens/receive/receive_page.dart
+2 -33
@@ -99,12 +99,7 @@ class ReceivePage extends BasePage {
99
100 @override
101 Widget body(BuildContext context) {
102 - final isElectrumWallet = addressListViewModel.isElectrumWallet;
103 - return (addressListViewModel.type == WalletType.monero ||
104 - addressListViewModel.type == WalletType.haven ||
105 - addressListViewModel.type == WalletType.nano ||
106 - isElectrumWallet)
107 - ? KeyboardActions(
102 + return KeyboardActions(
103 config: KeyboardActionsConfig(
104 keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
105 keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
@@ -213,32 +208,6 @@ class ReceivePage extends BasePage {
208 })),
209 ],
210 ),
216 - ))
217 - : Padding(
218 - padding: EdgeInsets.fromLTRB(24, 24, 24, 32),
219 - child: Column(
220 - children: [
221 - Expanded(
222 - flex: 7,
223 - child: QRWidget(
224 - formKey: _formKey,
225 - heroTag: _heroTag,
226 - addressListViewModel: addressListViewModel,
227 - amountTextFieldFocusNode: _cryptoAmountFocus,
228 - amountController: _amountController,
229 - isLight: currentTheme.type == ThemeType.light),
230 - ),
231 - Expanded(
232 - flex: 2,
233 - child: SizedBox(),
234 - ),
235 - Text(S.of(context).electrum_address_disclaimer,
236 - textAlign: TextAlign.center,
237 - style: TextStyle(
238 - fontSize: 15,
239 - color: Theme.of(context).extension<BalancePageTheme>()!.labelTextColor)),
240 - ],
241 - ),
242 - );
211 + ));
212 }
213 }