Skip to content
Merged

Various #1235

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 3 additions & 21 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,7 @@ pip3 install --upgrade meson==0.64.1 markdown==3.4.1 markupsafe==2.1.1 jinja2==3
```

### Flutter
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
```sh
FLUTTER_DIR="$HOME/development/flutter"
git clone https://github.com/flutter/flutter.git "$FLUTTER_DIR"
cd "$FLUTTER_DIR"
git checkout 3.35.7
echo 'export PATH="$PATH:'"$FLUTTER_DIR"'/bin"' >> "$HOME/.profile"
source "$HOME/.profile"
flutter precache
```
Install Flutter 3.38.5 by [following their guide](https://docs.flutter.dev/install/manual).

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

Expand Down Expand Up @@ -227,7 +218,7 @@ rustup target add aarch64-apple-ios aarch64-apple-darwin
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.

### Flutter
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.
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.

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

### Install Flutter on Windows host
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
```bat
@echo off
set "FLUTTER_DIR=%USERPROFILE%\development\flutter"
git clone https://github.com/flutter/flutter.git "%FLUTTER_DIR%"
cd /d "%FLUTTER_DIR%"
git checkout 3.35.7
setx PATH "%PATH%;%FLUTTER_DIR%\bin"
echo Flutter setup completed. Please restart your command prompt.
```
Install Flutter 3.38.5 on your Windows host (not in WSL2) by [following their guide](https://docs.flutter.dev/install/manual).

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

Expand Down
4 changes: 0 additions & 4 deletions lib/pages/send_view/send_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -520,10 +520,6 @@ class _SendViewState extends ConsumerState<SendView> {
Map<Amount, String> cachedFiroPublicFees = {};

Future<String> calculateFees(Amount amount) async {
if (amount <= Amount.zero) {
return "0";
}

if (isFiro) {
switch (ref.read(publicPrivateBalanceStateProvider.state).state) {
case BalanceType.public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ class _WalletNetworkSettingsViewState
// pop rescanning dialog
Navigator.of(context, rootNavigator: isDesktop).pop();

final String message;
if (wallet is CryptonoteWallet || wallet is EpiccashWallet) {
message = "Rescan started";
} else {
message = "Rescan completed";
}

// show success
await showDialog<dynamic>(
context: context,
Expand All @@ -164,7 +171,7 @@ class _WalletNetworkSettingsViewState
builder: (child) =>
DesktopDialog(maxHeight: 150, maxWidth: 500, child: child),
child: StackDialog(
title: "Rescan completed",
title: message,
rightButton: TextButton(
style: Theme.of(context)
.extension<StackColors>()!
Expand Down Expand Up @@ -380,11 +387,8 @@ class _WalletNetworkSettingsViewState
),
title: Text("Network", style: STextStyles.navBarTitle(context)),
actions: [
if (ref.watch(pWalletCoin(widget.walletId)) is! Epiccash &&
ref.watch(pWalletCoin(widget.walletId))
is! Mimblewimblecoin ||
ref.watch(pWalletCoin(widget.walletId))
is! Mimblewimblecoin)
if (ref.watch(pWalletCoin(widget.walletId))
is! Mimblewimblecoin)
Padding(
padding: const EdgeInsets.only(
top: 10,
Expand Down Expand Up @@ -984,7 +988,6 @@ class _WalletNetworkSettingsViewState
),
),
if (isDesktop &&
ref.watch(pWalletCoin(widget.walletId)) is! Epiccash &&
ref.watch(pWalletCoin(widget.walletId)) is! Mimblewimblecoin)
RoundedWhiteContainer(
borderColor: isDesktop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import '../../../../utilities/constants.dart';
import '../../../../utilities/text_styles.dart';
import '../../../../utilities/util.dart';
import '../../../../wallets/isar/providers/wallet_info_provider.dart';
import '../../../../wallets/wallet/impl/epiccash_wallet.dart';
import '../../../../wallets/wallet/intermediate/cryptonote_wallet.dart';
import '../../../../wallets/wallet/supporting/epiccash_wallet_info_extension.dart';
import '../../../../widgets/background.dart';
import '../../../../widgets/conditional_parent.dart';
import '../../../../widgets/custom_buttons/app_bar_icon_button.dart';
Expand Down Expand Up @@ -48,13 +50,19 @@ class _EditRefreshHeightViewState extends ConsumerState<EditRefreshHeightView> {
try {
final newHeight = int.tryParse(_controller.text);
if (newHeight != null && newHeight >= 0) {
await ref
.read(pWalletInfo(widget.walletId))
.updateRestoreHeight(
newRestoreHeight: newHeight,
isar: ref.read(mainDBProvider).isar,
);
final wallet = ref.read(pWallets).getWallet(widget.walletId);

if (wallet is EpiccashWallet) {
await wallet.updateRestoreHeight(newHeight);
} else {
await ref
.read(pWalletInfo(widget.walletId))
.updateRestoreHeight(
newRestoreHeight: newHeight,
isar: ref.read(mainDBProvider).isar,
);
}

if (wallet is CryptonoteWallet && wallet.wallet != null) {
wallet.setRefreshFromBlockHeight(newHeight);
}
Expand Down Expand Up @@ -95,7 +103,13 @@ class _EditRefreshHeightViewState extends ConsumerState<EditRefreshHeightView> {
super.initState();
_controller = TextEditingController();
final wallet = ref.read(pWallets).getWallet(widget.walletId);
if (wallet is CryptonoteWallet && wallet.wallet != null) {
if (wallet is EpiccashWallet) {
_controller.text = ref
.read(pWalletInfo(widget.walletId))
.epicData!
.restoreHeight
.toString();
} else if (wallet is CryptonoteWallet && wallet.wallet != null) {
_controller.text = wallet.getRefreshFromBlockHeight().toString();
} else {
_controller.text = ref
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import '../../../../utilities/text_styles.dart';
import '../../../../wallets/isar/models/wallet_info.dart';
import '../../../../wallets/isar/providers/wallet_info_provider.dart';
import '../../../../wallets/wallet/impl/bitcoin_wallet.dart';
import '../../../../wallets/wallet/impl/epiccash_wallet.dart';
import '../../../../wallets/wallet/intermediate/cryptonote_wallet.dart';
import '../../../../wallets/wallet/wallet_mixin_interfaces/multi_address_interface.dart';
import '../../../../wallets/wallet/wallet_mixin_interfaces/mweb_interface.dart';
Expand Down Expand Up @@ -591,8 +592,9 @@ class _WalletSettingsWalletSettingsViewState
),
),
),
if (wallet is CryptonoteWallet) const SizedBox(height: 8),
if (wallet is CryptonoteWallet)
if (wallet is CryptonoteWallet || wallet is EpiccashWallet)
const SizedBox(height: 8),
if (wallet is CryptonoteWallet || wallet is EpiccashWallet)
RoundedWhiteContainer(
padding: const EdgeInsets.all(0),
child: RawMaterialButton(
Expand Down
Loading
Loading