mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-22 10:34:32 +00:00
Merge pull request #121 from cypherstack/desktop
Desktop update + building fixes
This commit is contained in:
commit
9edae36c3b
18 changed files with 155 additions and 4 deletions
3
assets/svg/Polygon.svg
Normal file
3
assets/svg/Polygon.svg
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg width="8" height="11" viewBox="0 0 8 11" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6.83473 4.89146C7.24557 5.21575 7.24557 5.78425 6.83473 6.10854L1.53567 10.2914C0.941523 10.7604 -3.48066e-08 10.3873 0 9.68284L4.13348e-07 1.31716C4.48155e-07 0.612725 0.941523 0.239629 1.53567 0.708624L6.83473 4.89146Z" fill="#0056D2"/>
|
||||
</svg>
|
After Width: | Height: | Size: 350 B |
11
assets/svg/box-auto.svg
Normal file
11
assets/svg/box-auto.svg
Normal file
|
@ -0,0 +1,11 @@
|
|||
<svg width="26" height="22" viewBox="0 0 26 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_5432_15256)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.1875 1.8125H1.8125C1.08693 1.8125 0.5 2.39943 0.5 3.125V5.09375C0.5 5.45469 0.79482 5.75 1.15625 5.75H20.8438C21.2047 5.75 21.5 5.45469 21.5 5.09375V3.125C21.5 2.39943 20.9135 1.8125 20.1875 1.8125ZM1.8125 18.2188C1.8125 19.3057 2.69393 20.1875 3.78125 20.1875H14.145C13.1157 18.9035 12.5 17.2737 12.5 15.5C12.5 11.3579 15.8579 8 20 8C20.0627 8 20.1252 8.00077 20.1875 8.0023V7.0625H1.8125V18.2188ZM7.0625 10.1797C7.0625 9.90899 7.28398 9.6875 7.55469 9.6875H12.9C13.0933 9.6875 13.25 9.8442 13.25 10.0375V10.65C13.25 10.8433 13.0933 11 12.9 11H7.55469C7.28398 11 7.0625 10.7785 7.0625 10.5078V10.1797Z" fill="black"/>
|
||||
<path d="M14 15.5C14 12.1859 16.6859 9.5 20 9.5C23.3141 9.5 26 12.1859 26 15.5C26 18.8141 23.3141 21.5 20 21.5C16.6859 21.5 14 18.8141 14 15.5ZM22.7141 14.4641C22.9695 14.2086 22.9695 13.7914 22.7141 13.5359C22.4586 13.2805 22.0414 13.2805 21.7859 13.5359L19.25 16.0719L18.2141 15.0359C17.9586 14.7805 17.5414 14.7805 17.2859 15.0359C17.0305 15.2914 17.0305 15.7086 17.2859 15.9641L18.7859 17.4641C19.0414 17.7195 19.4586 17.7195 19.7141 17.4641L22.7141 14.4641Z" fill="black"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_5432_15256">
|
||||
<rect width="25.5" height="21" fill="white" transform="translate(0.5 0.5)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
|
@ -1 +1 @@
|
|||
Subproject commit 8e3afd002968d21a3de788569356587a70818022
|
||||
Subproject commit f74f31e2f3b4a7c11907ae5df6cd38505cd25897
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
|
||||
|
@ -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';
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||
|
|
40
macos/Podfile
Normal file
40
macos/Podfile
Normal file
|
@ -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
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue