Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions assets/svg/Polygon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions assets/svg/box-auto.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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`)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 50;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
9 changes: 8 additions & 1 deletion lib/pages/wallets_view/sub_widgets/empty_wallets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,14 @@ class AddWalletButton extends StatelessWidget {
.extension<StackColors>()!
.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(
Expand Down
20 changes: 20 additions & 0 deletions lib/pages_desktop_specific/home/settings_view/settings_view.dart
Original file line number Diff line number Diff line change
@@ -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<SettingsView> createState() => _SettingsView();
}

class _SettingsView extends ConsumerState<SettingsView> {
@override
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
// TODO: implement build
throw UnimplementedError();
}
}
6 changes: 6 additions & 0 deletions lib/services/coins/epiccash/epiccash_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ Future<String> deleteEpicWallet({
if (Platform.isIOS) {
appDir = (await getLibraryDirectory());
}
if (Platform.isLinux) {
appDir = Directory("${appDir.path}/.stackwallet");
}
final path = "${appDir.path}/epiccash";
final String name = walletId;

Expand Down Expand Up @@ -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';
Expand Down
4 changes: 4 additions & 0 deletions lib/services/coins/monero/monero_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
5 changes: 4 additions & 1 deletion lib/services/coins/wownero/wownero_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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');
Expand Down
2 changes: 2 additions & 0 deletions lib/utilities/assets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ class _SVG {
String txExchangeFailed(BuildContext context) =>
"assets/svg/${Theme.of(context).extension<StackColors>()!.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";
Expand Down
19 changes: 19 additions & 0 deletions lib/utilities/text_styles.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions macos/Flutter/Flutter-Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
1 change: 1 addition & 0 deletions macos/Flutter/Flutter-Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
40 changes: 40 additions & 0 deletions macos/Podfile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down