Skip to content

Commit 82db664

Browse files
Merge pull request #1235 from cypherstack/various
Various
2 parents 850cd65 + 1412203 commit 82db664

File tree

13 files changed

+1035
-1192
lines changed

13 files changed

+1035
-1192
lines changed

docs/building.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,7 @@ pip3 install --upgrade meson==0.64.1 markdown==3.4.1 markupsafe==2.1.1 jinja2==3
7777
```
7878

7979
### Flutter
80-
Install Flutter 3.35.7 by [following their guide](https://docs.flutter.dev/get-started/install/linux/desktop?tab=download#install-the-flutter-sdk). You can also clone https://github.com/flutter/flutter, check out the `3.35.7` tag, and add its `flutter/bin` folder to your PATH as in
81-
```sh
82-
FLUTTER_DIR="$HOME/development/flutter"
83-
git clone https://github.com/flutter/flutter.git "$FLUTTER_DIR"
84-
cd "$FLUTTER_DIR"
85-
git checkout 3.35.7
86-
echo 'export PATH="$PATH:'"$FLUTTER_DIR"'/bin"' >> "$HOME/.profile"
87-
source "$HOME/.profile"
88-
flutter precache
89-
```
80+
Install Flutter 3.38.5 by [following their guide](https://docs.flutter.dev/install/manual).
9081

9182
Run `flutter doctor` in a terminal to confirm its installation.
9283

@@ -227,7 +218,7 @@ rustup target add aarch64-apple-ios aarch64-apple-darwin
227218
Optionally download [Android Studio](https://developer.android.com/studio) as an IDE and activate its Dart and Flutter plugins. VS Code may work as an alternative, but this is not recommended.
228219

229220
### Flutter
230-
Install [Flutter](https://docs.flutter.dev/get-started/install) 3.29.2 on your Mac host by following [these instructions](https://docs.flutter.dev/get-started/install/macos). Run `flutter doctor` in a terminal to confirm its installation.
221+
Install 3.38.5 on your Mac host by [following their guide](https://docs.flutter.dev/install/manual). Run `flutter doctor` in a terminal to confirm its installation.
231222

232223
### Build plugins and configure
233224
#### Building plugins for iOS
@@ -293,16 +284,7 @@ If the DLLs were built on the WSL filesystem instead of on Windows, copy the res
293284
Frostdart will be built by the Windows host later.
294285

295286
### Install Flutter on Windows host
296-
Install Flutter 3.35.7 on your Windows host (not in WSL2) by [following their guide](https://docs.flutter.dev/get-started/install/windows/desktop?tab=download#install-the-flutter-sdk) or by cloning https://github.com/flutter/flutter, checking out the `3.35.7` tag, and adding its `flutter/bin` folder to your PATH as in
297-
```bat
298-
@echo off
299-
set "FLUTTER_DIR=%USERPROFILE%\development\flutter"
300-
git clone https://github.com/flutter/flutter.git "%FLUTTER_DIR%"
301-
cd /d "%FLUTTER_DIR%"
302-
git checkout 3.35.7
303-
setx PATH "%PATH%;%FLUTTER_DIR%\bin"
304-
echo Flutter setup completed. Please restart your command prompt.
305-
```
287+
Install Flutter 3.38.5 on your Windows host (not in WSL2) by [following their guide](https://docs.flutter.dev/install/manual).
306288

307289
Run `flutter doctor` in PowerShell to confirm its installation.
308290

lib/pages/send_view/send_view.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,10 +520,6 @@ class _SendViewState extends ConsumerState<SendView> {
520520
Map<Amount, String> cachedFiroPublicFees = {};
521521

522522
Future<String> calculateFees(Amount amount) async {
523-
if (amount <= Amount.zero) {
524-
return "0";
525-
}
526-
527523
if (isFiro) {
528524
switch (ref.read(publicPrivateBalanceStateProvider.state).state) {
529525
case BalanceType.public:

lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,13 @@ class _WalletNetworkSettingsViewState
154154
// pop rescanning dialog
155155
Navigator.of(context, rootNavigator: isDesktop).pop();
156156

157+
final String message;
158+
if (wallet is CryptonoteWallet || wallet is EpiccashWallet) {
159+
message = "Rescan started";
160+
} else {
161+
message = "Rescan completed";
162+
}
163+
157164
// show success
158165
await showDialog<dynamic>(
159166
context: context,
@@ -164,7 +171,7 @@ class _WalletNetworkSettingsViewState
164171
builder: (child) =>
165172
DesktopDialog(maxHeight: 150, maxWidth: 500, child: child),
166173
child: StackDialog(
167-
title: "Rescan completed",
174+
title: message,
168175
rightButton: TextButton(
169176
style: Theme.of(context)
170177
.extension<StackColors>()!
@@ -380,11 +387,8 @@ class _WalletNetworkSettingsViewState
380387
),
381388
title: Text("Network", style: STextStyles.navBarTitle(context)),
382389
actions: [
383-
if (ref.watch(pWalletCoin(widget.walletId)) is! Epiccash &&
384-
ref.watch(pWalletCoin(widget.walletId))
385-
is! Mimblewimblecoin ||
386-
ref.watch(pWalletCoin(widget.walletId))
387-
is! Mimblewimblecoin)
390+
if (ref.watch(pWalletCoin(widget.walletId))
391+
is! Mimblewimblecoin)
388392
Padding(
389393
padding: const EdgeInsets.only(
390394
top: 10,
@@ -984,7 +988,6 @@ class _WalletNetworkSettingsViewState
984988
),
985989
),
986990
if (isDesktop &&
987-
ref.watch(pWalletCoin(widget.walletId)) is! Epiccash &&
988991
ref.watch(pWalletCoin(widget.walletId)) is! Mimblewimblecoin)
989992
RoundedWhiteContainer(
990993
borderColor: isDesktop

lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/edit_refresh_height_view.dart

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ import '../../../../utilities/constants.dart';
1111
import '../../../../utilities/text_styles.dart';
1212
import '../../../../utilities/util.dart';
1313
import '../../../../wallets/isar/providers/wallet_info_provider.dart';
14+
import '../../../../wallets/wallet/impl/epiccash_wallet.dart';
1415
import '../../../../wallets/wallet/intermediate/cryptonote_wallet.dart';
16+
import '../../../../wallets/wallet/supporting/epiccash_wallet_info_extension.dart';
1517
import '../../../../widgets/background.dart';
1618
import '../../../../widgets/conditional_parent.dart';
1719
import '../../../../widgets/custom_buttons/app_bar_icon_button.dart';
@@ -48,13 +50,19 @@ class _EditRefreshHeightViewState extends ConsumerState<EditRefreshHeightView> {
4850
try {
4951
final newHeight = int.tryParse(_controller.text);
5052
if (newHeight != null && newHeight >= 0) {
51-
await ref
52-
.read(pWalletInfo(widget.walletId))
53-
.updateRestoreHeight(
54-
newRestoreHeight: newHeight,
55-
isar: ref.read(mainDBProvider).isar,
56-
);
5753
final wallet = ref.read(pWallets).getWallet(widget.walletId);
54+
55+
if (wallet is EpiccashWallet) {
56+
await wallet.updateRestoreHeight(newHeight);
57+
} else {
58+
await ref
59+
.read(pWalletInfo(widget.walletId))
60+
.updateRestoreHeight(
61+
newRestoreHeight: newHeight,
62+
isar: ref.read(mainDBProvider).isar,
63+
);
64+
}
65+
5866
if (wallet is CryptonoteWallet && wallet.wallet != null) {
5967
wallet.setRefreshFromBlockHeight(newHeight);
6068
}
@@ -95,7 +103,13 @@ class _EditRefreshHeightViewState extends ConsumerState<EditRefreshHeightView> {
95103
super.initState();
96104
_controller = TextEditingController();
97105
final wallet = ref.read(pWallets).getWallet(widget.walletId);
98-
if (wallet is CryptonoteWallet && wallet.wallet != null) {
106+
if (wallet is EpiccashWallet) {
107+
_controller.text = ref
108+
.read(pWalletInfo(widget.walletId))
109+
.epicData!
110+
.restoreHeight
111+
.toString();
112+
} else if (wallet is CryptonoteWallet && wallet.wallet != null) {
99113
_controller.text = wallet.getRefreshFromBlockHeight().toString();
100114
} else {
101115
_controller.text = ref

lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/wallet_settings_wallet_settings_view.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import '../../../../utilities/text_styles.dart';
2323
import '../../../../wallets/isar/models/wallet_info.dart';
2424
import '../../../../wallets/isar/providers/wallet_info_provider.dart';
2525
import '../../../../wallets/wallet/impl/bitcoin_wallet.dart';
26+
import '../../../../wallets/wallet/impl/epiccash_wallet.dart';
2627
import '../../../../wallets/wallet/intermediate/cryptonote_wallet.dart';
2728
import '../../../../wallets/wallet/wallet_mixin_interfaces/multi_address_interface.dart';
2829
import '../../../../wallets/wallet/wallet_mixin_interfaces/mweb_interface.dart';
@@ -591,8 +592,9 @@ class _WalletSettingsWalletSettingsViewState
591592
),
592593
),
593594
),
594-
if (wallet is CryptonoteWallet) const SizedBox(height: 8),
595-
if (wallet is CryptonoteWallet)
595+
if (wallet is CryptonoteWallet || wallet is EpiccashWallet)
596+
const SizedBox(height: 8),
597+
if (wallet is CryptonoteWallet || wallet is EpiccashWallet)
596598
RoundedWhiteContainer(
597599
padding: const EdgeInsets.all(0),
598600
child: RawMaterialButton(

0 commit comments

Comments
 (0)