Fix for UnspentCoinsInfo Hive Box. Add checkbox for fixed rates for exchange.

M committed Jan 24, 2022 at 16:12 UTC 2e1f1e2c795f8c3920ab525e7149c5e28fae6afd
2 files changed +7 -4
lib/main.dart
+5 -2
@@ -109,8 +109,11 @@ Future<void> main() async {
109 final templates = await Hive.openBox<Template>(Template.boxName);
110 final exchangeTemplates =
111 await Hive.openBox<ExchangeTemplate>(ExchangeTemplate.boxName);
112 - final unspentCoinsInfoSource =
113 - await Hive.openBox<UnspentCoinsInfo>(UnspentCoinsInfo.boxName);
112 + Box<UnspentCoinsInfo> unspentCoinsInfoSource;
113 +
114 + if (!isMoneroOnly) {
115 + unspentCoinsInfoSource = await Hive.openBox<UnspentCoinsInfo>(UnspentCoinsInfo.boxName);
116 + }
117
118 await initialSetup(
119 sharedPreferences: await SharedPreferences.getInstance(),
lib/src/screens/exchange/exchange_page.dart
+2 -2
@@ -314,7 +314,7 @@ class ExchangePage extends BasePage {
314 ],
315 ),
316 ),
317 - /*if (exchangeViewModel.isReceiveAmountEditable) Padding(
317 + Padding(
318 padding: EdgeInsets.only(top: 12, left: 24),
319 child: Row(
320 mainAxisAlignment: MainAxisAlignment.start,
@@ -328,7 +328,7 @@ class ExchangePage extends BasePage {
328 ),
329 ],
330 )
331 - ),*/
331 + ),
332 Padding(
333 padding: EdgeInsets.only(top: 30, left: 24, bottom: 24),
334 child: Row(