diff --git a/assets/svg/Polygon.svg b/assets/svg/Polygon.svg new file mode 100644 index 000000000..b79ac9bc3 --- /dev/null +++ b/assets/svg/Polygon.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/svg/box-auto.svg b/assets/svg/box-auto.svg new file mode 100644 index 000000000..1dd771fb1 --- /dev/null +++ b/assets/svg/box-auto.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/crypto_plugins/flutter_libmonero b/crypto_plugins/flutter_libmonero index 8e3afd002..f74f31e2f 160000 --- a/crypto_plugins/flutter_libmonero +++ b/crypto_plugins/flutter_libmonero @@ -1 +1 @@ -Subproject commit 8e3afd002968d21a3de788569356587a70818022 +Subproject commit f74f31e2f3b4a7c11907ae5df6cd38505cd25897 diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 6756e40c4..1ffbb9415 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -42,6 +42,25 @@ PODS: - Flutter - cw_shared_external/Sodium (0.0.1): - Flutter + - cw_wownero (0.0.2): + - cw_shared_external + - cw_wownero/Boost (= 0.0.2) + - cw_wownero/OpenSSL (= 0.0.2) + - cw_wownero/Sodium (= 0.0.2) + - cw_wownero/Wownero (= 0.0.2) + - Flutter + - cw_wownero/Boost (0.0.2): + - cw_shared_external + - Flutter + - cw_wownero/OpenSSL (0.0.2): + - cw_shared_external + - Flutter + - cw_wownero/Sodium (0.0.2): + - cw_shared_external + - Flutter + - cw_wownero/Wownero (0.0.2): + - cw_shared_external + - Flutter - devicelocale (0.0.1): - Flutter - DKImagePickerController/Core (4.3.4): @@ -127,6 +146,7 @@ DEPENDENCIES: - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - cw_monero (from `.symlinks/plugins/cw_monero/ios`) - cw_shared_external (from `.symlinks/plugins/cw_shared_external/ios`) + - cw_wownero (from `.symlinks/plugins/cw_wownero/ios`) - devicelocale (from `.symlinks/plugins/devicelocale/ios`) - file_picker (from `.symlinks/plugins/file_picker/ios`) - Flutter (from `Flutter`) @@ -169,6 +189,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/cw_monero/ios" cw_shared_external: :path: ".symlinks/plugins/cw_shared_external/ios" + cw_wownero: + :path: ".symlinks/plugins/cw_wownero/ios" devicelocale: :path: ".symlinks/plugins/devicelocale/ios" file_picker: @@ -216,6 +238,7 @@ SPEC CHECKSUMS: connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e cw_monero: 9816991daff0e3ad0a8be140e31933b5526babd4 cw_shared_external: 2972d872b8917603478117c9957dfca611845a92 + cw_wownero: 08e5713fe311a3be95efd7f3c1bf9d47d9cfafde devicelocale: b22617f40038496deffba44747101255cee005b0 DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 1bfb53e8d..98c80851c 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ @@ -253,6 +253,7 @@ "${BUILT_PRODUCTS_DIR}/connectivity_plus/connectivity_plus.framework", "${BUILT_PRODUCTS_DIR}/cw_monero/cw_monero.framework", "${BUILT_PRODUCTS_DIR}/cw_shared_external/cw_shared_external.framework", + "${BUILT_PRODUCTS_DIR}/cw_wownero/cw_wownero.framework", "${BUILT_PRODUCTS_DIR}/devicelocale/devicelocale.framework", "${BUILT_PRODUCTS_DIR}/file_picker/file_picker.framework", "${BUILT_PRODUCTS_DIR}/flutter_libmonero/flutter_libmonero.framework", @@ -285,6 +286,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity_plus.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cw_monero.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cw_shared_external.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cw_wownero.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/devicelocale.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/file_picker.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_libmonero.framework", diff --git a/lib/main.dart b/lib/main.dart index 0be26c39e..da08c6765 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -84,6 +84,10 @@ void main() async { if (Platform.isIOS) { appDirectory = (await getLibraryDirectory()); } + if (Platform.isLinux || Logging.isArmLinux) { + appDirectory = Directory("${appDirectory.path}/.stackwallet"); + await appDirectory.create(); + } // FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding); if (!(Logging.isArmLinux || Logging.isTestEnv)) { final isar = await Isar.open( diff --git a/lib/pages/wallets_view/sub_widgets/empty_wallets.dart b/lib/pages/wallets_view/sub_widgets/empty_wallets.dart index 4309186ac..8691b7d84 100644 --- a/lib/pages/wallets_view/sub_widgets/empty_wallets.dart +++ b/lib/pages/wallets_view/sub_widgets/empty_wallets.dart @@ -96,7 +96,14 @@ class AddWalletButton extends StatelessWidget { .extension()! .getPrimaryEnabledButtonColor(context), onPressed: () { - Navigator.of(context).pushNamed(AddWalletView.routeName); + if (isDesktop) { + Navigator.of( + context, + rootNavigator: true, + ).pushNamed(AddWalletView.routeName); + } else { + Navigator.of(context).pushNamed(AddWalletView.routeName); + } }, child: Center( child: Container( diff --git a/lib/pages_desktop_specific/home/settings_view/settings_view.dart b/lib/pages_desktop_specific/home/settings_view/settings_view.dart new file mode 100644 index 000000000..c308f2962 --- /dev/null +++ b/lib/pages_desktop_specific/home/settings_view/settings_view.dart @@ -0,0 +1,20 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class SettingsView extends ConsumerStatefulWidget { + const SettingsView({Key? key}) : super(key: key); + + static const String routeName = "/settingsView"; + + @override + ConsumerState createState() => _SettingsView(); +} + +class _SettingsView extends ConsumerState { + @override + Widget build(BuildContext context) { + debugPrint("BUILD: $runtimeType"); + // TODO: implement build + throw UnimplementedError(); + } +} diff --git a/lib/services/coins/epiccash/epiccash_wallet.dart b/lib/services/coins/epiccash/epiccash_wallet.dart index e33428319..112e6c176 100644 --- a/lib/services/coins/epiccash/epiccash_wallet.dart +++ b/lib/services/coins/epiccash/epiccash_wallet.dart @@ -259,6 +259,9 @@ Future deleteEpicWallet({ if (Platform.isIOS) { appDir = (await getLibraryDirectory()); } + if (Platform.isLinux) { + appDir = Directory("${appDir.path}/.stackwallet"); + } final path = "${appDir.path}/epiccash"; final String name = walletId; @@ -1232,6 +1235,9 @@ class EpicCashWallet extends CoinServiceAPI { if (Platform.isIOS) { appDir = (await getLibraryDirectory()); } + if (Platform.isLinux) { + appDir = Directory("${appDir.path}/.stackwallet"); + } final path = "${appDir.path}/epiccash"; final String name = _walletId.trim(); return '$path/$name'; diff --git a/lib/services/coins/monero/monero_wallet.dart b/lib/services/coins/monero/monero_wallet.dart index b63e711a4..2488acc50 100644 --- a/lib/services/coins/monero/monero_wallet.dart +++ b/lib/services/coins/monero/monero_wallet.dart @@ -910,6 +910,10 @@ class MoneroWallet extends CoinServiceAPI { if (Platform.isIOS) { root = (await getLibraryDirectory()); } + // + if (Platform.isLinux) { + root = Directory("${root.path}/.stackwallet"); + } final prefix = walletTypeToString(type).toLowerCase(); final walletsDir = Directory('${root.path}/wallets'); final walletDire = Directory('${walletsDir.path}/$prefix/$name'); diff --git a/lib/services/coins/wownero/wownero_wallet.dart b/lib/services/coins/wownero/wownero_wallet.dart index 4f7cf9706..b284c8733 100644 --- a/lib/services/coins/wownero/wownero_wallet.dart +++ b/lib/services/coins/wownero/wownero_wallet.dart @@ -51,7 +51,7 @@ import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'; import 'package:stackwallet/utilities/logger.dart'; import 'package:stackwallet/utilities/prefs.dart'; -const int MINIMUM_CONFIRMATIONS = 4; +const int MINIMUM_CONFIRMATIONS = 10; //https://github.com/wownero-project/wownero/blob/8361d60aef6e17908658128284899e3a11d808d4/src/cryptonote_config.h#L162 const String GENESIS_HASH_MAINNET = @@ -913,6 +913,9 @@ class WowneroWallet extends CoinServiceAPI { if (Platform.isIOS) { root = (await getLibraryDirectory()); } + if (Platform.isLinux) { + root = Directory("${root.path}/.stackwallet"); + } final prefix = walletTypeToString(type).toLowerCase(); final walletsDir = Directory('${root.path}/wallets'); final walletDire = Directory('${walletsDir.path}/$prefix/$name'); diff --git a/lib/utilities/assets.dart b/lib/utilities/assets.dart index 94558e623..1b38f42bc 100644 --- a/lib/utilities/assets.dart +++ b/lib/utilities/assets.dart @@ -51,7 +51,9 @@ class _SVG { String txExchangeFailed(BuildContext context) => "assets/svg/${Theme.of(context).extension()!.themeType.name}/tx-exchange-icon-failed.svg"; + String get polygon => "assets/svg/Polygon.svg"; String get drd => "assets/svg/drd-icon.svg"; + String get boxAuto => "assets/svg/box-auto.svg"; String get plus => "assets/svg/plus.svg"; String get gear => "assets/svg/gear.svg"; String get bell => "assets/svg/bell.svg"; diff --git a/lib/utilities/text_styles.dart b/lib/utilities/text_styles.dart index 7c6aa2aaf..21a1ee488 100644 --- a/lib/utilities/text_styles.dart +++ b/lib/utilities/text_styles.dart @@ -698,6 +698,25 @@ class STextStyles { } } + static TextStyle desktopTextExtraExtraSmall(BuildContext context) { + switch (_theme(context).themeType) { + case ThemeType.light: + return GoogleFonts.inter( + color: _theme(context).textSubtitle1, + fontWeight: FontWeight.w500, + fontSize: 14, + height: 21 / 14, + ); + case ThemeType.dark: + return GoogleFonts.inter( + color: _theme(context).textSubtitle1, + fontWeight: FontWeight.w500, + fontSize: 14, + height: 21 / 14, + ); + } + } + static TextStyle desktopButtonSmallSecondaryEnabled(BuildContext context) { switch (_theme(context).themeType) { case ThemeType.light: diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 12d9f1f71..53391e7ad 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -137,6 +137,9 @@ install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../crypto_plugins/flutter_libmonero/scripts/linux/build/libcw_monero.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../crypto_plugins/flutter_libmonero/scripts/linux/build/libcw_wownero.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../crypto_plugins/flutter_libepiccash/scripts/linux/build/rust/target/x86_64-unknown-linux-gnu/release/libepic_cash_wallet.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig index c2efd0b60..4b81f9b2d 100644 --- a/macos/Flutter/Flutter-Debug.xcconfig +++ b/macos/Flutter/Flutter-Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig index c2efd0b60..5caa9d157 100644 --- a/macos/Flutter/Flutter-Release.xcconfig +++ b/macos/Flutter/Flutter-Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Podfile b/macos/Podfile new file mode 100644 index 000000000..dade8dfad --- /dev/null +++ b/macos/Podfile @@ -0,0 +1,40 @@ +platform :osx, '10.11' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/pubspec.yaml b/pubspec.yaml index 3d0ae5a4b..eb41dc0d5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -289,6 +289,7 @@ flutter: - assets/svg/tx-icon-anonymize.svg - assets/svg/tx-icon-anonymize-pending.svg - assets/svg/tx-icon-anonymize-failed.svg + - assets/svg/Polygon.svg # coin icons - assets/svg/coin_icons/Bitcoin.svg - assets/svg/coin_icons/Bitcoincash.svg @@ -312,6 +313,7 @@ flutter: - assets/svg/exchange-3.svg - assets/svg/message-question-1.svg - assets/svg/drd-icon.svg + - assets/svg/box-auto.svg # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware.