What changed, and why it matters
This commit adds Windows support to a cryptocurrency wallet app. It includes platform-specific paths, notification settings, and precompiled Windows DLL files for Monero wallet operations. There is no direct evidence in the commit message or diff of a security vulnerability being fixed or introduced. The main security-relevant observation is that three binary DLL files are added to the repository without source code or build provenance, which could raise supply-chain trust concerns, but the commit itself does not claim they are malicious or compromised.
Treat this as a platform-portability commit rather than a security patch. If reviewing for release, verify the integrity and origin of the three precompiled Windows DLLs (monero_libwallet2_api_c.dll, libwinpthread-1.dll, libssp-0.dll) through checksums, reproducible builds, or vendor-signed artifacts. Confirm that restricting app-lock to mobile platforms is an intentional product decision and not a regression in desktop security posture.
Security signals we found
Binary DLLs added without source or provenance information
App data directory path now resolves from %APPDATA% on Windows
App lock UI setting restricted to Android/iOS only
No explicit security claim in commit title or message
Evidence from the diff
The patch enables Windows builds for the Flutter-based Skylight Wallet. Changes include: initializing notifications on Windows, adding Windows app data directory resolution (%APPDATA%/MAGIC Grants/Skylight Wallet), gating the app-lock setting to mobile platforms only, adding Windows icon generation, and bundling three binary DLLs (monero_libwallet2_api_c.dll, libwinpthread-1.dll, libssp-0.dll) via CMake install rules. The commit removes an unsupported MSVC compiler flag (-Wno-deprecated). No explicit security fix or vulnerability is described.
Changed components
lib/main.dartlib/screens/settings.dartlib/services/notifications_service.dartlib/util/dirs.dartwindows/CMakeLists.txtwindows/runner/Runner.rcwindows/runner/main.cppwindows/monero_libwallet2_api_c.dllwindows/libwinpthread-1.dllwindows/libssp-0.dllInspect captured patch +60 / −12
diff --git a/assets/app_icon.ico b/assets/app_icon.ico
new file mode 100644
index 0000000..4ef880b
Binary files /dev/null and b/assets/app_icon.ico differ
diff --git a/lib/main.dart b/lib/main.dart
index c1b3850..bdf051b 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -65,6 +65,11 @@ void main() async {
if (Platform.isLinux) {
await createAppDir();
+ NotificationService().init();
+ }
+
+ if (Platform.isWindows) {
+ NotificationService().init();
}
if (Platform.isAndroid) {
diff --git a/lib/screens/settings.dart b/lib/screens/settings.dart
index e54531d..5e736ce 100644
--- a/lib/screens/settings.dart
+++ b/lib/screens/settings.dart
@@ -470,13 +470,14 @@ class _SettingsScreenState extends State<SettingsScreen> {
),
],
),
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Text(i18n.settingsAppLockLabel, style: TextStyle(fontSize: 18)),
- Switch(value: _appLockEnabled, onChanged: _setAppLockEnabled),
- ],
- ),
+ if (Platform.isAndroid || Platform.isIOS)
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Text(i18n.settingsAppLockLabel, style: TextStyle(fontSize: 18)),
+ Switch(value: _appLockEnabled, onChanged: _setAppLockEnabled),
+ ],
+ ),
if (Platform.isAndroid)
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
diff --git a/lib/services/notifications_service.dart b/lib/services/notifications_service.dart
index c712afc..98e7ad1 100644
--- a/lib/services/notifications_service.dart
+++ b/lib/services/notifications_service.dart
@@ -1,5 +1,6 @@
import 'dart:io';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
+import 'package:path/path.dart' as p;
class NotificationService {
final notificationsPlugin = FlutterLocalNotificationsPlugin();
@@ -14,10 +15,21 @@ class NotificationService {
);
const initSettingsLinux = LinuxInitializationSettings(defaultActionName: 'Open wallet');
- const initSettings = InitializationSettings(
+ // Windows requires an absolute path to an .ico file
+ final initSettingsWindows = WindowsInitializationSettings(
+ appName: 'Skylight Wallet',
+ appUserModelId: 'org.magicgrants.skylight',
+ guid: '6dcf17a9-fb5f-4f47-b0b9-6d655e90adbf',
+ iconPath: Platform.isWindows
+ ? p.join(p.dirname(Platform.resolvedExecutable), 'data', 'flutter_assets', 'assets', 'app_icon.ico')
+ : null,
+ );
+
+ final initSettings = InitializationSettings(
android: initSettingsAndroid,
iOS: initSettingsIOS,
linux: initSettingsLinux,
+ windows: initSettingsWindows,
);
await notificationsPlugin.initialize(initSettings);
diff --git a/lib/util/dirs.dart b/lib/util/dirs.dart
index a82a264..cb63466 100644
--- a/lib/util/dirs.dart
+++ b/lib/util/dirs.dart
@@ -49,6 +49,14 @@ Future<Directory> getAppDir() async {
} else {
throw Exception('HOME environment variable is not set');
}
+ } else if (Platform.isWindows) {
+ final appData = Platform.environment['APPDATA'];
+
+ if (appData != null) {
+ appDir = Directory('$appData/MAGIC Grants/Skylight Wallet');
+ } else {
+ throw Exception('APPDATA environment variable is not set');
+ }
}
return appDir;
diff --git a/pubspec.yaml b/pubspec.yaml
index e2a5469..9ed64d6 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -24,6 +24,10 @@ environment:
flutter_launcher_icons:
android: true
ios: true
+ windows:
+ generate: true
+ image_path: "assets/launcher_icon.png"
+ icon_size: 48
image_path: "assets/launcher_icon.png"
adaptive_icon_background: "#263F5F"
adaptive_icon_foreground: "assets/launcher_icon.png"
@@ -111,6 +115,7 @@ flutter:
assets:
- assets/icons/
- assets/cacert.pem
+ - assets/app_icon.ico
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/to/resolution-aware-images
diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt
index 810cf02..ae36364 100644
--- a/windows/CMakeLists.txt
+++ b/windows/CMakeLists.txt
@@ -43,7 +43,6 @@ function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_options(${TARGET} PRIVATE /EHsc)
target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
target_compile_definitions(${TARGET} PRIVATE "$<$<CONFIG:Debug>:_DEBUG>")
- target_compile_options(${TARGET} PRIVATE -Wno-deprecated)
endfunction()
# Flutter library and tool build rules.
@@ -94,6 +93,24 @@ install(DIRECTORY "${NATIVE_ASSETS_DIR}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
+# Install monero_libwallet2_api_c.dll and its MinGW runtime dependencies
+set(MONERO_LIB "${CMAKE_CURRENT_SOURCE_DIR}/monero_libwallet2_api_c.dll")
+if(EXISTS "${MONERO_LIB}")
+ install(FILES "${MONERO_LIB}"
+ DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
+ COMPONENT Runtime)
+endif()
+
+# MinGW runtime DLLs required by monero_libwallet2_api_c.dll
+foreach(MINGW_DLL libwinpthread-1.dll libssp-0.dll)
+ set(MINGW_DLL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${MINGW_DLL}")
+ if(EXISTS "${MINGW_DLL_PATH}")
+ install(FILES "${MINGW_DLL_PATH}"
+ DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
+ COMPONENT Runtime)
+ endif()
+endforeach()
+
# Fully re-copy the assets directory on each build to avoid having stale files
# from a previous install.
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
diff --git a/windows/libssp-0.dll b/windows/libssp-0.dll
new file mode 100644
index 0000000..a7da3aa
Binary files /dev/null and b/windows/libssp-0.dll differ
diff --git a/windows/libwinpthread-1.dll b/windows/libwinpthread-1.dll
new file mode 100644
index 0000000..d87e531
Binary files /dev/null and b/windows/libwinpthread-1.dll differ
diff --git a/windows/monero_libwallet2_api_c.dll b/windows/monero_libwallet2_api_c.dll
new file mode 100644
index 0000000..1feca8b
Binary files /dev/null and b/windows/monero_libwallet2_api_c.dll differ
diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc
index 497e171..49d93ce 100644
--- a/windows/runner/Runner.rc
+++ b/windows/runner/Runner.rc
@@ -90,12 +90,12 @@ BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "MAGIC Grants" "\0"
- VALUE "FileDescription", "skylight_wallet" "\0"
+ VALUE "FileDescription", "Skylight Wallet" "\0"
VALUE "FileVersion", VERSION_AS_STRING "\0"
VALUE "InternalName", "skylight_wallet" "\0"
VALUE "LegalCopyright", "Copyright (C) 2025 MAGIC Grants. All rights reserved." "\0"
VALUE "OriginalFilename", "skylight_wallet.exe" "\0"
- VALUE "ProductName", "skylight_wallet" "\0"
+ VALUE "ProductName", "Skylight Wallet" "\0"
VALUE "ProductVersion", VERSION_AS_STRING "\0"
END
END
diff --git a/windows/runner/main.cpp b/windows/runner/main.cpp
index 1b3974e..241c9ed 100644
--- a/windows/runner/main.cpp
+++ b/windows/runner/main.cpp
@@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
FlutterWindow window(project);
Win32Window::Point origin(10, 10);
Win32Window::Size size(1280, 720);
- if (!window.Create(L"skylight_wallet", origin, size)) {
+ if (!window.Create(L"Skylight Wallet", origin, size)) {
return EXIT_FAILURE;
}
window.SetQuitOnClose(true);
diff --git a/windows/runner/resources/app_icon.ico b/windows/runner/resources/app_icon.ico
index c04e20c..4ef880b 100644
Binary files a/windows/runner/resources/app_icon.ico and b/windows/runner/resources/app_icon.ico differ
Why this scored 18/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.