Skip to content
Merged

Various #1217

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
4300526
dart format
julian-CStack Oct 21, 2025
5c37b6b
separate swb file saving from encryption call, enable android swb fil…
julian-CStack Oct 21, 2025
1311e23
use SAF (lol) for some android stuff
julian-CStack Oct 22, 2025
2fa0f5b
ensure eth wallet is fully synced/refreshed before first refresh of a…
julian-CStack Oct 22, 2025
8d48d7a
WIP: basic electrum mnemonic utils
julian-CStack Oct 23, 2025
cb198ed
dart autoformat
julian-CStack Oct 24, 2025
ff9e8f0
ensure tor singleton
julian-CStack Oct 25, 2025
6ccf4fe
Merge remote-tracking branch 'origin/staging' into various
julian-CStack Oct 25, 2025
28cacaa
fix: mwc list position
julian-CStack Oct 30, 2025
1a30f6f
fix(win/linux): mwc var in cmake templates
julian-CStack Oct 30, 2025
5a99a33
Merge branch 'staging' into various
julian-CStack Oct 31, 2025
3bc921f
ensure if a certain app coin is not found that the price call still w…
julian-CStack Oct 31, 2025
30730b8
standalone mwebd for windows
julian-CStack Oct 31, 2025
8a0f78e
basic message signing
julian-CStack Nov 4, 2025
dd67c85
optimize/cleanup electrumx_interface wallet addresses saved on recove…
julian-CStack Nov 4, 2025
3e6291c
bitcoin legacy address toggle option
julian-CStack Nov 5, 2025
8ae4f2e
replace mobile_scanner with an older library that does not use MLKit …
julian-CStack Nov 5, 2025
dc1cca5
try to ensure only one pop occurs
julian-CStack Nov 5, 2025
2bc2792
fix android SAF SWB
julian-CStack Nov 5, 2025
2cdf670
fix logical issue
julian-CStack Nov 5, 2025
27b1675
"fix" windows not fully exiting on close
julian-CStack Nov 6, 2025
aafef39
windows mwebd.exe verification fix
julian-CStack Nov 6, 2025
eb200ee
const HTTP constructor
julian-CStack Nov 6, 2025
384e140
temp fix text overflow on desktop
julian-CStack Nov 6, 2025
b60fd0f
update native linux entry point
julian-CStack Nov 6, 2025
6e12222
https://github.com/cypherstack/stack_wallet/issues/1211
julian-CStack Nov 6, 2025
c25c0ef
only stream newly added mwebd logs
julian-CStack Nov 6, 2025
0a8b7a4
use mobile_app_privacy
julian-CStack Nov 7, 2025
e1cb7bf
update cs_monero
julian-CStack Nov 12, 2025
7586513
fix spark names not showing as confirmed in names view
julian-CStack Nov 13, 2025
2dcd2b3
SWB tweaks/fixes
julian-CStack Nov 13, 2025
3ca1bfc
fix switch on inherited type
julian-CStack Nov 13, 2025
8f7822d
update min flutter version
julian-CStack Nov 13, 2025
f2b0463
update android build
julian-CStack Nov 14, 2025
e593452
remove unused dependency
julian-CStack Nov 14, 2025
b052871
dependency update spree
julian-CStack Nov 17, 2025
55bb2cb
update epic node
julian-CStack Nov 17, 2025
952f1f6
fix mobile splash colors
julian-CStack Nov 17, 2025
fe69772
mobile splash generated assets cleanup
julian-CStack Nov 17, 2025
243aff1
fix custom mwc mnemonic length null error
julian-CStack Nov 17, 2025
94b0489
set IME_FLAG_NO_PERSONALIZED_LEARNING for mnemonic words entry textfi…
julian-CStack Nov 17, 2025
56cd4b1
set dart lint lines_longer_than_80_chars explicitly
julian-CStack Nov 17, 2025
cce9faa
Merge branch 'staging' into various
julian-CStack Nov 18, 2025
cdc2e04
clean up merge conflicts
julian-CStack Nov 18, 2025
e6f1773
fix missing import
julian-CStack Nov 18, 2025
663e83c
remove dead code
julian-CStack Nov 18, 2025
3d23ec0
make spark names visible again without going into "more"
julian-CStack Nov 18, 2025
1d0d790
disable redundant call to init()
julian-CStack Nov 18, 2025
a496074
update destination address for spark name registration fees
julian-CStack Nov 18, 2025
0cbb45b
various firo view only wallet tweaks
julian-CStack Nov 18, 2025
12078b7
fix spark change address getter
julian-CStack Nov 18, 2025
885709b
disable buy option of spark names in view only wallet (and hide names…
julian-CStack Nov 18, 2025
2cdfec9
remove unnecessary logging call
julian-CStack Nov 19, 2025
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ pubspec.yaml
/android/app/src/main/profile/AndroidManifest.xml
/android/app/src/main/kotlin/com/cypherstack/stackwallet/MainActivity.kt
/android/app/src/main/res/**/ic_launcher.png
/android/app/src/main/res/**/splash.png

/ios/Runner/Info.plist
/ios/Runner.xcodeproj/project.pbxproj
Expand Down Expand Up @@ -122,3 +123,6 @@ lib/wl_gen/generated/
/linux/flutter/generated_plugins.cmake
/windows/flutter/generated_plugins.cmake
/macos/Flutter/GeneratedPluginRegistrant.swift

/assets/windows/mwebd.exe
/tool/build
1 change: 1 addition & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ linter:
constant_identifier_names: false
prefer_final_locals: true
prefer_final_in_for_each: true
lines_longer_than_80_chars: true
# require_trailing_commas: true // causes issues with dart 3.7
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
Expand Down
7 changes: 6 additions & 1 deletion android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,9 @@
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken

# required for flutter file_picker
-keep class androidx.lifecycle.DefaultLifecycleObserver
-keep class androidx.lifecycle.DefaultLifecycleObserver

# required for flutter_secure_storage
-dontwarn com.google.errorprone.annotations.**
-dontwarn javax.annotation.Nullable
-dontwarn javax.annotation.concurrent.GuardedBy
Binary file removed android/app/src/main/res/drawable-hdpi/splash.png
Binary file not shown.
Binary file removed android/app/src/main/res/drawable-mdpi/splash.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
</item>
<item>
<bitmap android:gravity="center" android:src="@drawable/splash"/>
</item>
</layer-list>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions android/app/src/main/res/drawable-night/launch_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
</item>
<item>
<bitmap android:gravity="center" android:src="@drawable/splash"/>
</item>
</layer-list>
Binary file modified android/app/src/main/res/drawable-v21/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
<item>
<bitmap android:gravity="center" android:src="@drawable/splash"/>
</item>
</layer-list>
</layer-list>
Binary file removed android/app/src/main/res/drawable-xhdpi/splash.png
Binary file not shown.
Binary file removed android/app/src/main/res/drawable-xxhdpi/splash.png
Binary file not shown.
Binary file removed android/app/src/main/res/drawable-xxxhdpi/splash.png
Binary file not shown.
Binary file modified android/app/src/main/res/drawable/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion android/app/src/main/res/drawable/launch_background.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
<item>
<bitmap android:gravity="center" android:src="@drawable/splash"/>
</item>
</layer-list>
</layer-list>
3 changes: 0 additions & 3 deletions android/app/src/main/res/raw/keep.xml

This file was deleted.

20 changes: 20 additions & 0 deletions android/app/src/main/res/values-night-v31/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:windowSplashScreenBackground">#2A2D34</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.

This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
22 changes: 22 additions & 0 deletions android/app/src/main/res/values-night/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
5 changes: 3 additions & 2 deletions android/app/src/main/res/values-v31/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowSplashScreenBackground">#F7F7F7</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:windowSplashScreenBackground">#F7F7F7</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Expand All @@ -16,4 +17,4 @@
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
</resources>
4 changes: 0 additions & 4 deletions android/app/src/main/res/values/colors.xml

This file was deleted.

18 changes: 15 additions & 3 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.

This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
</resources>
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.7.0' apply false
id "com.android.application" version '8.11.1' apply false
id "org.jetbrains.kotlin.android" version "2.2.20" apply false
}

Expand Down
11 changes: 6 additions & 5 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Here you will find instructions on how to install the necessary tools for buildi

## Prerequisites

- The only OS supported for building Android and Linux desktop is Ubuntu 20.04. Windows builds require using Ubuntu 20.04 on WSL2. macOS builds for itself and iOS. 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 24.04. Windows builds require using Ubuntu 24.04 on WSL2. macOS builds for itself and iOS. 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 go: [https://go.dev/doc/install](https://go.dev/doc/install)
Expand Down Expand Up @@ -77,12 +77,12 @@ pip3 install --upgrade meson==0.64.1 markdown==3.4.1 markupsafe==2.1.1 jinja2==3
```

### Flutter
Install Flutter 3.29.2 by [following their guide](https://docs.flutter.dev/get-started/install/linux/desktop?tab=download#install-the-flutter-sdk). You can also clone https://github.com/flutter/flutter, check out the `3.29.2` tag, and add its `flutter/bin` folder to your PATH as in
Install Flutter 3.35.7 by [following their guide](https://docs.flutter.dev/get-started/install/linux/desktop?tab=download#install-the-flutter-sdk). You can also clone https://github.com/flutter/flutter, check out the `3.35.7` tag, and add its `flutter/bin` folder to your PATH as in
```sh
FLUTTER_DIR="$HOME/development/flutter"
git clone https://github.com/flutter/flutter.git "$FLUTTER_DIR"
cd "$FLUTTER_DIR"
git checkout 3.29.2
git checkout 3.35.7
echo 'export PATH="$PATH:'"$FLUTTER_DIR"'/bin"' >> "$HOME/.profile"
source "$HOME/.profile"
flutter precache
Expand Down Expand Up @@ -165,6 +165,7 @@ cd scripts/windows
```

install go in WSL [https://go.dev/doc/install](https://go.dev/doc/install) (follow linux instructions) and ensure you have `x86_64-w64-mingw32-gcc`
go version should be at least 1.24

and use `scripts/build_app.sh` to build plugins:
```
Expand Down Expand Up @@ -292,13 +293,13 @@ If the DLLs were built on the WSL filesystem instead of on Windows, copy the res
Frostdart will be built by the Windows host later.

### Install Flutter on Windows host
Install Flutter 3.29.2 on your Windows host (not in WSL2) by [following their guide](https://docs.flutter.dev/get-started/install/windows/desktop?tab=download#install-the-flutter-sdk) or by cloning https://github.com/flutter/flutter, checking out the `3.29.2` tag, and adding its `flutter/bin` folder to your PATH as in
Install Flutter 3.35.7 on your Windows host (not in WSL2) by [following their guide](https://docs.flutter.dev/get-started/install/windows/desktop?tab=download#install-the-flutter-sdk) or by cloning https://github.com/flutter/flutter, checking out the `3.35.7` tag, and adding its `flutter/bin` folder to your PATH as in
```bat
@echo off
set "FLUTTER_DIR=%USERPROFILE%\development\flutter"
git clone https://github.com/flutter/flutter.git "%FLUTTER_DIR%"
cd /d "%FLUTTER_DIR%"
git checkout 3.29.2
git checkout 3.35.7
setx PATH "%PATH%;%FLUTTER_DIR%\bin"
echo Flutter setup completed. Please restart your command prompt.
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
"images" : [
{
"filename" : "background.png",
"idiom" : "universal",
"scale" : "1x"
"idiom" : "universal"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "darkbackground.png",
"idiom" : "universal"
}
],
"info" : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ios/Runner/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
<image name="LaunchImage" width="512" height="512"/>
<image name="LaunchBackground" width="1" height="1"/>
</resources>
</document>
</document>
2 changes: 2 additions & 0 deletions lib/app_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ abstract class AppConfig {

static const emptyWalletsMessage = _emptyWalletsMessage;

static const windowsMwebdExeHash = _mwebdExeHash;

static String get appDefaultDataDirName => _appDataDirName;
static String get shortDescriptionText => _shortDescriptionText;
static String get commitHash => _commitHash;
Expand Down
35 changes: 33 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:keyboard_dismisser/keyboard_dismisser.dart';
import 'package:logger/logger.dart';
import 'package:mobile_app_privacy/mobile_app_privacy.dart';
import 'package:path_provider/path_provider.dart';
import 'package:window_size/window_size.dart';

Expand Down Expand Up @@ -328,6 +329,10 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
with WidgetsBindingObserver {
static const platform = MethodChannel("STACK_WALLET_RESTORE");

final _mobileAppPrivacy = Platform.isAndroid || Platform.isIOS
? MobileAppPrivacy()
: null;

// late final Wallets _wallets;
// late final Prefs _prefs;
late final NotificationsService _notificationsService;
Expand Down Expand Up @@ -459,6 +464,11 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
});
}

if (Platform.isAndroid &&
ref.read(prefsChangeNotifierProvider).disableScreenShots) {
unawaited(_mobileAppPrivacy?.setFlagSecure(true));
}

String themeId;
if (ref.read(prefsChangeNotifierProvider).enableSystemBrightness) {
final brightness = WidgetsBinding.instance.window.platformBrightness;
Expand Down Expand Up @@ -554,7 +564,18 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
@override
void didChangeAppLifecycleState(AppLifecycleState state) async {
debugPrint("didChangeAppLifecycleState: ${state.name}");
if (state == AppLifecycleState.resumed) {}

if (state == AppLifecycleState.resumed) {
await _mobileAppPrivacy?.disableOverlay();
} else {
if (ref.read(prefsChangeNotifierProvider).privacyScreen) {
await _mobileAppPrivacy?.enableOverlay(
color: ref.read(themeProvider).popupBG, // only android, ios uses blur
blurInsteadOfColor: true, // ignored on android
);
}
}

switch (state) {
case AppLifecycleState.inactive:
break;
Expand Down Expand Up @@ -610,7 +631,10 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
@override
Future<AppExitResponse> didRequestAppExit() async {
debugPrint("didRequestAppExit called");
if (Platform.isMacOS) {
if (Platform.isMacOS || Platform.isWindows || Platform.isLinux) {
// Monero will cause app to stop responding if in the middle of doing
// things like a scan on the c++ side of things.

// On macOS, mwebd fails to shut down, hanging the app on close.
//
// Exiting is a hack fix for this issue.
Expand Down Expand Up @@ -691,6 +715,13 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
// addToDebugMessagesDB: false);
// });

if (Platform.isAndroid) {
ref.listen(
prefsChangeNotifierProvider.select((s) => s.disableScreenShots),
(_, next) => _mobileAppPrivacy?.setFlagSecure(next),
);
}

final colorScheme = ref.watch(colorProvider.state).state;

return MaterialApp(
Expand Down
Loading
Loading