From f95fd551d9120d0046756967823148cb24bcc0c8 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 22 Dec 2022 13:41:57 -0600 Subject: [PATCH 01/54] test windows build plugin versions --- crypto_plugins/flutter_libepiccash | 2 +- crypto_plugins/flutter_liblelantus | 2 +- crypto_plugins/flutter_libmonero | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index 9a150d8cd..1a66908b9 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit 9a150d8cd2c3625424b0059e6b7306f3659fdbe0 +Subproject commit 1a66908b94bde483a39d3bca042a214d65439fe5 diff --git a/crypto_plugins/flutter_liblelantus b/crypto_plugins/flutter_liblelantus index db928e6f1..877b549da 160000 --- a/crypto_plugins/flutter_liblelantus +++ b/crypto_plugins/flutter_liblelantus @@ -1 +1 @@ -Subproject commit db928e6f11844138ce87de2b8c1abe3305ec589e +Subproject commit 877b549dafb9eb243e27748cb8db5fa4c0f7b306 diff --git a/crypto_plugins/flutter_libmonero b/crypto_plugins/flutter_libmonero index de29931da..6ac15028f 160000 --- a/crypto_plugins/flutter_libmonero +++ b/crypto_plugins/flutter_libmonero @@ -1 +1 @@ -Subproject commit de29931dacc9aefaf42a9ca139a8754a42adc40d +Subproject commit 6ac15028f268ecde9a95bdef489574e4c40c37ba From 4b3d50e0dfcf6bfcff97da2515c693b83366d02d Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 22 Dec 2022 14:23:36 -0600 Subject: [PATCH 02/54] missing wow ref stuff --- crypto_plugins/flutter_libmonero | 2 +- pubspec.lock | 45 ++++++++++++++------------------ 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/crypto_plugins/flutter_libmonero b/crypto_plugins/flutter_libmonero index 6ac15028f..1bc6bb483 160000 --- a/crypto_plugins/flutter_libmonero +++ b/crypto_plugins/flutter_libmonero @@ -1 +1 @@ -Subproject commit 6ac15028f268ecde9a95bdef489574e4c40c37ba +Subproject commit 1bc6bb483f65a55a6fc2b6f7bb7a593dae623dbb diff --git a/pubspec.lock b/pubspec.lock index e8f875d35..ecc0bdf8d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -42,7 +42,7 @@ packages: name: archive url: "https://pub.dartlang.org" source: hosted - version: "3.1.11" + version: "3.3.0" args: dependency: transitive description: @@ -63,7 +63,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" barcode_scan2: dependency: "direct main" description: @@ -190,14 +190,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" + version: "1.2.1" checked_yaml: dependency: transitive description: @@ -218,7 +211,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" code_builder: dependency: transitive description: @@ -288,7 +281,7 @@ packages: name: coverage url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.5.0" cross_file: dependency: transitive description: @@ -442,7 +435,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" ffi: dependency: "direct main" description: @@ -871,21 +864,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" mime: dependency: transitive description: @@ -997,7 +990,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" path_drawing: dependency: transitive description: @@ -1373,7 +1366,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -1417,7 +1410,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" string_validator: dependency: "direct main" description: @@ -1431,35 +1424,35 @@ packages: name: sync_http url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.3.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test: dependency: transitive description: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.21.1" + version: "1.21.4" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.9" + version: "0.4.12" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.4.13" + version: "0.4.16" time: dependency: transitive description: @@ -1508,7 +1501,7 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" universal_io: dependency: transitive description: @@ -1592,7 +1585,7 @@ packages: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "8.2.2" + version: "9.0.0" wakelock: dependency: "direct main" description: From 5ce1315394b70e643e030516d24b53e0a4779d27 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 22 Dec 2022 14:38:18 -0600 Subject: [PATCH 03/54] win main refs --- crypto_plugins/flutter_libepiccash | 2 +- crypto_plugins/flutter_liblelantus | 2 +- crypto_plugins/flutter_libmonero | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index 1a66908b9..b72eeaa81 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit 1a66908b94bde483a39d3bca042a214d65439fe5 +Subproject commit b72eeaa81cb852528a6c75f30376c86107c5381f diff --git a/crypto_plugins/flutter_liblelantus b/crypto_plugins/flutter_liblelantus index 877b549da..ab72410a3 160000 --- a/crypto_plugins/flutter_liblelantus +++ b/crypto_plugins/flutter_liblelantus @@ -1 +1 @@ -Subproject commit 877b549dafb9eb243e27748cb8db5fa4c0f7b306 +Subproject commit ab72410a3dc7657c3c1c2bdfec6f649ee13ab79c diff --git a/crypto_plugins/flutter_libmonero b/crypto_plugins/flutter_libmonero index 1bc6bb483..fd16a5e8a 160000 --- a/crypto_plugins/flutter_libmonero +++ b/crypto_plugins/flutter_libmonero @@ -1 +1 @@ -Subproject commit 1bc6bb483f65a55a6fc2b6f7bb7a593dae623dbb +Subproject commit fd16a5e8a15ce3706b3706858dd01b280b66ab52 From e4dd7710cc17b2b3a56b3cc3d6bce22616841eeb Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 22 Dec 2022 15:12:00 -0600 Subject: [PATCH 04/54] update dll load refs for epic and firo --- crypto_plugins/flutter_libepiccash | 2 +- crypto_plugins/flutter_liblelantus | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index b72eeaa81..0309140a9 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit b72eeaa81cb852528a6c75f30376c86107c5381f +Subproject commit 0309140a95a51388df0effcc39ff0a25b2752b29 diff --git a/crypto_plugins/flutter_liblelantus b/crypto_plugins/flutter_liblelantus index ab72410a3..6864d7c0d 160000 --- a/crypto_plugins/flutter_liblelantus +++ b/crypto_plugins/flutter_liblelantus @@ -1 +1 @@ -Subproject commit ab72410a3dc7657c3c1c2bdfec6f649ee13ab79c +Subproject commit 6864d7c0d4fa68c371e3f0c067afd50b0d59cc9b From b0fb3746476d0b88205b075ff88affa57b1a07f5 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 22 Dec 2022 15:22:50 -0600 Subject: [PATCH 05/54] xmr ref update to load dll --- crypto_plugins/flutter_libmonero | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libmonero b/crypto_plugins/flutter_libmonero index fd16a5e8a..06995145f 160000 --- a/crypto_plugins/flutter_libmonero +++ b/crypto_plugins/flutter_libmonero @@ -1 +1 @@ -Subproject commit fd16a5e8a15ce3706b3706858dd01b280b66ab52 +Subproject commit 06995145f23168b0d28f7f2c63056da71aad9177 From d3cc147202ef3b326cfd474c78a5c1a96f9e31ee Mon Sep 17 00:00:00 2001 From: sneurlax Date: Thu, 22 Dec 2022 15:43:50 -0600 Subject: [PATCH 06/54] add windows cross-compilation script --- scripts/windows/build_all.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 scripts/windows/build_all.sh diff --git a/scripts/windows/build_all.sh b/scripts/windows/build_all.sh new file mode 100755 index 000000000..d890ed70a --- /dev/null +++ b/scripts/windows/build_all.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +mkdir -p build +(cd ../../crypto_plugins/flutter_libepiccash/scripts/windows && ./build_all.sh ) & +(cd ../../crypto_plugins/flutter_liblelantus/scripts/windows && ./build_all.sh ) & +(cd ../../crypto_plugins/flutter_libmonero/scripts/windows && ./build_all.sh) & + +wait +echo "Done building" From 6740d9f01fe90c0b0af1a662e030dbffd332cff4 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Thu, 22 Dec 2022 16:22:26 -0600 Subject: [PATCH 07/54] don't automatically build android plugins at end of setup add comment --- scripts/setup.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index d9c716546..3b30a4694 100644 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -41,11 +41,7 @@ sudo apt-get install -y unzip automake build-essential file pkg-config git pytho sudo apt install -y libc6-dev-i386 +# Install Rust curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y cargo install cargo-ndk rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android - -# build stack wallet plugins -cd $STACK_WALLET -cd scripts/android -./build_all.sh From 1f51602406a9564c7143c93fabdb1abe2d963ae2 Mon Sep 17 00:00:00 2001 From: shillo Date: Thu, 22 Dec 2022 16:57:52 -0600 Subject: [PATCH 08/54] windows app dir --- lib/utilities/stack_file_system.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/utilities/stack_file_system.dart b/lib/utilities/stack_file_system.dart index 5177f1973..34d82f691 100644 --- a/lib/utilities/stack_file_system.dart +++ b/lib/utilities/stack_file_system.dart @@ -15,8 +15,7 @@ abstract class StackFileSystem { } else if (Platform.isLinux) { appDirectory = Directory("${Platform.environment['HOME']}/.stackwallet"); } else if (Platform.isWindows) { - // TODO: windows root .stackwallet dir location - throw Exception("Unsupported platform"); + appDirectory = await getApplicationSupportDirectory(); } else if (Platform.isMacOS) { // currently run in ipad mode?? throw Exception("Unsupported platform"); From 951cc044cb78f2b6164bb0a10ab996e5ff259ed2 Mon Sep 17 00:00:00 2001 From: shillo Date: Thu, 22 Dec 2022 16:58:21 -0600 Subject: [PATCH 09/54] temp disable git versions --- .../global_settings_view/about_view.dart | 12 ++++++------ .../advanced_views/debug_view.dart | 15 ++++++--------- .../settings_menu/desktop_about_view.dart | 12 ++++++------ 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/lib/pages/settings_views/global_settings_view/about_view.dart b/lib/pages/settings_views/global_settings_view/about_view.dart index a1e78ba7d..ac530a713 100644 --- a/lib/pages/settings_views/global_settings_view/about_view.dart +++ b/lib/pages/settings_views/global_settings_view/about_view.dart @@ -2,11 +2,11 @@ import 'dart:convert'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; -import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; +// import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; +// import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:http/http.dart'; -import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; +// import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; import 'package:package_info_plus/package_info_plus.dart'; import 'package:stackwallet/utilities/logger.dart'; import 'package:stackwallet/utilities/text_styles.dart'; @@ -98,9 +98,9 @@ class AboutView extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - String firoCommit = FIRO_VERSIONS.getPluginVersion(); - String epicCashCommit = EPIC_VERSIONS.getPluginVersion(); - String moneroCommit = MONERO_VERSIONS.getPluginVersion(); + String firoCommit = "lololololo"; //FIRO_VERSIONS.getPluginVersion(); + String epicCashCommit ="lololololo"; // EPIC_VERSIONS.getPluginVersion(); + String moneroCommit ="lololololo"; // MONERO_VERSIONS.getPluginVersion(); List futureFiroList = [ doesCommitExist("cypherstack", "flutter_liblelantus", firoCommit), isHeadCommit("cypherstack", "flutter_liblelantus", "main", firoCommit), diff --git a/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart b/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart index 33f21759e..e3a8f0eb6 100644 --- a/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart +++ b/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart @@ -7,11 +7,11 @@ import 'package:event_bus/event_bus.dart'; import 'package:file_picker/file_picker.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; -import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; +// import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; +// import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; +// import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; import 'package:package_info_plus/package_info_plus.dart'; import 'package:stackwallet/models/isar/models/log.dart'; import 'package:stackwallet/notifications/show_flush_bar.dart'; @@ -294,12 +294,9 @@ class _DebugViewState extends ConsumerState { final signature = packageInfo.buildSignature; final appName = packageInfo.appName; - String firoCommit = - FIRO_VERSIONS.getPluginVersion(); - String epicCashCommit = - EPIC_VERSIONS.getPluginVersion(); - String moneroCommit = - MONERO_VERSIONS.getPluginVersion(); + String firoCommit ="lololololo"; //FIRO_VERSIONS.getPluginVersion(); + String epicCashCommit ="lololololo"; //EPIC_VERSIONS.getPluginVersion(); + String moneroCommit ="lololololo"; // MONERO_VERSIONS.getPluginVersion(); DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin(); final deviceInfo = diff --git a/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart b/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart index 18988cb68..99cfe1cc6 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart @@ -2,11 +2,11 @@ import 'dart:convert'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; -import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; +// import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; +// import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:http/http.dart'; -import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; +// import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; import 'package:package_info_plus/package_info_plus.dart'; import 'package:stackwallet/utilities/logger.dart'; import 'package:stackwallet/utilities/text_styles.dart'; @@ -98,9 +98,9 @@ class DesktopAboutView extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - String firoCommit = FIRO_VERSIONS.getPluginVersion(); - String epicCashCommit = EPIC_VERSIONS.getPluginVersion(); - String moneroCommit = MONERO_VERSIONS.getPluginVersion(); + String firoCommit ="lololololo"; // FIRO_VERSIONS.getPluginVersion(); + String epicCashCommit ="lololololo"; // EPIC_VERSIONS.getPluginVersion(); + String moneroCommit = "lololololo"; //MONERO_VERSIONS.getPluginVersion(); List futureFiroList = [ doesCommitExist("cypherstack", "flutter_liblelantus", firoCommit), isHeadCommit("cypherstack", "flutter_liblelantus", "main", firoCommit), From e5d2d6c039179a1d8cf4147ddff2b15ba93d5893 Mon Sep 17 00:00:00 2001 From: shillo Date: Thu, 22 Dec 2022 16:58:38 -0600 Subject: [PATCH 10/54] temp disable xmr/wow onstart funcs --- lib/main.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 4303889b7..4507bc887 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -176,8 +176,8 @@ void main() async { } } - monero.onStartup(); - wownero.onStartup(); + // wownero.onStartup(); + // monero.onStartup(); await Hive.openBox(DB.boxNameTheme); From ee74a2be04a21e81693562699bb3b4a777257b5e Mon Sep 17 00:00:00 2001 From: shillo Date: Thu, 22 Dec 2022 16:58:55 -0600 Subject: [PATCH 11/54] app name changes --- macos/Runner.xcodeproj/project.pbxproj | 6 +-- .../xcshareddata/xcschemes/Runner.xcscheme | 8 ++-- macos/Runner/Configs/AppInfo.xcconfig | 4 +- pubspec.lock | 45 +++++++++++-------- windows/runner/Runner.rc | 8 ++-- 5 files changed, 39 insertions(+), 32 deletions(-) diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 6cc16a184..6506a5075 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -55,7 +55,7 @@ /* Begin PBXFileReference section */ 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* firo_wallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = firo_wallet.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10ED2044A3C60003C045 /* Stack Wallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Stack Wallet.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; @@ -112,7 +112,7 @@ 33CC10EE2044A3C60003C045 /* Products */ = { isa = PBXGroup; children = ( - 33CC10ED2044A3C60003C045 /* firo_wallet.app */, + 33CC10ED2044A3C60003C045 /* Stack Wallet.app */, ); name = Products; sourceTree = ""; @@ -193,7 +193,7 @@ ); name = Runner; productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* firo_wallet.app */; + productReference = 33CC10ED2044A3C60003C045 /* Stack Wallet.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 9c847111c..c9216c9be 100644 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -15,7 +15,7 @@ @@ -31,7 +31,7 @@ @@ -54,7 +54,7 @@ @@ -71,7 +71,7 @@ diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig index b68859075..6889aa0a7 100644 --- a/macos/Runner/Configs/AppInfo.xcconfig +++ b/macos/Runner/Configs/AppInfo.xcconfig @@ -5,10 +5,10 @@ // 'flutter create' template. // The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = firo_wallet +PRODUCT_NAME = Stack Wallet // The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.firoWallet +PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.stack_wallet // The copyright displayed in application information PRODUCT_COPYRIGHT = Copyright © 2022 com.cypherstack. All rights reserved. diff --git a/pubspec.lock b/pubspec.lock index ecc0bdf8d..e8f875d35 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -42,7 +42,7 @@ packages: name: archive url: "https://pub.dartlang.org" source: hosted - version: "3.3.0" + version: "3.1.11" args: dependency: transitive description: @@ -63,7 +63,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.9.0" + version: "2.8.2" barcode_scan2: dependency: "direct main" description: @@ -190,7 +190,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "1.2.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" checked_yaml: dependency: transitive description: @@ -211,7 +218,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.1" + version: "1.1.0" code_builder: dependency: transitive description: @@ -281,7 +288,7 @@ packages: name: coverage url: "https://pub.dartlang.org" source: hosted - version: "1.5.0" + version: "1.2.0" cross_file: dependency: transitive description: @@ -435,7 +442,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.1" + version: "1.3.0" ffi: dependency: "direct main" description: @@ -864,21 +871,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.12" + version: "0.12.11" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.5" + version: "0.1.4" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.7.0" mime: dependency: transitive description: @@ -990,7 +997,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.8.1" path_drawing: dependency: transitive description: @@ -1366,7 +1373,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.9.0" + version: "1.8.2" stack_trace: dependency: transitive description: @@ -1410,7 +1417,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.1" + version: "1.1.0" string_validator: dependency: "direct main" description: @@ -1424,35 +1431,35 @@ packages: name: sync_http url: "https://pub.dartlang.org" source: hosted - version: "0.3.1" + version: "0.3.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "1.2.0" test: dependency: transitive description: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.21.4" + version: "1.21.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.12" + version: "0.4.9" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.4.16" + version: "0.4.13" time: dependency: transitive description: @@ -1501,7 +1508,7 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.1" + version: "1.3.0" universal_io: dependency: transitive description: @@ -1585,7 +1592,7 @@ packages: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "9.0.0" + version: "8.2.2" wakelock: dependency: "direct main" description: diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc index 871652d68..5fa3067e5 100644 --- a/windows/runner/Runner.rc +++ b/windows/runner/Runner.rc @@ -90,12 +90,12 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "com.cypherstack" "\0" - VALUE "FileDescription", "firo_wallet" "\0" + VALUE "FileDescription", "Stack Wallet" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "firo_wallet" "\0" + VALUE "InternalName", "Stack Wallet" "\0" VALUE "LegalCopyright", "Copyright (C) 2022 com.cypherstack. All rights reserved." "\0" - VALUE "OriginalFilename", "firo_wallet.exe" "\0" - VALUE "ProductName", "firo_wallet" "\0" + VALUE "OriginalFilename", "Stack Wallet.exe" "\0" + VALUE "ProductName", "Stack Wallet" "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0" END END From b1b19653488e0656d8dec97338a257b92201f3a1 Mon Sep 17 00:00:00 2001 From: shillo Date: Thu, 22 Dec 2022 17:24:12 -0600 Subject: [PATCH 12/54] disable unsupported device locale on windows --- lib/services/coins/bitcoin/bitcoin_wallet.dart | 2 +- .../coins/bitcoincash/bitcoincash_wallet.dart | 2 +- lib/services/coins/dogecoin/dogecoin_wallet.dart | 2 +- lib/services/coins/firo/firo_wallet.dart | 12 ++++++------ lib/services/coins/litecoin/litecoin_wallet.dart | 2 +- lib/services/coins/namecoin/namecoin_wallet.dart | 2 +- lib/services/coins/particl/particl_wallet.dart | 2 +- lib/services/locale_service.dart | 3 ++- 8 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/services/coins/bitcoin/bitcoin_wallet.dart b/lib/services/coins/bitcoin/bitcoin_wallet.dart index 059b73b7d..1ed87681b 100644 --- a/lib/services/coins/bitcoin/bitcoin_wallet.dart +++ b/lib/services/coins/bitcoin/bitcoin_wallet.dart @@ -1297,7 +1297,7 @@ class BitcoinWallet extends CoinServiceAPI { final priceData = await _priceAPI.getPricesAnd24hChange(baseCurrency: _prefs.currency); Decimal currentPrice = priceData[coin]?.item1 ?? Decimal.zero; - final locale = await Devicelocale.currentLocale; + final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale; final String worthNow = Format.localizedStringAsFixed( value: ((currentPrice * Decimal.fromInt(txData["recipientAmt"] as int)) / diff --git a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart index c5c3f22b1..d84bce65c 100644 --- a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart +++ b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart @@ -1174,7 +1174,7 @@ class BitcoinCashWallet extends CoinServiceAPI { final priceData = await _priceAPI.getPricesAnd24hChange(baseCurrency: _prefs.currency); Decimal currentPrice = priceData[coin]?.item1 ?? Decimal.zero; - final locale = await Devicelocale.currentLocale; + final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale; final String worthNow = Format.localizedStringAsFixed( value: ((currentPrice * Decimal.fromInt(txData["recipientAmt"] as int)) / diff --git a/lib/services/coins/dogecoin/dogecoin_wallet.dart b/lib/services/coins/dogecoin/dogecoin_wallet.dart index e477dfc78..5b0da3fb3 100644 --- a/lib/services/coins/dogecoin/dogecoin_wallet.dart +++ b/lib/services/coins/dogecoin/dogecoin_wallet.dart @@ -1064,7 +1064,7 @@ class DogecoinWallet extends CoinServiceAPI { final priceData = await _priceAPI.getPricesAnd24hChange(baseCurrency: _prefs.currency); Decimal currentPrice = priceData[coin]?.item1 ?? Decimal.zero; - final locale = await Devicelocale.currentLocale; + final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale; final String worthNow = Format.localizedStringAsFixed( value: ((currentPrice * Decimal.fromInt(txData["recipientAmt"] as int)) / diff --git a/lib/services/coins/firo/firo_wallet.dart b/lib/services/coins/firo/firo_wallet.dart index bfddf2560..5d29bd0a9 100644 --- a/lib/services/coins/firo/firo_wallet.dart +++ b/lib/services/coins/firo/firo_wallet.dart @@ -883,7 +883,7 @@ class FiroWallet extends CoinServiceAPI { @override Future updateSentCachedTxData(Map txData) async { final currentPrice = await firoPrice; - final locale = await Devicelocale.currentLocale; + final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale; final String worthNow = Format.localizedStringAsFixed( value: ((currentPrice * Decimal.fromInt(txData["recipientAmt"] as int)) / @@ -2756,7 +2756,7 @@ class FiroWallet extends CoinServiceAPI { var price = await firoPrice; var builtHex = txb.build(); // return builtHex; - final locale = await Devicelocale.currentLocale; + final locale =Platform.isWindows ? "en_US" : await Devicelocale.currentLocale; return { "transaction": builtHex, "txid": txId, @@ -2810,7 +2810,7 @@ class FiroWallet extends CoinServiceAPI { final currentPrice = await firoPrice; // Grab the most recent information on all the joinsplits - final locale = await Devicelocale.currentLocale; + final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale; final updatedJSplit = await getJMintTransactions(cachedElectrumXClient, joinsplits, _prefs.currency, coin, currentPrice, locale!); @@ -3249,7 +3249,7 @@ class FiroWallet extends CoinServiceAPI { final currentPrice = await firoPrice; final List> midSortedArray = []; - final locale = await Devicelocale.currentLocale; + final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale; Logging.instance.log("refresh the txs", level: LogLevel.Info); for (final txObject in allTransactions) { @@ -4324,7 +4324,7 @@ class FiroWallet extends CoinServiceAPI { currency, coin, currentPrice, - (await Devicelocale.currentLocale)!); + (Platform.isWindows ? "en_US" : await Devicelocale.currentLocale)!); Logging.instance.log(spendTxs, level: LogLevel.Info); for (var element in spendTxs) { transactionMap[element.txid] = element; @@ -4375,7 +4375,7 @@ class FiroWallet extends CoinServiceAPI { final lelantusEntry = await _getLelantusEntry(); final anonymitySets = await fetchAnonymitySets(); final locktime = await getBlockHead(electrumXClient); - final locale = await Devicelocale.currentLocale; + final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale; ReceivePort receivePort = await getIsolate({ "function": "createJoinSplit", diff --git a/lib/services/coins/litecoin/litecoin_wallet.dart b/lib/services/coins/litecoin/litecoin_wallet.dart index 7f3be9ea1..269f59610 100644 --- a/lib/services/coins/litecoin/litecoin_wallet.dart +++ b/lib/services/coins/litecoin/litecoin_wallet.dart @@ -1299,7 +1299,7 @@ class LitecoinWallet extends CoinServiceAPI { final priceData = await _priceAPI.getPricesAnd24hChange(baseCurrency: _prefs.currency); Decimal currentPrice = priceData[coin]?.item1 ?? Decimal.zero; - final locale = await Devicelocale.currentLocale; + final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale; final String worthNow = Format.localizedStringAsFixed( value: ((currentPrice * Decimal.fromInt(txData["recipientAmt"] as int)) / diff --git a/lib/services/coins/namecoin/namecoin_wallet.dart b/lib/services/coins/namecoin/namecoin_wallet.dart index 72ba2e450..85fea61ad 100644 --- a/lib/services/coins/namecoin/namecoin_wallet.dart +++ b/lib/services/coins/namecoin/namecoin_wallet.dart @@ -1287,7 +1287,7 @@ class NamecoinWallet extends CoinServiceAPI { final priceData = await _priceAPI.getPricesAnd24hChange(baseCurrency: _prefs.currency); Decimal currentPrice = priceData[coin]?.item1 ?? Decimal.zero; - final locale = await Devicelocale.currentLocale; + final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale; final String worthNow = Format.localizedStringAsFixed( value: ((currentPrice * Decimal.fromInt(txData["recipientAmt"] as int)) / diff --git a/lib/services/coins/particl/particl_wallet.dart b/lib/services/coins/particl/particl_wallet.dart index 0249fb205..396f6db88 100644 --- a/lib/services/coins/particl/particl_wallet.dart +++ b/lib/services/coins/particl/particl_wallet.dart @@ -1200,7 +1200,7 @@ class ParticlWallet extends CoinServiceAPI { final priceData = await _priceAPI.getPricesAnd24hChange(baseCurrency: _prefs.currency); Decimal currentPrice = priceData[coin]?.item1 ?? Decimal.zero; - final locale = await Devicelocale.currentLocale; + final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale; final String worthNow = Format.localizedStringAsFixed( value: ((currentPrice * Decimal.fromInt(txData["recipientAmt"] as int)) / diff --git a/lib/services/locale_service.dart b/lib/services/locale_service.dart index 9ed504cf9..e91f5a1c6 100644 --- a/lib/services/locale_service.dart +++ b/lib/services/locale_service.dart @@ -1,3 +1,4 @@ +import 'dart:io'; import 'package:devicelocale/devicelocale.dart'; import 'package:flutter/material.dart'; @@ -7,7 +8,7 @@ class LocaleService extends ChangeNotifier { String get locale => _locale; Future loadLocale({bool notify = true}) async { - _locale = await Devicelocale.currentLocale ?? "en_US"; + _locale =Platform.isWindows ? "en_US" : await Devicelocale.currentLocale ?? "en_US"; if (notify) { notifyListeners(); } From 530bbc90b9b006d550546096875b3c5b1d2e50a9 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Thu, 22 Dec 2022 17:24:16 -0600 Subject: [PATCH 13/54] install crypto DLLs --- windows/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 3ed364885..1f0fc15d5 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -80,6 +80,18 @@ install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR} install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../crypto_plugins/flutter_libepiccash/scripts/windows/build/libepic_cash_wallet.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../../crypto_plugins/flutter_liblelantus/scripts/windows/build/libmobileliblelantus.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../../crypto_plugins/flutter_libmonero/scripts/windows/build/libcw_monero.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../../crypto_plugins/flutter_libmonero/scripts/windows/build/libcw_wownero.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + if(PLUGIN_BUNDLED_LIBRARIES) install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" From 28a5e3921e065383bd95421d06419519638b51cf Mon Sep 17 00:00:00 2001 From: sneurlax Date: Thu, 22 Dec 2022 17:24:16 -0600 Subject: [PATCH 14/54] Revert "install crypto DLLs" This reverts commit 530bbc90b9b006d550546096875b3c5b1d2e50a9. So sorry. --- windows/CMakeLists.txt | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 1f0fc15d5..3ed364885 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -80,18 +80,6 @@ install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR} install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../crypto_plugins/flutter_libepiccash/scripts/windows/build/libepic_cash_wallet.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../../crypto_plugins/flutter_liblelantus/scripts/windows/build/libmobileliblelantus.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../../crypto_plugins/flutter_libmonero/scripts/windows/build/libcw_monero.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../../crypto_plugins/flutter_libmonero/scripts/windows/build/libcw_wownero.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - if(PLUGIN_BUNDLED_LIBRARIES) install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" From dfa16aad4c478b1eaeaeec5bbe44250fbecfc728 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 23 Dec 2022 10:53:38 -0600 Subject: [PATCH 15/54] re enable wow/xmr on_startup --- lib/main.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 4507bc887..0acca2a3c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -176,8 +176,8 @@ void main() async { } } - // wownero.onStartup(); - // monero.onStartup(); + wownero.onStartup(); + monero.onStartup(); await Hive.openBox(DB.boxNameTheme); From bf04505d4030a7e49175159abe0af6a9552296a1 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 23 Dec 2022 12:13:51 -0600 Subject: [PATCH 16/54] update windows DLL annotations and wallets path for windows --- crypto_plugins/flutter_libmonero | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libmonero b/crypto_plugins/flutter_libmonero index 06995145f..061eda1d9 160000 --- a/crypto_plugins/flutter_libmonero +++ b/crypto_plugins/flutter_libmonero @@ -1 +1 @@ -Subproject commit 06995145f23168b0d28f7f2c63056da71aad9177 +Subproject commit 061eda1d9e93f8fc2fcdc3c6b970815350ec00dc From c6dd9394be19f2487ea833bf3283a38b40300b98 Mon Sep 17 00:00:00 2001 From: shillo Date: Fri, 23 Dec 2022 13:29:03 -0600 Subject: [PATCH 17/54] fix exit button on windows --- lib/pages_desktop_specific/desktop_menu.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/pages_desktop_specific/desktop_menu.dart b/lib/pages_desktop_specific/desktop_menu.dart index 96b4e6638..220fa26ab 100644 --- a/lib/pages_desktop_specific/desktop_menu.dart +++ b/lib/pages_desktop_specific/desktop_menu.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -219,7 +221,11 @@ class _DesktopMenuState extends ConsumerState { onChanged: (_) { // todo: save stuff/ notify before exit? // exit(0); - SystemNavigator.pop(); + if (Platform.isWindows) { + exit(0); + } else { + SystemNavigator.pop(); + } }, controller: controllers[7], ), From f85d2895fc05db2c66035cb51f674323e83ae45f Mon Sep 17 00:00:00 2001 From: shillo Date: Fri, 23 Dec 2022 14:21:37 -0600 Subject: [PATCH 18/54] windows reset password DPS error fix --- .../password/delete_password_warning_view.dart | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/pages_desktop_specific/password/delete_password_warning_view.dart b/lib/pages_desktop_specific/password/delete_password_warning_view.dart index 54db989fd..dc2322f05 100644 --- a/lib/pages_desktop_specific/password/delete_password_warning_view.dart +++ b/lib/pages_desktop_specific/password/delete_password_warning_view.dart @@ -5,6 +5,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; import 'package:hive/hive.dart'; +import 'package:isar/isar.dart'; import 'package:stackwallet/hive/db.dart'; import 'package:stackwallet/notifications/show_flush_bar.dart'; import 'package:stackwallet/pages/intro_view.dart'; @@ -42,7 +43,21 @@ class _ForgotPasswordDesktopViewState try { await Hive.close(); - if (Platform.isWindows || Platform.isLinux) { + if (Platform.isWindows) { + final xmrDir = Directory("${appRoot.path}/wallets"); + if (xmrDir.existsSync()) { + await xmrDir.delete(recursive: true); + } + final epicDir = Directory("${appRoot.path}/epiccash"); + if (epicDir.existsSync()) { + await epicDir.delete(recursive: true); + } + + await Isar.getInstance("desktopStore")?.close(deleteFromDisk: true); + + await (await StackFileSystem.applicationHiveDirectory()) + .delete(recursive: true); + } else if (Platform.isLinux) { await appRoot.delete(recursive: true); } else { // macos in ipad mode From 9949b8788b7b18843bf55a1442761dab65705663 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 19 May 2023 13:32:49 -0600 Subject: [PATCH 19/54] fix: missing import from merge --- .../password/delete_password_warning_view.dart | 1 + lib/utilities/stack_file_system.dart | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pages_desktop_specific/password/delete_password_warning_view.dart b/lib/pages_desktop_specific/password/delete_password_warning_view.dart index 74e2aca19..8d322ba33 100644 --- a/lib/pages_desktop_specific/password/delete_password_warning_view.dart +++ b/lib/pages_desktop_specific/password/delete_password_warning_view.dart @@ -5,6 +5,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; import 'package:hive/hive.dart'; +import 'package:isar/isar.dart'; import 'package:stackwallet/db/hive/db.dart'; import 'package:stackwallet/notifications/show_flush_bar.dart'; import 'package:stackwallet/pages/intro_view.dart'; diff --git a/lib/utilities/stack_file_system.dart b/lib/utilities/stack_file_system.dart index b3821db11..77ecab511 100644 --- a/lib/utilities/stack_file_system.dart +++ b/lib/utilities/stack_file_system.dart @@ -15,7 +15,7 @@ abstract class StackFileSystem { } else if (Platform.isLinux) { appDirectory = Directory("${Platform.environment['HOME']}/.stackwallet"); } else if (Platform.isWindows) { - appDirectory = await getApplicationSupportDirectory(); + appDirectory = await getApplicationSupportDirectory(); } else if (Platform.isMacOS) { // currently run in ipad mode?? throw Exception("Unsupported platform"); From b7bb62653e3ad711bab0e45e9163472d40adc7a5 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 19 May 2023 13:33:51 -0600 Subject: [PATCH 20/54] no wow/xmr startup on windows --- lib/main.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 06167255a..fd7be5f7c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -178,8 +178,10 @@ void main() async { } } - wownero.onStartup(); - monero.onStartup(); + if (!Platform.isWindows) { + wownero.onStartup(); + monero.onStartup(); + } // SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, // overlays: [SystemUiOverlay.bottom]); From 5acf74e26022905bcc8719ee696f51e914818009 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 19 May 2023 13:42:11 -0600 Subject: [PATCH 21/54] fix: assets display --- lib/pages_desktop_specific/desktop_menu_item.dart | 4 ++-- lib/utilities/assets.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pages_desktop_specific/desktop_menu_item.dart b/lib/pages_desktop_specific/desktop_menu_item.dart index 10c2ad25d..a194c87b2 100644 --- a/lib/pages_desktop_specific/desktop_menu_item.dart +++ b/lib/pages_desktop_specific/desktop_menu_item.dart @@ -63,8 +63,8 @@ class DesktopBuyIcon extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - return SvgPicture.asset( - ref.watch(themeProvider.select((value) => value.assets.buy)), + return SvgPicture.file( + File(ref.watch(themeAssetsProvider).buy), width: 20, height: 20, color: DesktopMenuItemId.buy == diff --git a/lib/utilities/assets.dart b/lib/utilities/assets.dart index 2a0909966..9623006e0 100644 --- a/lib/utilities/assets.dart +++ b/lib/utilities/assets.dart @@ -193,7 +193,7 @@ class _SVG { String get exchange3 => "assets/svg/exchange-3.svg"; String get messageQuestion => "assets/svg/message-question-1.svg"; String get list => "assets/svg/list-ul.svg"; - String get unclaimedPaynym => "assets/svg/unclaimed.png"; + String get unclaimedPaynym => "assets/svg/unclaimed.svg"; String get trocadorRatingA => "assets/svg/trocador_rating_a.svg"; String get trocadorRatingB => "assets/svg/trocador_rating_b.svg"; From 8540bd36facfbee156ad2ffe23ba08815ccb9625 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 19 May 2023 14:05:58 -0600 Subject: [PATCH 22/54] default to 12 word seeds for new wallets --- lib/services/coins/bitcoin/bitcoin_wallet.dart | 2 +- lib/services/coins/bitcoincash/bitcoincash_wallet.dart | 2 +- lib/services/coins/dogecoin/dogecoin_wallet.dart | 2 +- lib/services/coins/ecash/ecash_wallet.dart | 2 +- lib/services/coins/ethereum/ethereum_wallet.dart | 2 +- lib/services/coins/firo/firo_wallet.dart | 2 +- lib/services/coins/litecoin/litecoin_wallet.dart | 2 +- lib/services/coins/namecoin/namecoin_wallet.dart | 2 +- lib/services/coins/particl/particl_wallet.dart | 2 +- lib/utilities/constants.dart | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/services/coins/bitcoin/bitcoin_wallet.dart b/lib/services/coins/bitcoin/bitcoin_wallet.dart index cfa3b73cf..3fc44e177 100644 --- a/lib/services/coins/bitcoin/bitcoin_wallet.dart +++ b/lib/services/coins/bitcoin/bitcoin_wallet.dart @@ -1468,7 +1468,7 @@ class BitcoinWallet extends CoinServiceAPI } await _secureStore.write( key: '${_walletId}_mnemonic', - value: bip39.generateMnemonic(strength: 256)); + value: bip39.generateMnemonic(strength: 128)); await _secureStore.write(key: '${_walletId}_mnemonicPassphrase', value: ""); // Generate and add addresses to relevant arrays diff --git a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart index e5117d08b..85c00d3ac 100644 --- a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart +++ b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart @@ -1371,7 +1371,7 @@ class BitcoinCashWallet extends CoinServiceAPI } await _secureStore.write( key: '${_walletId}_mnemonic', - value: bip39.generateMnemonic(strength: 256)); + value: bip39.generateMnemonic(strength: 128)); await _secureStore.write(key: '${_walletId}_mnemonicPassphrase', value: ""); // Generate and add addresses to relevant arrays diff --git a/lib/services/coins/dogecoin/dogecoin_wallet.dart b/lib/services/coins/dogecoin/dogecoin_wallet.dart index 05170a883..4721cb02a 100644 --- a/lib/services/coins/dogecoin/dogecoin_wallet.dart +++ b/lib/services/coins/dogecoin/dogecoin_wallet.dart @@ -1318,7 +1318,7 @@ class DogecoinWallet extends CoinServiceAPI } await _secureStore.write( key: '${_walletId}_mnemonic', - value: bip39.generateMnemonic(strength: 256)); + value: bip39.generateMnemonic(strength: 128)); await _secureStore.write( key: '${_walletId}_mnemonicPassphrase', value: "", diff --git a/lib/services/coins/ecash/ecash_wallet.dart b/lib/services/coins/ecash/ecash_wallet.dart index 5bed07bc4..f45c23a73 100644 --- a/lib/services/coins/ecash/ecash_wallet.dart +++ b/lib/services/coins/ecash/ecash_wallet.dart @@ -538,7 +538,7 @@ class ECashWallet extends CoinServiceAPI } await _secureStore.write( key: '${_walletId}_mnemonic', - value: bip39.generateMnemonic(strength: 256)); + value: bip39.generateMnemonic(strength: 128)); await _secureStore.write(key: '${_walletId}_mnemonicPassphrase', value: ""); const int startingIndex = 0; diff --git a/lib/services/coins/ethereum/ethereum_wallet.dart b/lib/services/coins/ethereum/ethereum_wallet.dart index 0e933a1c0..2052ead4b 100644 --- a/lib/services/coins/ethereum/ethereum_wallet.dart +++ b/lib/services/coins/ethereum/ethereum_wallet.dart @@ -350,7 +350,7 @@ class EthereumWallet extends CoinServiceAPI with WalletCache, WalletDB { "Attempted to overwrite mnemonic on generate new wallet!"); } - final String mnemonic = bip39.generateMnemonic(strength: 256); + final String mnemonic = bip39.generateMnemonic(strength: 128); await _secureStore.write(key: '${_walletId}_mnemonic', value: mnemonic); await _secureStore.write( key: '${_walletId}_mnemonicPassphrase', diff --git a/lib/services/coins/firo/firo_wallet.dart b/lib/services/coins/firo/firo_wallet.dart index 23e367ca4..53f4ad205 100644 --- a/lib/services/coins/firo/firo_wallet.dart +++ b/lib/services/coins/firo/firo_wallet.dart @@ -2163,7 +2163,7 @@ class FiroWallet extends CoinServiceAPI } await _secureStore.write( key: '${_walletId}_mnemonic', - value: bip39.generateMnemonic(strength: 256)); + value: bip39.generateMnemonic(strength: 128)); await _secureStore.write( key: '${_walletId}_mnemonicPassphrase', value: "", diff --git a/lib/services/coins/litecoin/litecoin_wallet.dart b/lib/services/coins/litecoin/litecoin_wallet.dart index 5e1e8064c..274520f1d 100644 --- a/lib/services/coins/litecoin/litecoin_wallet.dart +++ b/lib/services/coins/litecoin/litecoin_wallet.dart @@ -1498,7 +1498,7 @@ class LitecoinWallet extends CoinServiceAPI } await _secureStore.write( key: '${_walletId}_mnemonic', - value: bip39.generateMnemonic(strength: 256)); + value: bip39.generateMnemonic(strength: 128)); await _secureStore.write( key: '${_walletId}_mnemonicPassphrase', value: "", diff --git a/lib/services/coins/namecoin/namecoin_wallet.dart b/lib/services/coins/namecoin/namecoin_wallet.dart index 19c5a823b..ebb3a9822 100644 --- a/lib/services/coins/namecoin/namecoin_wallet.dart +++ b/lib/services/coins/namecoin/namecoin_wallet.dart @@ -1479,7 +1479,7 @@ class NamecoinWallet extends CoinServiceAPI } await _secureStore.write( key: '${_walletId}_mnemonic', - value: bip39.generateMnemonic(strength: 256)); + value: bip39.generateMnemonic(strength: 128)); await _secureStore.write( key: '${_walletId}_mnemonicPassphrase', value: "", diff --git a/lib/services/coins/particl/particl_wallet.dart b/lib/services/coins/particl/particl_wallet.dart index f16d8a5f2..8eb1b7b28 100644 --- a/lib/services/coins/particl/particl_wallet.dart +++ b/lib/services/coins/particl/particl_wallet.dart @@ -1394,7 +1394,7 @@ class ParticlWallet extends CoinServiceAPI } await _secureStore.write( key: '${_walletId}_mnemonic', - value: bip39.generateMnemonic(strength: 256)); + value: bip39.generateMnemonic(strength: 128)); await _secureStore.write( key: '${_walletId}_mnemonicPassphrase', value: "", diff --git a/lib/utilities/constants.dart b/lib/utilities/constants.dart index bab8f3348..b3295b3c8 100644 --- a/lib/utilities/constants.dart +++ b/lib/utilities/constants.dart @@ -183,7 +183,7 @@ abstract class Constants { } } - static const int seedPhraseWordCountBip39 = 24; + static const int seedPhraseWordCountBip39 = 12; static const int seedPhraseWordCountMonero = 25; static const Map monthMapShort = { From 68fdaeff1367013f1d2404311c89965fef2aed77 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 19 May 2023 14:11:01 -0600 Subject: [PATCH 23/54] fix: paynym unclaimed asset --- lib/pages/paynym/paynym_claim_view.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/pages/paynym/paynym_claim_view.dart b/lib/pages/paynym/paynym_claim_view.dart index c703c581d..efeb33071 100644 --- a/lib/pages/paynym/paynym_claim_view.dart +++ b/lib/pages/paynym/paynym_claim_view.dart @@ -138,10 +138,8 @@ class _PaynymClaimViewState extends ConsumerState { const Spacer( flex: 1, ), - Image( - image: AssetImage( - Assets.svg.unclaimedPaynym, - ), + SvgPicture.asset( + Assets.svg.unclaimedPaynym, width: MediaQuery.of(context).size.width / 2, ), const SizedBox( From 438bfcb39c9dacc33b8e040e78c9e864e89428a1 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 19 May 2023 15:42:53 -0600 Subject: [PATCH 24/54] fix: anonymize more option icon temporarily --- .../more_features/more_features_dialog.dart | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart index e2dbfa015..7d52275d8 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart @@ -143,11 +143,15 @@ class _MoreFeaturesItem extends StatelessWidget { child: Center( child: SvgPicture.asset( iconAsset, - width: iconSize, - height: iconSize, - color: Theme.of(context) - .extension()! - .settingsIconIcon, + width: + iconAsset == Assets.svg.anonymize ? iconSizeBG : iconSize, + height: + iconAsset == Assets.svg.anonymize ? iconSizeBG : iconSize, + color: iconAsset == Assets.svg.anonymize + ? null + : Theme.of(context) + .extension()! + .settingsIconIcon, ), ), ), From e2d7c8ee535377eff261cf5cda709551df46df0f Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 19 May 2023 15:51:47 -0600 Subject: [PATCH 25/54] fix: anonymize more option icon --- assets/svg/anonymize.svg | 83 +++++++++++++++++++ .../more_features/more_features_dialog.dart | 16 ++-- lib/utilities/assets.dart | 1 + pubspec.yaml | 1 + 4 files changed, 91 insertions(+), 10 deletions(-) create mode 100644 assets/svg/anonymize.svg diff --git a/assets/svg/anonymize.svg b/assets/svg/anonymize.svg new file mode 100644 index 000000000..676501302 --- /dev/null +++ b/assets/svg/anonymize.svg @@ -0,0 +1,83 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart index 7d52275d8..1549bf1c9 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart @@ -69,7 +69,7 @@ class _MoreFeaturesDialogState extends ConsumerState { _MoreFeaturesItem( label: "Anonymize funds", detail: "Anonymize funds", - iconAsset: Assets.svg.anonymize, + iconAsset: Assets.svg.recycle, onPressed: () => widget.onAnonymizeAllPressed?.call(), ), if (manager.hasWhirlpoolSupport) @@ -143,15 +143,11 @@ class _MoreFeaturesItem extends StatelessWidget { child: Center( child: SvgPicture.asset( iconAsset, - width: - iconAsset == Assets.svg.anonymize ? iconSizeBG : iconSize, - height: - iconAsset == Assets.svg.anonymize ? iconSizeBG : iconSize, - color: iconAsset == Assets.svg.anonymize - ? null - : Theme.of(context) - .extension()! - .settingsIconIcon, + width: iconSize, + height: iconSize, + color: Theme.of(context) + .extension()! + .settingsIconIcon, ), ), ), diff --git a/lib/utilities/assets.dart b/lib/utilities/assets.dart index 9623006e0..e9ea7ad58 100644 --- a/lib/utilities/assets.dart +++ b/lib/utilities/assets.dart @@ -165,6 +165,7 @@ class _SVG { String get questionMessage => "assets/svg/message-question.svg"; String get envelope => "assets/svg/envelope.svg"; String get share => "assets/svg/share-2.svg"; + String get recycle => "assets/svg/anonymize.svg"; String get anonymize => "assets/svg/tx-icon-anonymize.svg"; String get anonymizePending => "assets/svg/tx-icon-anonymize-pending.svg"; String get anonymizeFailed => "assets/svg/tx-icon-anonymize-failed.svg"; diff --git a/pubspec.yaml b/pubspec.yaml index 9cd249b2f..5fe82a0c8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -288,6 +288,7 @@ flutter: - assets/svg/message-question.svg - assets/svg/envelope.svg - assets/svg/share-2.svg + - assets/svg/anonymize.svg - assets/svg/tx-icon-anonymize.svg - assets/svg/tx-icon-anonymize-pending.svg - assets/svg/tx-icon-anonymize-failed.svg From ab02950f03282cde2b1c112916d5deb7a9f4804b Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 19 May 2023 16:41:13 -0600 Subject: [PATCH 26/54] re enable git versions --- .../global_settings_view/about_view.dart | 12 ++++++------ .../advanced_views/debug_view.dart | 15 +++++++++------ .../settings_menu/desktop_about_view.dart | 12 ++++++------ 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/lib/pages/settings_views/global_settings_view/about_view.dart b/lib/pages/settings_views/global_settings_view/about_view.dart index 60b95c626..89e555418 100644 --- a/lib/pages/settings_views/global_settings_view/about_view.dart +++ b/lib/pages/settings_views/global_settings_view/about_view.dart @@ -2,11 +2,11 @@ import 'dart:convert'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -// import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; -// import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; +import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; +import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:http/http.dart'; -// import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; +import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; import 'package:package_info_plus/package_info_plus.dart'; import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/logger.dart'; @@ -105,9 +105,9 @@ class AboutView extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - String firoCommit = "lololololo"; //FIRO_VERSIONS.getPluginVersion(); - String epicCashCommit ="lololololo"; // EPIC_VERSIONS.getPluginVersion(); - String moneroCommit ="lololololo"; // MONERO_VERSIONS.getPluginVersion(); + String firoCommit = FIRO_VERSIONS.getPluginVersion(); + String epicCashCommit = EPIC_VERSIONS.getPluginVersion(); + String moneroCommit = MONERO_VERSIONS.getPluginVersion(); List futureFiroList = [ doesCommitExist("cypherstack", "flutter_liblelantus", firoCommit), isHeadCommit("cypherstack", "flutter_liblelantus", "main", firoCommit), diff --git a/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart b/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart index bb7865300..1b7ffa6f9 100644 --- a/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart +++ b/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart @@ -7,11 +7,11 @@ import 'package:event_bus/event_bus.dart'; import 'package:file_picker/file_picker.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -// import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; -// import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; +import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; +import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -// import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; +import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; import 'package:package_info_plus/package_info_plus.dart'; import 'package:stackwallet/models/isar/models/log.dart'; import 'package:stackwallet/notifications/show_flush_bar.dart'; @@ -291,9 +291,12 @@ class _DebugViewState extends ConsumerState { final signature = packageInfo.buildSignature; final appName = packageInfo.appName; - String firoCommit ="lololololo"; //FIRO_VERSIONS.getPluginVersion(); - String epicCashCommit ="lololololo"; //EPIC_VERSIONS.getPluginVersion(); - String moneroCommit ="lololololo"; // MONERO_VERSIONS.getPluginVersion(); + String firoCommit = + FIRO_VERSIONS.getPluginVersion(); + String epicCashCommit = + EPIC_VERSIONS.getPluginVersion(); + String moneroCommit = + MONERO_VERSIONS.getPluginVersion(); DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin(); final deviceInfo = diff --git a/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart b/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart index 89d66306b..45d748481 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart @@ -2,11 +2,11 @@ import 'dart:convert'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -// import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; -// import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; +import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; +import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:http/http.dart'; -// import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; +import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; import 'package:package_info_plus/package_info_plus.dart'; import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/logger.dart'; @@ -98,9 +98,9 @@ class DesktopAboutView extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - String firoCommit ="lololololo"; // FIRO_VERSIONS.getPluginVersion(); - String epicCashCommit ="lololololo"; // EPIC_VERSIONS.getPluginVersion(); - String moneroCommit = "lololololo"; //MONERO_VERSIONS.getPluginVersion(); + String firoCommit = FIRO_VERSIONS.getPluginVersion(); + String epicCashCommit = EPIC_VERSIONS.getPluginVersion(); + String moneroCommit = MONERO_VERSIONS.getPluginVersion(); List futureFiroList = [ doesCommitExist("cypherstack", "flutter_liblelantus", firoCommit), isHeadCommit("cypherstack", "flutter_liblelantus", "main", firoCommit), From 523fd96929094ebe2abfc7068cbc49c482c8151b Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 19 May 2023 16:53:10 -0600 Subject: [PATCH 27/54] Revert "re enable git versions" This reverts commit ab02950f03282cde2b1c112916d5deb7a9f4804b. --- .../global_settings_view/about_view.dart | 12 ++++++------ .../advanced_views/debug_view.dart | 15 ++++++--------- .../settings_menu/desktop_about_view.dart | 12 ++++++------ 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/lib/pages/settings_views/global_settings_view/about_view.dart b/lib/pages/settings_views/global_settings_view/about_view.dart index 89e555418..60b95c626 100644 --- a/lib/pages/settings_views/global_settings_view/about_view.dart +++ b/lib/pages/settings_views/global_settings_view/about_view.dart @@ -2,11 +2,11 @@ import 'dart:convert'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; -import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; +// import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; +// import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:http/http.dart'; -import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; +// import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; import 'package:package_info_plus/package_info_plus.dart'; import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/logger.dart'; @@ -105,9 +105,9 @@ class AboutView extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - String firoCommit = FIRO_VERSIONS.getPluginVersion(); - String epicCashCommit = EPIC_VERSIONS.getPluginVersion(); - String moneroCommit = MONERO_VERSIONS.getPluginVersion(); + String firoCommit = "lololololo"; //FIRO_VERSIONS.getPluginVersion(); + String epicCashCommit ="lololololo"; // EPIC_VERSIONS.getPluginVersion(); + String moneroCommit ="lololololo"; // MONERO_VERSIONS.getPluginVersion(); List futureFiroList = [ doesCommitExist("cypherstack", "flutter_liblelantus", firoCommit), isHeadCommit("cypherstack", "flutter_liblelantus", "main", firoCommit), diff --git a/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart b/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart index 1b7ffa6f9..bb7865300 100644 --- a/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart +++ b/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart @@ -7,11 +7,11 @@ import 'package:event_bus/event_bus.dart'; import 'package:file_picker/file_picker.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; -import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; +// import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; +// import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; +// import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; import 'package:package_info_plus/package_info_plus.dart'; import 'package:stackwallet/models/isar/models/log.dart'; import 'package:stackwallet/notifications/show_flush_bar.dart'; @@ -291,12 +291,9 @@ class _DebugViewState extends ConsumerState { final signature = packageInfo.buildSignature; final appName = packageInfo.appName; - String firoCommit = - FIRO_VERSIONS.getPluginVersion(); - String epicCashCommit = - EPIC_VERSIONS.getPluginVersion(); - String moneroCommit = - MONERO_VERSIONS.getPluginVersion(); + String firoCommit ="lololololo"; //FIRO_VERSIONS.getPluginVersion(); + String epicCashCommit ="lololololo"; //EPIC_VERSIONS.getPluginVersion(); + String moneroCommit ="lololololo"; // MONERO_VERSIONS.getPluginVersion(); DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin(); final deviceInfo = diff --git a/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart b/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart index 45d748481..89d66306b 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart @@ -2,11 +2,11 @@ import 'dart:convert'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; -import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; +// import 'package:flutter_libepiccash/git_versions.dart' as EPIC_VERSIONS; +// import 'package:flutter_libmonero/git_versions.dart' as MONERO_VERSIONS; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:http/http.dart'; -import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; +// import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; import 'package:package_info_plus/package_info_plus.dart'; import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/logger.dart'; @@ -98,9 +98,9 @@ class DesktopAboutView extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - String firoCommit = FIRO_VERSIONS.getPluginVersion(); - String epicCashCommit = EPIC_VERSIONS.getPluginVersion(); - String moneroCommit = MONERO_VERSIONS.getPluginVersion(); + String firoCommit ="lololololo"; // FIRO_VERSIONS.getPluginVersion(); + String epicCashCommit ="lololololo"; // EPIC_VERSIONS.getPluginVersion(); + String moneroCommit = "lololololo"; //MONERO_VERSIONS.getPluginVersion(); List futureFiroList = [ doesCommitExist("cypherstack", "flutter_liblelantus", firoCommit), isHeadCommit("cypherstack", "flutter_liblelantus", "main", firoCommit), From 141c3f34c9dc9894be61c11e94ea501dca8e2d4c Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 19 May 2023 16:58:44 -0600 Subject: [PATCH 28/54] temp fix --- .../global_settings_view/about_view.dart | 25 +++++++++++-------- .../advanced_views/debug_view.dart | 9 ++++--- .../settings_menu/desktop_about_view.dart | 23 +++++++++-------- 3 files changed, 33 insertions(+), 24 deletions(-) diff --git a/lib/pages/settings_views/global_settings_view/about_view.dart b/lib/pages/settings_views/global_settings_view/about_view.dart index 60b95c626..ed7490514 100644 --- a/lib/pages/settings_views/global_settings_view/about_view.dart +++ b/lib/pages/settings_views/global_settings_view/about_view.dart @@ -105,9 +105,12 @@ class AboutView extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - String firoCommit = "lololololo"; //FIRO_VERSIONS.getPluginVersion(); - String epicCashCommit ="lololololo"; // EPIC_VERSIONS.getPluginVersion(); - String moneroCommit ="lololololo"; // MONERO_VERSIONS.getPluginVersion(); + String firoCommit = + "Unable to fetch version"; //FIRO_VERSIONS.getPluginVersion(); + String epicCashCommit = + "Unable to fetch version"; // EPIC_VERSIONS.getPluginVersion(); + String moneroCommit = + "Unable to fetch version"; // MONERO_VERSIONS.getPluginVersion(); List futureFiroList = [ doesCommitExist("cypherstack", "flutter_liblelantus", firoCommit), isHeadCommit("cypherstack", "flutter_liblelantus", "main", firoCommit), @@ -161,14 +164,14 @@ class AboutView extends ConsumerWidget { String appName = ""; String build = ""; - if (snapshot.connectionState == - ConnectionState.done && - snapshot.hasData) { - version = snapshot.data!.version; - build = snapshot.data!.buildNumber; - signature = snapshot.data!.buildSignature; - appName = snapshot.data!.appName; - } + // if (snapshot.connectionState == + // ConnectionState.done && + // snapshot.hasData) { + // version = snapshot.data!.version; + // build = snapshot.data!.buildNumber; + // signature = snapshot.data!.buildSignature; + // appName = snapshot.data!.appName; + // } return Column( crossAxisAlignment: CrossAxisAlignment.stretch, diff --git a/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart b/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart index bb7865300..845325cc8 100644 --- a/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart +++ b/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart @@ -291,9 +291,12 @@ class _DebugViewState extends ConsumerState { final signature = packageInfo.buildSignature; final appName = packageInfo.appName; - String firoCommit ="lololololo"; //FIRO_VERSIONS.getPluginVersion(); - String epicCashCommit ="lololololo"; //EPIC_VERSIONS.getPluginVersion(); - String moneroCommit ="lololololo"; // MONERO_VERSIONS.getPluginVersion(); + String firoCommit = + "Unable to fetch version"; //FIRO_VERSIONS.getPluginVersion(); + String epicCashCommit = + "Unable to fetch version"; //EPIC_VERSIONS.getPluginVersion(); + String moneroCommit = + "Unable to fetch version"; // MONERO_VERSIONS.getPluginVersion(); DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin(); final deviceInfo = diff --git a/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart b/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart index 89d66306b..251a863d1 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/desktop_about_view.dart @@ -98,9 +98,12 @@ class DesktopAboutView extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - String firoCommit ="lololololo"; // FIRO_VERSIONS.getPluginVersion(); - String epicCashCommit ="lololololo"; // EPIC_VERSIONS.getPluginVersion(); - String moneroCommit = "lololololo"; //MONERO_VERSIONS.getPluginVersion(); + String firoCommit = + "Unable to fetch version"; // FIRO_VERSIONS.getPluginVersion(); + String epicCashCommit = + "Unable to fetch version"; // EPIC_VERSIONS.getPluginVersion(); + String moneroCommit = + "Unable to fetch version"; //MONERO_VERSIONS.getPluginVersion(); List futureFiroList = [ doesCommitExist("cypherstack", "flutter_liblelantus", firoCommit), isHeadCommit("cypherstack", "flutter_liblelantus", "main", firoCommit), @@ -237,13 +240,13 @@ class DesktopAboutView extends ConsumerWidget { String signature = ""; String build = ""; - if (snapshot.connectionState == - ConnectionState.done && - snapshot.hasData) { - version = snapshot.data!.version; - build = snapshot.data!.buildNumber; - signature = snapshot.data!.buildSignature; - } + // if (snapshot.connectionState == + // ConnectionState.done && + // snapshot.hasData) { + // version = snapshot.data!.version; + // build = snapshot.data!.buildNumber; + // signature = snapshot.data!.buildSignature; + // } return Column( mainAxisAlignment: From 9e4c8dbc77a75c0a330747cc903920294c25d403 Mon Sep 17 00:00:00 2001 From: detherminal <76167420+detherminal@users.noreply.github.com> Date: Wed, 31 May 2023 00:46:11 +0300 Subject: [PATCH 29/54] fix: recent logs --- lib/services/debug_service.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/services/debug_service.dart b/lib/services/debug_service.dart index dadb76990..3e2e840a5 100644 --- a/lib/services/debug_service.dart +++ b/lib/services/debug_service.dart @@ -34,7 +34,7 @@ class DebugService extends ChangeNotifier { // }); } - List get recentLogs => isar.logs.where().limit(200).findAllSync(); + List get recentLogs => isar.logs.where().sortByTimestampInMillisUTCDesc().limit(100).findAllSync(); // Future updateRecentLogs() async { // int totalCount = await isar.logs.count(); From 24dfa9e4f0b75bd8f4941f9950884df3b2c0e672 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Tue, 30 May 2023 17:43:33 -0700 Subject: [PATCH 30/54] add epic and lelantus dlls to windows cmakelists --- windows/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 3ed364885..eddd46e4d 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -80,6 +80,12 @@ install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR} install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../crypto_plugins/flutter_libepiccash/scripts/windows/build/libepic_cash_wallet.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../crypto_plugins/flutter_liblelantus/scripts/windows/build/libmobileliblelantus.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + if(PLUGIN_BUNDLED_LIBRARIES) install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" From dc55777377a23882f1dc8f2f224004a67445e5f1 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Tue, 30 May 2023 17:54:06 -0700 Subject: [PATCH 31/54] update all crypto_plugins to use windows branch TODO: merge open PRs, update refs to just use main --- crypto_plugins/flutter_libepiccash | 2 +- crypto_plugins/flutter_liblelantus | 2 +- crypto_plugins/flutter_libmonero | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index 594ab89bc..3d3def689 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit 594ab89bc665a15a810ba7476ed2ad255fa8b5ac +Subproject commit 3d3def68912c6205b795aa19824a6e1f9feb4fb0 diff --git a/crypto_plugins/flutter_liblelantus b/crypto_plugins/flutter_liblelantus index b3fac32f5..19a3bae26 160000 --- a/crypto_plugins/flutter_liblelantus +++ b/crypto_plugins/flutter_liblelantus @@ -1 +1 @@ -Subproject commit b3fac32f57d7ef97da8641463d1a852f41660f9b +Subproject commit 19a3bae26932518e5231b13a368b337b7c6c89a7 diff --git a/crypto_plugins/flutter_libmonero b/crypto_plugins/flutter_libmonero index 73d257ed2..21b9d071c 160000 --- a/crypto_plugins/flutter_libmonero +++ b/crypto_plugins/flutter_libmonero @@ -1 +1 @@ -Subproject commit 73d257ed2fe5b204cf3589822e226301b187b86d +Subproject commit 21b9d071ca0dfc1b4a0e469f5079205a75cf8262 From 422320f4b3464638975d155414ff21695a8ca6db Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Tue, 30 May 2023 20:16:00 -0700 Subject: [PATCH 32/54] do not clone repo in setup script nor build plugins --- scripts/setup.sh | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index 7bf07ef5a..529d2d7ec 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -18,20 +18,6 @@ echo 'export PATH="$PATH:'${FLUTTER_DIR}'"' >> ~/.bashrc source ~/.bashrc flutter doctor -# setup stack_wallet github -cd $PROJECTS -git clone https://github.com/cypherstack/stack_wallet.git -cd stack_wallet -export STACK_WALLET=$(pwd) -git submodule update --init --recursive - -# create template lib/external_api_keys.dart file if it doesn't already exist -KEYS="$HOME/projects/stack_wallet/lib/external_api_keys.dart" -if ! test -f "$KEYS"; then - echo 'prebuild.sh: creating template lib/external_api_keys.dart file' - printf 'const kChangeNowApiKey = "";\nconst kSimpleSwapApiKey = "";' > $KEYS -fi - # install stack wallet dependencies sudo apt-get install -y unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake openjdk-8-jre-headless libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev llvm @@ -46,9 +32,23 @@ source "$HOME/.cargo/env" cargo install cargo-ndk rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android -# build stack wallet plugins -cd $STACK_WALLET -cd scripts/android -./build_all.sh -cd ../linux -./build_all.sh +# # setup stack_wallet github +# cd $PROJECTS +# git clone https://github.com/cypherstack/stack_wallet.git +# cd stack_wallet +# export STACK_WALLET=$(pwd) +# git submodule update --init --recursive + +# # create template lib/external_api_keys.dart file if it doesn't already exist +# KEYS="$HOME/projects/stack_wallet/lib/external_api_keys.dart" +# if ! test -f "$KEYS"; then +# echo 'prebuild.sh: creating template lib/external_api_keys.dart file' +# printf 'const kChangeNowApiKey = "";\nconst kSimpleSwapApiKey = "";' > $KEYS +# fi + +# # build stack wallet plugins +# cd $STACK_WALLET +# cd scripts/android +# ./build_all.sh +# cd ../linux +# ./build_all.sh From 71fbeb9fb9800aa5dc7f3c538bda84ea83230660 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Tue, 30 May 2023 20:16:42 -0700 Subject: [PATCH 33/54] do not build_all libmonero --- scripts/windows/build_all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/windows/build_all.sh b/scripts/windows/build_all.sh index d890ed70a..a96271cc3 100755 --- a/scripts/windows/build_all.sh +++ b/scripts/windows/build_all.sh @@ -3,7 +3,7 @@ mkdir -p build (cd ../../crypto_plugins/flutter_libepiccash/scripts/windows && ./build_all.sh ) & (cd ../../crypto_plugins/flutter_liblelantus/scripts/windows && ./build_all.sh ) & -(cd ../../crypto_plugins/flutter_libmonero/scripts/windows && ./build_all.sh) & +# (cd ../../crypto_plugins/flutter_libmonero/scripts/windows && ./build_all.sh) & wait echo "Done building" From e7b26df82a48dd1a4f135a2d001100f671d602e4 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Thu, 1 Jun 2023 11:52:24 -0700 Subject: [PATCH 34/54] add flutter_libepiccash windows documentation and deps.sh script --- crypto_plugins/flutter_libepiccash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index 3d3def689..32f05de0a 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit 3d3def68912c6205b795aa19824a6e1f9feb4fb0 +Subproject commit 32f05de0a482a20aec75df422f5acf5af6d98274 From dcd874c413f4f66b1432b5bd78312fb6dc7be8e1 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Thu, 1 Jun 2023 12:00:27 -0700 Subject: [PATCH 35/54] add script deps.sh script which installs crypto_plugin deps --- scripts/windows/deps.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 scripts/windows/deps.sh diff --git a/scripts/windows/deps.sh b/scripts/windows/deps.sh new file mode 100644 index 000000000..0f6642068 --- /dev/null +++ b/scripts/windows/deps.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +(cd ../../crypto_plugins/flutter_libepiccash/scripts/windows && ./deps.sh ) & +(cd ../../crypto_plugins/flutter_liblelantus/scripts/windows && ./mxedeps.sh ) & +# (cd ../../crypto_plugins/flutter_libmonero/scripts/windows && ./monerodeps.sh && ./mxedeps.sh) & + +wait +echo "Done building" From 6797c9acd4b863a2fe9661efc7c67153312a9771 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Thu, 1 Jun 2023 12:00:55 -0700 Subject: [PATCH 36/54] add clang to docs and script --- crypto_plugins/flutter_libepiccash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index 32f05de0a..24e865911 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit 32f05de0a482a20aec75df422f5acf5af6d98274 +Subproject commit 24e865911ac48417c2d917570ae8cb7e0c84582a From d783cf9ace01dd8a3e8197c15dec9bd6543bf08d Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Thu, 1 Jun 2023 12:28:33 -0700 Subject: [PATCH 37/54] update flutter_libepiccash docs --- crypto_plugins/flutter_libepiccash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index 24e865911..fb4cc67d1 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit 24e865911ac48417c2d917570ae8cb7e0c84582a +Subproject commit fb4cc67d1d2f67cf8195b58490a4395757e4278d From ce3cf4a811e26693c8b7c12b0a68f676f5961901 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Thu, 1 Jun 2023 13:35:29 -0700 Subject: [PATCH 38/54] add windows info to docs and add windows powershell script --- docs/building.md | 79 ++++++++++++++++++++++++---------------- scripts/windows/deps.ps1 | 57 +++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+), 31 deletions(-) create mode 100644 scripts/windows/deps.ps1 diff --git a/docs/building.md b/docs/building.md index 3f5f4415a..f8de32fe5 100644 --- a/docs/building.md +++ b/docs/building.md @@ -4,42 +4,37 @@ Here you will find instructions on how to install the necessary tools for buildi ## Prerequisites -- The only OS supported for building is Ubuntu 20.04. Advanced users may also be able to build on other Debian-based distributions like Linux Mint. +- The only OS supported for building Android and Linux desktop is Ubuntu 20.04. Windows build are completed using Ubuntu 20.04 on WSL2. Advanced users may also be able to build on other Debian-based distributions like Linux Mint. - Android setup ([Android Studio](https://developer.android.com/studio) and subsequent dependencies) - 100 GB of storage -Install Android Studio following the instructions below before proceeding, then the following prerequisites can be installed with the setup script [`scripts/setup.sh`](./../scripts/setup.sh) or manually as described below: - -- Flutter 3.7.12 [(install manually or with git, do not install with snap)](https://docs.flutter.dev/get-started/install) -- Dart SDK Requirement (>=2.19.0, up until <3.0.0) (normally included with a flutter install) +## Linux host +The following instructions are for building and running on a Linux host. Alternatively, see the [Windows](#Windows host) section. ### Android Studio -Android Studio is the recommended IDE for development, not just for launching on Android devices and emulators but also for Linux desktop development. - -Follow instructions here [https://developer.android.com/studio/install#linux](https://developer.android.com/studio/install#linux) or install via snap: +Install Android Studio. Follow instructions here [https://developer.android.com/studio/install#linux](https://developer.android.com/studio/install#linux) or install via snap: ``` # setup android studio sudo apt install -y openjdk-11-jdk sudo snap install android-studio --classic ``` -Use Tools > SDK Manager to install: - - SDK Tools > Android SDK (API 30) - - SDK Tools > NDK - - SDK Tools > Android SDK command line tools - - SDK Tools > CMake +Use `Tools > SDK Manager` to install: + - `SDK Tools > Android SDK (API 30)` + - `SDK Tools > NDK` + - `SDK Tools > Android SDK command line tools` + - `SDK Tools > CMake` -Then in File > Settings > Plugins, install the Flutter plugin and restart the IDE. In File > Settings > Languages & Frameworks > Flutter > Editor, enable auto format on save to match the project's code style. If you have problems with the Dart SDK, make sure to run `flutter` in a terminal to download it (use `source ~/.bashrc` to update your environment variables if you're still using the same terminal from which you ran `setup.sh`) +Then in `File > Settings > Plugins`, install the **Flutter** and **Dart** plugins and restart the IDE. In `File > Settings > Languages & Frameworks > Flutter > Editor`, enable auto format on save to match the project's code style. If you have problems with the Dart SDK, make sure to run `flutter` in a terminal to download it (use `source ~/.bashrc` to update your environment variables if you're still using the same terminal from which you ran `setup.sh`). Run `flutter doctor` to install any missing dependencies and review and agree to any license agreements. Make a Pixel 4 (API 30) x86_64 emulator with 2GB of storage space for emulation ### Scripted setup -[`scripts/setup.sh`](./../scripts/setup.sh) is provided as a tool to set up installation for building: download the script and run it anywhere. This script should skip the entire [Manual setup](#manual-setup) section below and prepare you for [running](#running). It will set up the stack_wallet repository in `~/projects/stack_wallet` and build it there. +[`scripts/setup.sh`](./../scripts/setup.sh) is provided as a tool to set up installation for building: download the script and run it anywhere. This script should skip the entire [Manual setup](#manual-setup) section below and prepare you for [running](#Running). ### Manual setup - -> If you used the `setup.sh` script, skip to [running](#running) +> If you used the `setup.sh` script, skip to [running](#Running) Install basic dependencies ``` @@ -83,7 +78,6 @@ git submodule update --init --recursive ``` Run prebuild script - ``` cd scripts ./prebuild.sh @@ -101,26 +95,28 @@ sudo apt-get remove '^libboost.*-dev.*' ``` -Building plugins for Android +### Building plugins for Android > Warning: This will take a long time, please be patient ``` -cd scripts/android/ +cd scripts/android ./build_all.sh -// when finished go back to the root directory -cd ../.. ``` -Building plugins for Linux - +### Building plugins for Linux ``` -cd scripts/linux/ +cd scripts/linux ./build_all.sh -// when finished go back to the root directory -cd ../.. ``` -## Running -### Android +### Building plugins for Windows +``` +cd scripts/windows +./deps.sh +./build_all.sh +``` + +### Running +#### Android Plug in your android device or use the emulator available via Android Studio and then run the following commands: ``` flutter pub get @@ -129,9 +125,30 @@ flutter run android Note on Emulators: Only x86_64 emulators are supported, x86 emulators will not work -### Linux +#### Linux Plug in your android device or use the emulator available via Android Studio and then run the following commands: ``` -flutter pub get Linux +flutter pub get flutter run linux ``` + +## Windows host +### Visual Studio +Visual Studio is required for Windows development with the Flutter SDK. Download it at https://visualstudio.microsoft.com/downloads/ and install the "Desktop development with C++" workload, including all of its default components. + +### Building libraries in WSL2 +Set up Ubuntu 20.04 in WSL2. Follow the entire Linux host section to get set up and build windows `dll` libraries. Copy the resulting `dll`s to their respective positions on the Windows host: + +- `stack_wallet/crypto_plugins/flutter_libepiccash/scripts/windows/build/libepic_cash_wallet.dll` +- `stack_wallet/crypto_plugins/flutter_liblelantus/scripts/windows/build/libmobileliblelantus.dll` + + +### Install Flutter on Windows host +Install Flutter on your Windows host (not in WSL2) by following these instructions: https://docs.flutter.dev/get-started/install/windows or by running `scripts/windows/deps.ps1`. You may still have to add `C:\development\flutter\bin` to PATH before proceeding, even if you ran `deps.ps1`. Run `flutter doctor` in PowerShell to confirm its installation. + +### Running +Run the following commands: +``` +flutter pub get +flutter run windows +``` diff --git a/scripts/windows/deps.ps1 b/scripts/windows/deps.ps1 new file mode 100644 index 000000000..5d90e59d7 --- /dev/null +++ b/scripts/windows/deps.ps1 @@ -0,0 +1,57 @@ +# Create C:\development +New-Item -Path 'C:\development' -ItemType Directory +# Download flutter_windows_3.10.2-stable.zip +Invoke-WebRequest "https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_3.10.2-stable.zip" -OutFile "C:\development\flutter_windows_3.10.2-stable.zip" +# Extract Flutter SDK +Expand-Archive "C:\development\flutter_windows_3.10.2-stable.zip" -DestinationPath "C:\development" + +# See https://stackoverflow.com/a/69239861 +function Add-Path { + + param( + [Parameter(Mandatory, Position=0)] + [string] $LiteralPath, + [ValidateSet('User', 'CurrentUser', 'Machine', 'LocalMachine')] + [string] $Scope + ) + + Set-StrictMode -Version 1; $ErrorActionPreference = 'Stop' + + $isMachineLevel = $Scope -in 'Machine', 'LocalMachine' + if ($isMachineLevel -and -not $($ErrorActionPreference = 'Continue'; net session 2>$null)) { throw "You must run AS ADMIN to update the machine-level Path environment variable." } + + $regPath = 'registry::' + ('HKEY_CURRENT_USER\Environment', 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment')[$isMachineLevel] + + # Note the use of the .GetValue() method to ensure that the *unexpanded* value is returned. + $currDirs = (Get-Item -LiteralPath $regPath).GetValue('Path', '', 'DoNotExpandEnvironmentNames') -split ';' -ne '' + + if ($LiteralPath -in $currDirs) { + Write-Verbose "Already present in the persistent $(('user', 'machine')[$isMachineLevel])-level Path: $LiteralPath" + return + } + + $newValue = ($currDirs + $LiteralPath) -join ';' + + # Update the registry. + Set-ItemProperty -Type ExpandString -LiteralPath $regPath Path $newValue + + # Broadcast WM_SETTINGCHANGE to get the Windows shell to reload the + # updated environment, via a dummy [Environment]::SetEnvironmentVariable() operation. + $dummyName = [guid]::NewGuid().ToString() + [Environment]::SetEnvironmentVariable($dummyName, 'foo', 'User') + [Environment]::SetEnvironmentVariable($dummyName, [NullString]::value, 'User') + + # Finally, also update the current session's `$env:Path` definition. + # Note: For simplicity, we always append to the in-process *composite* value, + # even though for a -Scope Machine update this isn't strictly the same. + $env:Path = ($env:Path -replace ';$') + ';' + $LiteralPath + + Write-Verbose "`"$LiteralPath`" successfully appended to the persistent $(('user', 'machine')[$isMachineLevel])-level Path and also the current-process value." + +} + +# Add Flutter SDK to PATH if it's not there already +if ($Env:Path -split ";" -contains 'C:\development\flutter\bin') { +} else { + Add-Path("C:\development\flutter\bin") +} From 75cb005cac26759c59caf1c30365e43908215282 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Thu, 1 Jun 2023 13:35:38 -0700 Subject: [PATCH 39/54] update flutter_liblelantus docs --- crypto_plugins/flutter_liblelantus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_liblelantus b/crypto_plugins/flutter_liblelantus index 19a3bae26..66f2f5057 160000 --- a/crypto_plugins/flutter_liblelantus +++ b/crypto_plugins/flutter_liblelantus @@ -1 +1 @@ -Subproject commit 19a3bae26932518e5231b13a368b337b7c6c89a7 +Subproject commit 66f2f505703cd0b0a45ca9ce27cc5633be685590 From 4f9ae71aead99ffce0cba1caa238973c27a238b3 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Thu, 1 Jun 2023 14:10:39 -0700 Subject: [PATCH 40/54] update epic cash and firo refs --- crypto_plugins/flutter_libepiccash | 2 +- crypto_plugins/flutter_liblelantus | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index fb4cc67d1..01bad9471 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit fb4cc67d1d2f67cf8195b58490a4395757e4278d +Subproject commit 01bad9471c4b41392cd2aa98f5655dc14dedc997 diff --git a/crypto_plugins/flutter_liblelantus b/crypto_plugins/flutter_liblelantus index 66f2f5057..9188e8fa9 160000 --- a/crypto_plugins/flutter_liblelantus +++ b/crypto_plugins/flutter_liblelantus @@ -1 +1 @@ -Subproject commit 66f2f505703cd0b0a45ca9ce27cc5633be685590 +Subproject commit 9188e8fa925d1dee5a91d984a92a962027d7a3d3 From 3a6cfcf7ce08ff85f26683b096c98d387c77783a Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Thu, 1 Jun 2023 14:18:06 -0700 Subject: [PATCH 41/54] bump version (v1.7.12, build 177) --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 08c5ea11a..55dafe2ea 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: Stack Wallet # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.7.11+176 +version: 1.7.12+177 environment: sdk: ">=2.17.0 <3.0.0" From 2fa6e0f203cfd936ef10d642203b67345a02e9e2 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Thu, 1 Jun 2023 14:53:59 -0700 Subject: [PATCH 42/54] downgrade flutter to 3.7.12 and update docs --- docs/building.md | 7 ++++++- scripts/windows/deps.ps1 | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/building.md b/docs/building.md index f8de32fe5..eb6fc6334 100644 --- a/docs/building.md +++ b/docs/building.md @@ -144,9 +144,14 @@ Set up Ubuntu 20.04 in WSL2. Follow the entire Linux host section to get set up ### Install Flutter on Windows host -Install Flutter on your Windows host (not in WSL2) by following these instructions: https://docs.flutter.dev/get-started/install/windows or by running `scripts/windows/deps.ps1`. You may still have to add `C:\development\flutter\bin` to PATH before proceeding, even if you ran `deps.ps1`. Run `flutter doctor` in PowerShell to confirm its installation. +Install Flutter 3.7.12 on your Windows host (not in WSL2) by following these instructions: https://docs.flutter.dev/get-started/install/windows or by running `scripts/windows/deps.ps1`. You may still have to add `C:\development\flutter\bin` to PATH before proceeding, even if you ran `deps.ps1`. Run `flutter doctor` in PowerShell to confirm its installation. ### Running +You may need to enable Developer Mode for symlink support, +``` +start ms-settings:developers +``` + Run the following commands: ``` flutter pub get diff --git a/scripts/windows/deps.ps1 b/scripts/windows/deps.ps1 index 5d90e59d7..db00e4fb2 100644 --- a/scripts/windows/deps.ps1 +++ b/scripts/windows/deps.ps1 @@ -1,9 +1,9 @@ # Create C:\development New-Item -Path 'C:\development' -ItemType Directory -# Download flutter_windows_3.10.2-stable.zip -Invoke-WebRequest "https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_3.10.2-stable.zip" -OutFile "C:\development\flutter_windows_3.10.2-stable.zip" +# Download flutter_windows_3.7.12-stable.zip +Invoke-WebRequest "https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_3.7.12-stable.zip" -OutFile "C:\development\flutter_windows_3.7.12-stable.zip" # Extract Flutter SDK -Expand-Archive "C:\development\flutter_windows_3.10.2-stable.zip" -DestinationPath "C:\development" +Expand-Archive "C:\development\flutter_windows_3.7.12-stable.zip" -DestinationPath "C:\development" # See https://stackoverflow.com/a/69239861 function Add-Path { From a45cf5e531dd4b147a7c5d62123ed7640928ed65 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Fri, 2 Jun 2023 08:37:44 -0700 Subject: [PATCH 43/54] update docs --- docs/building.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/building.md b/docs/building.md index eb6fc6334..7fbbf3cac 100644 --- a/docs/building.md +++ b/docs/building.md @@ -146,12 +146,26 @@ Set up Ubuntu 20.04 in WSL2. Follow the entire Linux host section to get set up ### Install Flutter on Windows host Install Flutter 3.7.12 on your Windows host (not in WSL2) by following these instructions: https://docs.flutter.dev/get-started/install/windows or by running `scripts/windows/deps.ps1`. You may still have to add `C:\development\flutter\bin` to PATH before proceeding, even if you ran `deps.ps1`. Run `flutter doctor` in PowerShell to confirm its installation. -### Running +### Dependencies You may need to enable Developer Mode for symlink support, ``` start ms-settings:developers ``` +Install NuGet: +``` +winget install 9WZDNCRDMDM3 # NuGet, can also use Microsoft.NuGet +``` + +You may need to install CppWinRT / C++/WinRT SDKs: +``` +winget install Microsoft.Windows.CppWinRT +``` + +Install the Windows SDK: https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/ + +### Running + Run the following commands: ``` flutter pub get From d647e0865718ec25372015de57d2ec1854295ac2 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Fri, 2 Jun 2023 08:40:39 -0700 Subject: [PATCH 44/54] revert flutter_libmonero to main --- crypto_plugins/flutter_libmonero | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libmonero b/crypto_plugins/flutter_libmonero index 21b9d071c..73d257ed2 160000 --- a/crypto_plugins/flutter_libmonero +++ b/crypto_plugins/flutter_libmonero @@ -1 +1 @@ -Subproject commit 21b9d071ca0dfc1b4a0e469f5079205a75cf8262 +Subproject commit 73d257ed2fe5b204cf3589822e226301b187b86d From cdc08b4d43266ba53e2a23549586e668bf66765f Mon Sep 17 00:00:00 2001 From: sneurlax Date: Mon, 5 Jun 2023 16:05:14 -0500 Subject: [PATCH 45/54] upgrade powershell script TODO enable overwriting files when extracting archive ... or delete folder prior to extraction? --- scripts/windows/deps.ps1 | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/scripts/windows/deps.ps1 b/scripts/windows/deps.ps1 index db00e4fb2..2d90ed7fe 100644 --- a/scripts/windows/deps.ps1 +++ b/scripts/windows/deps.ps1 @@ -1,9 +1,25 @@ # Create C:\development -New-Item -Path 'C:\development' -ItemType Directory +New-Item -Path 'C:\development' -ItemType Directory -ErrorAction Ignore + +# $wc = [System.Net.WebClient]::new() +# $publishedHash = '8E28E54D601F0751922DE24632C1E716B4684876255CF82304A9B19E89A9CCAC' +# $FileHash = Get-FileHash -InputStream ($wc.OpenRead("C:\development\flutter_windows_3.7.12-stable.zip")) + +# if (-Not [System.IO.File]::Exists("C:\development\flutter_windows_3.7.12-stable.zip") or -Not ($FileHash.Hash -eq $publishedHash)) { +# } else { # Download flutter_windows_3.7.12-stable.zip -Invoke-WebRequest "https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_3.7.12-stable.zip" -OutFile "C:\development\flutter_windows_3.7.12-stable.zip" +# Write-Output "Downloading flutter_windows_3.7.12-stable.zip" +# $ProgressPreference = 'SilentlyContinue' # Speed up download process, see https://stackoverflow.com/questions/28682642/powershell-why-is-using-invoke-webrequest-much-slower-than-a-browser-download +# Invoke-WebRequest "https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_3.7.12-stable.zip" -OutFile "C:\development\flutter_windows_3.7.12-stable.zip" +# } + # Extract Flutter SDK -Expand-Archive "C:\development\flutter_windows_3.7.12-stable.zip" -DestinationPath "C:\development" +Write-Output "Extracting flutter_windows_3.7.12-stable.zip" +$progressPreference = 'SilentlyContinue' # Speed up extraction process, see https://github.com/PowerShell/Microsoft.PowerShell.Archive/issues/32#issuecomment-642582179 +# Add-MpPreference -ExclusionPath C:\development +# Expand-Archive "C:\development\flutter_windows_3.7.12-stable.zip" -DestinationPath "C:\development" +Add-Type -Assembly "System.IO.Compression.Filesystem" +[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\development\flutter_windows_3.7.12-stable.zip", "C:\development") # See https://stackoverflow.com/a/69239861 function Add-Path { @@ -52,6 +68,8 @@ function Add-Path { # Add Flutter SDK to PATH if it's not there already if ($Env:Path -split ";" -contains 'C:\development\flutter\bin') { + Write-Output "Flutter SDK in PATH, done" } else { + Write-Output "Attempting to add Flutter SDK to PATH" Add-Path("C:\development\flutter\bin") } From 133d5d9001d636c9985a1e3670fe9b23031df85d Mon Sep 17 00:00:00 2001 From: sneurlax Date: Mon, 5 Jun 2023 16:09:10 -0500 Subject: [PATCH 46/54] flutter_libmonero: merge update_gradle into windows --- crypto_plugins/flutter_libmonero | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libmonero b/crypto_plugins/flutter_libmonero index 73d257ed2..017ef8759 160000 --- a/crypto_plugins/flutter_libmonero +++ b/crypto_plugins/flutter_libmonero @@ -1 +1 @@ -Subproject commit 73d257ed2fe5b204cf3589822e226301b187b86d +Subproject commit 017ef87592f7af7b7155e09c97da09aa5d01a211 From 95656ff7aa072fa240eac93165956805b0938c0f Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Mon, 5 Jun 2023 14:36:55 -0700 Subject: [PATCH 47/54] update docs wrt CppWinRT --- docs/building.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/docs/building.md b/docs/building.md index 7fbbf3cac..de8b57143 100644 --- a/docs/building.md +++ b/docs/building.md @@ -147,22 +147,19 @@ Set up Ubuntu 20.04 in WSL2. Follow the entire Linux host section to get set up Install Flutter 3.7.12 on your Windows host (not in WSL2) by following these instructions: https://docs.flutter.dev/get-started/install/windows or by running `scripts/windows/deps.ps1`. You may still have to add `C:\development\flutter\bin` to PATH before proceeding, even if you ran `deps.ps1`. Run `flutter doctor` in PowerShell to confirm its installation. ### Dependencies -You may need to enable Developer Mode for symlink support, +Install the Windows SDK: https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/ + +Enable Developer Mode for symlink support, ``` start ms-settings:developers ``` -Install NuGet: +You may need to install NuGet and CppWinRT / C++/WinRT SDKs version `2.0.210806.1`: ``` winget install 9WZDNCRDMDM3 # NuGet, can also use Microsoft.NuGet +winget install Microsoft.Windows.CppWinRT -Version 2.0.210806.1 ``` - -You may need to install CppWinRT / C++/WinRT SDKs: -``` -winget install Microsoft.Windows.CppWinRT -``` - -Install the Windows SDK: https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/ +or [download the package](https://www.nuget.org/packages/Microsoft.Windows.CppWinRT/2.0.210806.1) and [manually install it](https://github.com/Baseflow/flutter-permission-handler/issues/1025#issuecomment-1518576722). ### Running From 1b26d7fc9cc3b582a6612e78a2dbcc45d3e0b71c Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Mon, 5 Jun 2023 14:50:59 -0700 Subject: [PATCH 48/54] add windows prebuild script and update docs iaw --- docs/building.md | 30 ++++++++++++++++++++++-------- scripts/prebuild.ps1 | 17 +++++++++++++++++ 2 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 scripts/prebuild.ps1 diff --git a/docs/building.md b/docs/building.md index de8b57143..9f081da2e 100644 --- a/docs/building.md +++ b/docs/building.md @@ -77,14 +77,6 @@ git submodule update --init --recursive ``` -Run prebuild script -``` -cd scripts -./prebuild.sh -// when finished go back to the root directory -cd .. -``` - Remove pre-installed system libraries for the following packages built by cryptography plugins in the crypto_plugins folder: `boost iconv libjson-dev libsecret openssl sodium unbound zmq`. You can use ``` sudo apt list --installed | grep boost @@ -95,6 +87,17 @@ sudo apt-get remove '^libboost.*-dev.*' ``` +### Run prebuild script + +Certain test wallet parameter and API key template files must be created in order to run Stack Wallet. These can be created by script as in +``` +cd scripts +./prebuild.sh +// when finished go back to the root directory +cd .. +``` +or manually by creating the files referenced in that script with the specified content. + ### Building plugins for Android > Warning: This will take a long time, please be patient ``` @@ -161,6 +164,17 @@ winget install Microsoft.Windows.CppWinRT -Version 2.0.210806.1 ``` or [download the package](https://www.nuget.org/packages/Microsoft.Windows.CppWinRT/2.0.210806.1) and [manually install it](https://github.com/Baseflow/flutter-permission-handler/issues/1025#issuecomment-1518576722). +### Run prebuild script + +Certain test wallet parameter and API key template files must be created in order to run Stack Wallet. These can be created by script as in +``` +cd scripts +./prebuild.ps1 +// when finished go back to the root directory +cd .. +``` +or manually by creating the files referenced in that script with the specified content. + ### Running Run the following commands: diff --git a/scripts/prebuild.ps1 b/scripts/prebuild.ps1 new file mode 100644 index 000000000..6618378ee --- /dev/null +++ b/scripts/prebuild.ps1 @@ -0,0 +1,17 @@ +# Create template lib/external_api_keys.dart file if it doesn't already exist +$KEYS = "..\lib\external_api_keys.dart" +if (-not (Test-Path $KEYS)) { + Write-Host "prebuild.ps1: creating template lib/external_api_keys.dart file" + "const kChangeNowApiKey = "";" + "`nconst kSimpleSwapApiKey = "";" | Out-File $KEYS +} + +# Create template wallet test parameter files if they don't already exist +$coins = @("bitcoin", "bitcoincash", "dogecoin", "namecoin", "firo", "particl") # TODO add monero and wownero when those tests are updated to use the .gitignored test wallet setup: when doing that, make sure to update the test vectors for a new, private development seed + +foreach ($coin in $coins) { + $WALLETTESTPARAMFILE = "..\test\services\coins\$coin\${coin}_wallet_test_parameters.dart" + if (-not (Test-Path $WALLETTESTPARAMFILE)) { + Write-Host "prebuild.ps1: creating template test/services/coins/$coin/${coin}_wallet_test_parameters.dart file" + "const TEST_MNEMONIC = "";" + "`nconst ROOT_WIF = "";" + "`nconst NODE_WIF_84 = "";" | Out-File -FilePath $WALLETTESTPARAMFILE + } +} From 2e93bb656b11b1fd3eae8fa0cf44b0017c0191cd Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Mon, 5 Jun 2023 14:51:38 -0700 Subject: [PATCH 49/54] update flutter_libmonero to main --- crypto_plugins/flutter_libmonero | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libmonero b/crypto_plugins/flutter_libmonero index 017ef8759..db8783133 160000 --- a/crypto_plugins/flutter_libmonero +++ b/crypto_plugins/flutter_libmonero @@ -1 +1 @@ -Subproject commit 017ef87592f7af7b7155e09c97da09aa5d01a211 +Subproject commit db87831332ae2ead75aee4e55ea4434c229d9d5f From 9ecb87206b6dd74a2ef264edd9bb7becbf8e4637 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Mon, 5 Jun 2023 14:55:42 -0700 Subject: [PATCH 50/54] encode external_api_keys.dart file as utf-8 --- scripts/prebuild.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/prebuild.ps1 b/scripts/prebuild.ps1 index 6618378ee..34b9b8771 100644 --- a/scripts/prebuild.ps1 +++ b/scripts/prebuild.ps1 @@ -2,7 +2,7 @@ $KEYS = "..\lib\external_api_keys.dart" if (-not (Test-Path $KEYS)) { Write-Host "prebuild.ps1: creating template lib/external_api_keys.dart file" - "const kChangeNowApiKey = "";" + "`nconst kSimpleSwapApiKey = "";" | Out-File $KEYS + "const kChangeNowApiKey = '';" + "`nconst kSimpleSwapApiKey = '';" | Out-File $KEYS -Encoding UTF8 } # Create template wallet test parameter files if they don't already exist From d78972307c2fbb3c11e0e2b0c95260063218c3bd Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Mon, 5 Jun 2023 14:56:53 -0700 Subject: [PATCH 51/54] encode wallet test parameters files as utf-8 --- scripts/prebuild.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/prebuild.ps1 b/scripts/prebuild.ps1 index 34b9b8771..80a6991b7 100644 --- a/scripts/prebuild.ps1 +++ b/scripts/prebuild.ps1 @@ -12,6 +12,6 @@ foreach ($coin in $coins) { $WALLETTESTPARAMFILE = "..\test\services\coins\$coin\${coin}_wallet_test_parameters.dart" if (-not (Test-Path $WALLETTESTPARAMFILE)) { Write-Host "prebuild.ps1: creating template test/services/coins/$coin/${coin}_wallet_test_parameters.dart file" - "const TEST_MNEMONIC = "";" + "`nconst ROOT_WIF = "";" + "`nconst NODE_WIF_84 = "";" | Out-File -FilePath $WALLETTESTPARAMFILE + "const TEST_MNEMONIC = "";" + "`nconst ROOT_WIF = "";" + "`nconst NODE_WIF_84 = "";" | Out-File -FilePath $WALLETTESTPARAMFILE -Encoding UTF8 } } From 8740f97ca06910dc692f3e6898e49074d616e277 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Mon, 5 Jun 2023 15:03:42 -0700 Subject: [PATCH 52/54] update docs wrt windows 10 sdk --- docs/building.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/building.md b/docs/building.md index 9f081da2e..ec85cfad4 100644 --- a/docs/building.md +++ b/docs/building.md @@ -150,7 +150,7 @@ Set up Ubuntu 20.04 in WSL2. Follow the entire Linux host section to get set up Install Flutter 3.7.12 on your Windows host (not in WSL2) by following these instructions: https://docs.flutter.dev/get-started/install/windows or by running `scripts/windows/deps.ps1`. You may still have to add `C:\development\flutter\bin` to PATH before proceeding, even if you ran `deps.ps1`. Run `flutter doctor` in PowerShell to confirm its installation. ### Dependencies -Install the Windows SDK: https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/ +Install the Windows SDK: https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/ You may need to install the [Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/), which can be installed [by Visual Studio](https://stackoverflow.com/a/73923899) (`Tools > Get Tools and Features... > Individual Components > Windows 10 SDK`) Enable Developer Mode for symlink support, ``` From bb13c7e90a529c9c365509e067749fd800e1c7cf Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Mon, 5 Jun 2023 15:17:34 -0700 Subject: [PATCH 53/54] update docs wrt Visual Studio --- docs/building.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/building.md b/docs/building.md index ec85cfad4..df4374797 100644 --- a/docs/building.md +++ b/docs/building.md @@ -150,7 +150,7 @@ Set up Ubuntu 20.04 in WSL2. Follow the entire Linux host section to get set up Install Flutter 3.7.12 on your Windows host (not in WSL2) by following these instructions: https://docs.flutter.dev/get-started/install/windows or by running `scripts/windows/deps.ps1`. You may still have to add `C:\development\flutter\bin` to PATH before proceeding, even if you ran `deps.ps1`. Run `flutter doctor` in PowerShell to confirm its installation. ### Dependencies -Install the Windows SDK: https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/ You may need to install the [Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/), which can be installed [by Visual Studio](https://stackoverflow.com/a/73923899) (`Tools > Get Tools and Features... > Individual Components > Windows 10 SDK`) +Install the Windows SDK: https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/ You may need to install the [Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/), which can be installed [by Visual Studio](https://stackoverflow.com/a/73923899) (`Tools > Get Tools and Features... > Modify > Individual Components > Windows 10 SDK`) Enable Developer Mode for symlink support, ``` From 18e08a8cb7a08b1544c292045ac2aae1fd5c5fed Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Mon, 5 Jun 2023 15:19:50 -0700 Subject: [PATCH 54/54] do not start monero on windows --- lib/main.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index 8fa870214..08f29617a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -178,7 +178,9 @@ void main() async { } } - monero.onStartup(); + if (!Platform.isWindows) { + monero.onStartup(); + } if (!Platform.isLinux && !Platform.isWindows) { wownero.onStartup(); }