Merge pull request #192 from MAGICGrants/fhse
What changed, and why it matters
This is a large feature merge for the Skylight Monero wallet. It adds FHSE (a security-key-based wallet encryption scheme), automatic metadata backups, memory-safety hardening, and changes how payment links and deep links are handled. Most changes are defensive: they strengthen authentication, reduce data exposure, and make backups more selective. A few changes slightly widen the attack surface—adding NFC/security-key support, iCloud backup, and a new payment-link channel—so they need careful review, but nothing in the diff itself shows an exploitable vulnerability.
Treat this as a significant security-sensitive feature release requiring focused review: audit the FHSE/security-key key ceremony and wallet-file encryption in wallet_fhse/fhse_native, verify PaymentLinks cannot be raced or replayed to bypass the lock screen, confirm backup scope excludes wallet/seed files on both platforms, and run static/dynamic analysis on the updated monero_c/wallet_core_glue native code. No immediate emergency patch is indicated by the diff alone.
Security signals we found
New FIDO2/NFC security-key support (YubiKit, wallet_fhse, fhse_native) added to iOS and Android
Custom payment-link handling replaces Flutter deep linking; links are queued until user unlocks
Secure-screen / privacy-cover controls added to prevent screenshots of secrets
Native memory hardening enabled on Android (MTE, GWP-ASan, zeroed heap) and Apple platforms (hardened-process entitlements, typed allocators)
Backup scope narrowed to a single sealed metadata_backup folder; encrypted seed store and wallet files excluded from cloud/device transfer
Android allowBackup changed from false to true, but constrained by backup_rules/data_extraction_rules
iCloud container added for metadata backup (NSUbiquitousContainers / com.apple.developer.icloud-container-identifiers)
Scanner library swapped: mobile_scanner removed, flutter_zxing + camera_avfoundation added
Build reproducibility checks added for Tor library NDK paths and Swift Package.resolved pins
Flutter upgraded from 3.41.7 to 3.47.7; Kotlin, Gradle, CocoaPods, and iOS deployment target bumped
Evidence from the diff
The commit merges PR #192, a major wallet-core update. Key security-relevant changes include: (1) FHSE/FIDO2 security-key integration via new wallet_fhse/fhse_native plugins and YubiKit Swift; (2) replacement of Flutter deep linking with custom platform channels (PaymentLinks) that hold monero: URIs until the user passes all locks; (3) secure-screen (FLAG_SECURE / SecureScreen) and privacy-cover controls; (4) Android manifest hardening (MTE sync, GWP-ASan always, nativeHeapZeroInitialized) and Apple hardened-process entitlements; (5) scoped Android/iOS cloud backup rules that only back up a sealed metadata_backup folder; (6) removal of mobile_scanner and permission_handler_apple in favor of flutter_zxing and camera_avfoundation; (7) build/reproducibility fixes for Tor NDK paths and Swift package pins; (8) UI copy and settings restructuring (sync frequency, OpenAlias, history, seed verification). The diff is too large to fully audit from the supplied excerpts, and the actual cryptographic/wallet-core logic lives in updated dependencies (wallet_core_glue, monero_c submodule, wallet_fhse, etc.) whose code is not shown.
Changed components
Android MainActivity (payment links, secure screen, secure clipboard)iOS AppDelegate / PaymentLinks / SecurityKeyChannel / SecureScreen / PrivacyCoverAndroidManifest.xml (backup rules, memory hardening, deep linking disabled)iOS Runner.entitlements and Info.plist (iCloud, NFC, hardened process)wallet_fhse / fhse_native plugins (FIDO2/HSE wallet encryption)wallet_backup_platform (scoped metadata backup)wallet_core_glue and monero_c submodule (wallet engine)CI/release workflows (reproducibility, NDK pinning, Swift package pin checks)Flutter/Dart UI layer (settings, sync frequency, OpenAlias, history, seed verification)Inspect captured patch +4936 / −1680
### .github/workflows/native-tls.yml
@@ -38,6 +38,7 @@ jobs:
android:
name: Android (emulator)
+ timeout-minutes: 45
runs-on: ubuntu-latest
needs: flutter-version
steps:
@@ -80,6 +81,7 @@ jobs:
ios:
name: iOS (simulator)
+ timeout-minutes: 45
runs-on: macos-26
needs: flutter-version
steps:
@@ -123,6 +125,7 @@ jobs:
linux:
name: Linux
+ timeout-minutes: 45
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -131,16 +134,31 @@ jobs:
- name: Pull builder image
run: docker pull ghcr.io/magicgrants/skylight-wallet-builder:latest
+ # The display server is started directly rather than through xvfb-run,
+ # which waits for a ready signal from it and can wait forever in a
+ # container.
- name: Native TLS checks
run: |
docker run --rm \
-v "$PWD:/workspace" \
-w /workspace \
+ -e TEST \
+ -e DEBIAN_FRONTEND=noninteractive \
ghcr.io/magicgrants/skylight-wallet-builder:latest \
- bash -c "apt-get update && apt-get install -y --no-install-recommends xvfb xauth && flutter pub get --enforce-lockfile && bash scripts/pin-rust-toolchain.sh && xvfb-run -a flutter test $TEST -d linux"
+ bash -euo pipefail -c '
+ apt-get update
+ apt-get install -y --no-install-recommends xvfb
+ flutter pub get --enforce-lockfile
+ bash scripts/pin-rust-toolchain.sh
+ Xvfb :99 -screen 0 1280x1024x24 -nolisten tcp -ac &
+ for _ in $(seq 50); do [ -S /tmp/.X11-unix/X99 ] && break; sleep 0.2; done
+ [ -S /tmp/.X11-unix/X99 ] || { echo "Xvfb did not start" >&2; exit 1; }
+ DISPLAY=:99 flutter test "$TEST" -d linux
+ '
windows:
name: Windows
+ timeout-minutes: 45
runs-on: windows-2022
needs: flutter-version
steps:
### .github/workflows/release.yml
@@ -181,12 +181,20 @@ jobs:
VERSION='${{ needs.version.outputs.version }}'
# Deterministic timestamp for reproducible builds
export SOURCE_DATE_EPOCH=$(git log -1 --format=%ct)
+ # Flutter's build hooks (Tor) take the NDK from ANDROID_NDK_HOME, else
+ # the newest one installed, not the app's ndkVersion, and Tor's
+ # OpenSSL records its path. Name the app's NDK at the path F-Droid's
+ # buildserver has it (fdroidserver and fdroid-build.sh set the same).
+ NDK_VERSION=$(sed -n 's/^[[:space:]]*ndkVersion = "\(.*\)"/\1/p' android/app/build.gradle.kts)
+ test -n "$NDK_VERSION"
+ echo "BUILD_NDK_HOME=/opt/android-sdk/ndk/$NDK_VERSION" >> "$GITHUB_ENV"
# No key.properties: gradle debug-signs; the real key is applied in the signing pass.
# Fixed build path for reproducibility
docker run --rm \
-v "$PWD:/tmp/skylight" \
-w /tmp/skylight \
-e SOURCE_DATE_EPOCH \
+ -e ANDROID_NDK_HOME="/opt/android-sdk/ndk/$NDK_VERSION" \
"$BUILDER_IMAGE" \
bash -c "cp -a /opt/cargo /tmp/skylight-cargo && export CARGO_HOME=/tmp/skylight-cargo && export PUB_CACHE=/tmp/skylight/.pub-cache && flutter pub get --enforce-lockfile && bash scripts/pin-rust-toolchain.sh && flutter build apk --dart-define=DEMO_MODE=true --release --split-per-abi && flutter build appbundle --dart-define=DEMO_MODE=true --release -PplayStore=true"
@@ -196,6 +204,13 @@ jobs:
cp -v build/app/outputs/flutter-apk/app-x86_64-release.apk "dist/skylight-wallet-${VERSION}-x86_64.apk"
cp -v build/app/outputs/bundle/release/app-release.aab "dist/skylight-wallet-${VERSION}.aab"
+ # F-Droid's rebuild matches the Tor library only if it names the same
+ # NDK and build path as this one; fail here rather than at F-Droid.
+ - name: Check the Tor library's build paths
+ run: |
+ bash scripts/repro/check-tor-paths.sh /tmp/skylight "$BUILD_NDK_HOME" \
+ build/app/outputs/flutter-apk/app-*-release.apk
+
- name: Sign APKs and AAB
env:
KS_PASS: ${{ secrets.ANDROID_STORE_PASSWORD }}
@@ -282,9 +297,11 @@ jobs:
- name: Build Linux packages
run: |
- # cargokit builds the Rust plugins with `rustup run stable`, and the
+ # cargokit builds wallet_openalias with `rustup run stable`, and the
# image only has the rust-toolchain.toml version, so pin cargokit to it
# (as the Android job does) instead of downloading stable mid-build.
+ # tor_ffi_plugin's build hook uses its own pinned toolchain, which
+ # rustup downloads on first use.
VERSION='${{ needs.version.outputs.version }}'
docker run --rm \
-v "$PWD:/workspace" \
@@ -416,6 +433,8 @@ jobs:
<dict>
<key>method</key>
<string>app-store</string>
+ <key>iCloudContainerEnvironment</key>
+ <string>Production</string>
<key>provisioningProfiles</key>
<dict>
<key>org.magicgrants.skylightwallet</key>
@@ -435,6 +454,17 @@ jobs:
flutter pub get --enforce-lockfile
flutter build ipa --dart-define=DEMO_MODE=true --release --export-options-plist=ios/ExportOptions.plist
+ - name: Check Swift package pins
+ # YubiKit Swift and swift-log must build from the revisions committed in
+ # Package.resolved. Xcode rewrites the file when it resolves anything
+ # else, so a missing or changed file fails the release.
+ run: |
+ for f in ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved \
+ ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved; do
+ git ls-files --error-unmatch "$f" > /dev/null
+ git diff --exit-code -- "$f"
+ done
+
- name: Prepare artifact
run: |
VERSION='${{ needs.version.outputs.version }}'
### .gitignore
@@ -47,3 +47,7 @@ app.*.map.json
# Local reproducibility test outputs (.so builds + logs)
/repro-out/
pubspec_overrides.yaml
+
+# monero_c for macOS, built locally (scripts/build-moneroc.sh): it embeds the
+# build path, so it is never committed
+/macos/Frameworks/
### .tool-versions
@@ -1 +1 @@
-flutter 3.41.7
+flutter 3.47.7
### README.md
@@ -4,6 +4,8 @@
A modern, open-source, and self-custody Monero light-wallet built with Flutter by [MAGIC Grants](https://magicgrants.org).
+Periodic sync (on Android and iPhone) and Continuous sync (on Android), set under Sync Frequency, use your view key only: they see incoming payments, but never hold a key that could spend.
+
**Website:** [skylight.magicgrants.org](https://skylight.magicgrants.org)
Looking for Bitcoin, Ethereum, and Dai too? [Spice Wallet](https://github.com/MAGICGrants/spice-wallet) is MAGIC Grants' multicoin wallet, built on the same wallet engine.
@@ -23,6 +25,14 @@ Looking for Bitcoin, Ethereum, and Dai too? [Spice Wallet](https://github.com/MA
Android APKs are also available from the [latest release](https://github.com/MAGICGrants/skylight-wallet/releases/latest).
+### Requirements
+
+- **iOS:** iOS 16 or later.
+- **Android:** Android 7.0 (API 24) or later.
+- **macOS:** macOS 13 Ventura or later, on Apple silicon. There is no macOS release yet; build from source.
+- **Windows:** Windows 10 or 11, 64-bit. Security keys need Windows 11, version 22H2 or later.
+- **Linux:** 64-bit (x86_64). Security keys need libfido2 (`libfido2-1`, which the ``.deb`` recommends).
+
### Desktop
#### Linux
@@ -75,11 +85,12 @@ A successful verification prints `Good signature from "MAGIC Grants <info@magicg
Before you begin, ensure you have the following installed:
-- **Flutter SDK** (3.8.1 or higher) - [Installation guide](https://docs.flutter.dev/get-started/install)
-- **Dart SDK** (3.8.1 or higher) - Usually comes with Flutter
+- **Flutter SDK** (3.47.7, the version pinned in `pubspec.yaml`) - [Installation guide](https://docs.flutter.dev/get-started/install)
+- **Dart SDK** (3.13.5) - Comes with Flutter
- **Android Studio** - For Android development
-- **Android SDK** - API level 21+ (Android 5.0 Lollipop or higher)
-- **Java JDK** - Version 11 or higher
+- **Android SDK** - API level 24+ (Android 7.0 or higher)
+- **Java JDK** - Version 17
+- **Xcode** (26 or later) and **CocoaPods** (1.17) - For iOS and macOS builds
## Getting Started
@@ -133,6 +144,25 @@ flutter run -d <device_id>
Make sure you have an Android emulator running or a physical device connected before running the app.
+### Memory safety settings
+
+The release builds turn on the platforms' strictest native-memory checks, for
+the C and C++ in the app (the Flutter engine, Monero, Tor, FHSE):
+
+- **Android** (`android/app/src/main/AndroidManifest.xml`): Arm MTE in sync
+ mode (Pixel 8 and later, when MTE is on), GWP-ASan on every launch, and
+ zeroed heap allocations.
+- **iOS and macOS** (`Runner.entitlements`, `Release.entitlements`): the
+ hardened process with a hardened heap, and Memory Integrity Enforcement
+ (hardware memory tagging on A19 iPhones and M5 Macs) enforced rather than
+ in soft mode.
+
+These stop a use-after-free or overflow at the faulting access. The cost is
+that a latent heap bug in any of that native code, harmless elsewhere, ends
+the app on that hardware, unlock included. A crash there that does not happen
+on other devices points here first: the crash report names a tag mismatch or
+GWP-ASan.
+
## Building for Android
### Debug APK
### analysis_options.yaml
@@ -13,6 +13,13 @@ analyzer:
# Vendored/submodule code skylight consumes via pub-cache, not linted here.
exclude:
- monero_c/**
+ - build/**
+ - android/**
+ - ios/**
+ - web/**
+ - windows/**
+ - macos/**
+ - linux/**
linter:
# The lint rules applied to this project can be customized in the
### android/app/build.gradle.kts
@@ -44,10 +44,6 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}
- kotlinOptions {
- jvmTarget = JavaVersion.VERSION_17.toString()
- }
-
// One StoreReview or the other: Play's review flow, or a no-op.
sourceSets {
getByName("main") {
@@ -95,6 +91,12 @@ android {
}
}
+kotlin {
+ compilerOptions {
+ jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
+ }
+}
+
val abiCodes = mapOf("armeabi-v7a" to 1, "arm64-v8a" to 2, "x86_64" to 3)
android.applicationVariants.configureEach {
val variant = this
### android/app/src/main/AndroidManifest.xml
@@ -11,11 +11,27 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
+ <!-- Native memory hardening, for the C and C++ in this process (the
+ Flutter engine, Monero, Tor, FHSE). memtagMode: Arm MTE in sync mode,
+ which stops a use-after-free or overflow at the faulting access; it
+ takes effect only on devices with MTE turned on (Pixel 8 and later).
+ nativeHeapZeroInitialized: memory from the system allocator (malloc,
+ new) is zeroed as it is handed out, so a missed initialisation reads
+ zeros rather than an earlier allocation's data; it does not clear
+ memory on free, or cover memory a library pools itself.
+ gwpAsanMode: sampled allocations sit between guard pages on every
+ launch, and a hit ends the process. Older Android versions ignore
+ what they lack. -->
<application
android:label="Skylight Wallet"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
- android:allowBackup="false">
+ android:allowBackup="true"
+ android:fullBackupContent="@xml/backup_rules"
+ android:dataExtractionRules="@xml/data_extraction_rules"
+ android:memtagMode="sync"
+ android:nativeHeapZeroInitialized="true"
+ android:gwpAsanMode="always">
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
@@ -54,11 +70,19 @@
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
+ <!-- No intent may name a screen: MainActivity forwards payment links
+ to Dart over a channel instead, and Dart opens the Send form
+ only once the user is past every lock. -->
+ <meta-data
+ android:name="flutter_deeplinking_enabled"
+ android:value="false"
+ />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
- <!-- Monero payment links: the send form opens prefilled, past App Lock. -->
+ <!-- Payment links: forwarded to Dart by MainActivity; the Send form
+ opens pre-filled only once the user is past every lock. -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
### android/app/src/main/kotlin/com/example/monero_light_wallet/MainActivity.kt
@@ -3,10 +3,13 @@ package org.magicgrants.skylight
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
+import android.content.Intent
import android.os.Build
+import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.os.PersistableBundle
+import android.view.WindowManager
import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel
@@ -20,8 +23,77 @@ class MainActivity : FlutterFragmentActivity() {
// time; see build.gradle.kts.
private val storeReviewChannel = "org.magicgrants.wallet/store_review"
+ // App-neutral name shared with wallet-core's SecureScreenMixin: FLAG_SECURE
+ // (no screenshots, recordings or casting) while a screen shows a secret.
+ private val secureScreenChannel = "org.magicgrants.wallet/secure_screen"
+
+ // Payment links (monero:) reach Dart over this channel and nowhere else; Dart
+ // holds them until the user is past every lock (wallet_ui's PaymentLinkGate).
+ // Flutter's own deep linking is off (the manifest's flutter_deeplinking_enabled
+ // and the two overrides below), so no intent can name a screen: its data URI
+ // and its "route" extra are both ignored.
+ private val paymentLinksChannel = "org.magicgrants.wallet/payment_links"
+ private val paymentLinkSchemes = setOf("monero")
+ private var paymentLinks: MethodChannel? = null
+ private var pendingPaymentLink: String? = null
+ private var dartTakesPaymentLinks = false
+
+ override fun getInitialRoute(): String? = null
+
+ override fun shouldHandleDeeplinking(): Boolean = false
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ // A recreated activity (rotation, a restored process) still carries the
+ // intent it was opened with; that link was taken already.
+ if (savedInstanceState == null) pendingPaymentLink = paymentLink(intent)
+ super.onCreate(savedInstanceState)
+ // Recents shows no picture of the wallet (Android 13 and later). Not
+ // FLAG_SECURE, which would also stop the user's own screenshots; the
+ // screens that show a secret add that themselves (SecureScreenMixin).
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) setRecentsScreenshotEnabled(false)
+ }
+
+ override fun onNewIntent(intent: Intent) {
+ super.onNewIntent(intent)
+ val link = paymentLink(intent) ?: return
+ val channel = paymentLinks
+ if (dartTakesPaymentLinks && channel != null) {
+ channel.invokeMethod("link", link)
+ } else {
+ pendingPaymentLink = link
+ }
+ }
+
+ // The payment link in a VIEW intent with one of [paymentLinkSchemes], or null.
+ // Not one Android replays when the app is reopened from Recents, and not one
+ // longer than any real payment link. Dart parses and checks it again.
+ private fun paymentLink(intent: Intent?): String? {
+ if (intent == null || intent.action != Intent.ACTION_VIEW) return null
+ if (intent.flags and Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY != 0) return null
+ val uri = intent.data ?: return null
+ val scheme = uri.scheme?.lowercase() ?: return null
+ if (scheme !in paymentLinkSchemes) return null
+ val link = uri.toString()
+ return if (link.length <= MAX_PAYMENT_LINK_LENGTH) link else null
+ }
+
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
+ paymentLinks = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, paymentLinksChannel)
+ .apply {
+ setMethodCallHandler { call, result ->
+ when (call.method) {
+ // Dart is listening: hand over the launch link, if any;
+ // later ones go straight over the channel.
+ "takeInitialLink" -> {
+ dartTakesPaymentLinks = true
+ result.success(pendingPaymentLink)
+ pendingPaymentLink = null
+ }
+ else -> result.notImplemented()
+ }
+ }
+ }
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, secureClipboardChannel)
.setMethodCallHandler { call, result ->
when (call.method) {
@@ -49,6 +121,20 @@ class MainActivity : FlutterFragmentActivity() {
else -> result.notImplemented()
}
}
+ MethodChannel(flutterEngine.dartExecutor.binaryMessenger, secureScreenChannel)
+ .setMethodCallHandler { call, result ->
+ when (call.method) {
+ "setSecure" -> {
+ if (call.argument<Boolean>("secure") == true) {
+ window.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
+ } else {
+ window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
+ }
+ result.success(null)
+ }
+ else -> result.notImplemented()
+ }
+ }
}
private val clipboardHandler = Handler(Looper.getMainLooper())
@@ -82,4 +168,8 @@ class MainActivity : FlutterFragmentActivity() {
pendingClipClear = clear
clipboardHandler.postDelayed(clear, clearAfterSeconds * 1000L)
}
+
+ companion object {
+ private const val MAX_PAYMENT_LINK_LENGTH = 2048
+ }
}
### android/app/src/main/res/xml/backup_rules.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Android 11 and earlier: the same single folder as data_extraction_rules.xml.
+-->
+<full-backup-content>
+ <include domain="root" path="app_flutter/metadata_backup/" />
+</full-backup-content>
### android/app/src/main/res/xml/data_extraction_rules.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Android 12 and later. Backs up the metadata backup's folder and nothing else:
+ its files are already sealed with a key from the seed. A section left out is
+ fully enabled for all app data, which would carry the encrypted seed store and
+ the wallet files along, so every section names the same single folder.
+ The folder is wallet-core's getAppDir() (path_provider's documents directory,
+ app_flutter) + metadata_backup; see wallet_backup_platform's README.
+-->
+<data-extraction-rules>
+ <cloud-backup>
+ <include domain="root" path="app_flutter/metadata_backup/" />
+ </cloud-backup>
+ <device-transfer>
+ <include domain="root" path="app_flutter/metadata_backup/" />
+ </device-transfer>
+ <cross-platform-transfer platform="ios">
+ <include domain="root" path="app_flutter/metadata_backup/" />
+ </cross-platform-transfer>
+</data-extraction-rules>
### android/build.gradle.kts
@@ -41,8 +41,8 @@ subprojects {
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
- kotlinOptions {
- jvmTarget = JavaVersion.VERSION_17.toString()
+ compilerOptions {
+ jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}
}
### android/gradle.properties
@@ -1,4 +1,8 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
-(this@compileOptions).isCoreLibraryDesugaringEnabled=true
\ No newline at end of file
+(this@compileOptions).isCoreLibraryDesugaringEnabled=true
+# This builtInKotlin flag was added automatically by Flutter migrator
+android.builtInKotlin=false
+# This newDsl flag was added automatically by Flutter migrator
+android.newDsl=false
### android/gradle/wrapper/gradle-wrapper.properties
@@ -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.13-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.6-all.zip
### android/settings.gradle.kts
@@ -19,7 +19,7 @@ pluginManagement {
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.12.0" apply false
- id("org.jetbrains.kotlin.android") version "2.1.0" apply false
+ id("org.jetbrains.kotlin.android") version "2.3.21" apply false
}
include(":app")
### deb/build_deb.sh
@@ -81,7 +81,8 @@ mkdir -p "$PACKAGE_DIR/usr/bin"
mkdir -p "$PACKAGE_DIR/usr/share/icons/hicolor/512x512/apps"
mkdir -p "$PACKAGE_DIR/usr/share/applications"
-# Create control file
+# Create control file. libfido2 is what security keys use on Linux (loaded at
+# run time); without it the app runs as before and keys are unavailable.
echo "Creating control file..."
INSTALLED_SIZE=$(du -sk ../build/linux/x64/release/bundle | cut -f1)
cat > "$PACKAGE_DIR/DEBIAN/control" << EOF
@@ -92,6 +93,7 @@ Priority: optional
Architecture: amd64
Installed-Size: $INSTALLED_SIZE
Maintainer: MAGIC Grants
+Recommends: libfido2-1
Description: A light Monero wallet.
Homepage: https://github.com/MAGICGrants/skylight-wallet
EOF
### integration_test/native_tls_test.dart
@@ -2,6 +2,8 @@ import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
+import 'package:wallet_domain/wallet_domain.dart';
+import 'package:wallet_infra/testing.dart';
import 'package:wallet_monero/testing.dart';
/// TLS against the native library this app ships, on the platform the test
@@ -13,7 +15,18 @@ import 'package:wallet_monero/testing.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
- testWidgets('the shipped CA bundle reaches the app directory', (_) => checkShippedCaBundle());
+ testWidgets('the shipped CA bundle reaches the app directory', (_) async {
+ // The app sets up its directory in main(), which this test does not run,
+ // so a temporary directory stands in for it.
+ final dir = await Directory.systemTemp.createTemp('ca_bundle');
+ WalletAppConfig.install(WalletAppConfig.skylight, directories: FixedDirectories(dir));
+ try {
+ await checkShippedCaBundle();
+ } finally {
+ WalletAppConfig.resetForTesting();
+ await dir.delete(recursive: true);
+ }
+ });
for (final check in nativeTlsChecks()) {
testWidgets(check.name, (_) async {
### ios/Podfile
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
- platform :ios, '15.0'
+platform :ios, '16.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@@ -39,5 +39,27 @@ end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
+ # The memory hardening Enhanced Security turns on, for the C and C++ the
+ # pods compile (fhse_native's libsodium and libcbor, BoringSSL, zxing):
+ # zeroed stack variables, the typed allocator that hardened-heap
+ # (Runner.entitlements) builds on, and libc++'s fast bounds checks in
+ # release builds (debug builds already get its debug mode). Not
+ # ENABLE_ENHANCED_SECURITY itself, which would build for arm64e.
+ #
+ # Xcode 27 also refuses iOS deployment targets below 15.0, and several
+ # plugin podspecs still ask for 9.0 to 14.0. Raise them to the app's own
+ # minimum (16.0, above).
+ target.build_configurations.each do |config|
+ current = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
+ if current && Gem::Version.new(current) < Gem::Version.new('16.0')
+ config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
+ end
+ config.build_settings['CLANG_ENABLE_STACK_ZERO_INIT'] = 'YES'
+ config.build_settings['CLANG_ENABLE_C_TYPED_ALLOCATOR_SUPPORT'] = 'YES'
+ config.build_settings['CLANG_ENABLE_CPLUSPLUS_TYPED_ALLOCATOR_SUPPORT'] = 'YES'
+ unless config.name == 'Debug'
+ config.build_settings['CLANG_CXX_STANDARD_LIBRARY_HARDENING'] = 'fast'
+ end
+ end
end
end
### ios/Podfile.lock
@@ -1,92 +1,140 @@
PODS:
+ - camera_avfoundation (0.0.1):
+ - Flutter
+ - fhse_native (0.1.0):
+ - Flutter
+ - file_selector_ios (0.0.1):
+ - Flutter
- Flutter (1.0.0)
+ - flutter_foreground_task (0.0.1):
+ - Flutter
- flutter_local_notifications (0.0.1):
- Flutter
- flutter_secure_storage (6.0.0):
- Flutter
- - local_auth_darwin (0.0.1):
+ - flutter_zxing (0.0.1):
- Flutter
- - FlutterMacOS
- - mobile_scanner (7.0.0):
+ - image_picker_ios (0.0.1):
+ - Flutter
+ - integration_test (0.0.1):
+ - Flutter
+ - local_auth_darwin (0.0.1):
- Flutter
- FlutterMacOS
- package_info_plus (0.4.5):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- - permission_handler_apple (9.3.0):
- - Flutter
- screen_brightness_ios (0.1.0):
- Flutter
- share_plus (0.0.1):
- Flutter
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- - tor_ffi_plugin (0.0.1):
+ - wallet_backup_platform (0.1.0):
+ - Flutter
+ - wallet_fhse (0.1.0):
- Flutter
+ - wallet_openalias (0.0.1):
+ - Flutter
+ - webcrypto (0.1.1):
+ - Flutter
+ - FlutterMacOS
- workmanager_apple (0.0.1):
- Flutter
DEPENDENCIES:
+ - camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
+ - fhse_native (from `.symlinks/plugins/fhse_native/ios`)
+ - file_selector_ios (from `.symlinks/plugins/file_selector_ios/ios`)
- Flutter (from `Flutter`)
+ - flutter_foreground_task (from `.symlinks/plugins/flutter_foreground_task/ios`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
+ - flutter_zxing (from `.symlinks/plugins/flutter_zxing/ios`)
+ - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
+ - integration_test (from `.symlinks/plugins/integration_test/ios`)
- local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`)
- - mobile_scanner (from `.symlinks/plugins/mobile_scanner/darwin`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- screen_brightness_ios (from `.symlinks/plugins/screen_brightness_ios/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- - tor_ffi_plugin (from `.symlinks/plugins/tor_ffi_plugin/ios`)
+ - wallet_backup_platform (from `.symlinks/plugins/wallet_backup_platform/ios`)
+ - wallet_fhse (from `.symlinks/plugins/wallet_fhse/ios`)
+ - wallet_openalias (from `.symlinks/plugins/wallet_openalias/ios`)
+ - webcrypto (from `.symlinks/plugins/webcrypto/darwin`)
- workmanager_apple (from `.symlinks/plugins/workmanager_apple/ios`)
EXTERNAL SOURCES:
+ camera_avfoundation:
+ :path: ".symlinks/plugins/camera_avfoundation/ios"
+ fhse_native:
+ :path: ".symlinks/plugins/fhse_native/ios"
+ file_selector_ios:
+ :path: ".symlinks/plugins/file_selector_ios/ios"
Flutter:
:path: Flutter
+ flutter_foreground_task:
+ :path: ".symlinks/plugins/flutter_foreground_task/ios"
flutter_local_notifications:
:path: ".symlinks/plugins/flutter_local_notifications/ios"
flutter_secure_storage:
:path: ".symlinks/plugins/flutter_secure_storage/ios"
+ flutter_zxing:
+ :path: ".symlinks/plugins/flutter_zxing/ios"
+ image_picker_ios:
+ :path: ".symlinks/plugins/image_picker_ios/ios"
+ integration_test:
+ :path: ".symlinks/plugins/integration_test/ios"
local_auth_darwin:
:path: ".symlinks/plugins/local_auth_darwin/darwin"
- mobile_scanner:
- :path: ".symlinks/plugins/mobile_scanner/darwin"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
- permission_handler_apple:
- :path: ".symlinks/plugins/permission_handler_apple/ios"
screen_brightness_ios:
:path: ".symlinks/plugins/screen_brightness_ios/ios"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
- tor_ffi_plugin:
- :path: ".symlinks/plugins/tor_ffi_plugin/ios"
+ wallet_backup_platform:
+ :path: ".symlinks/plugins/wallet_backup_platform/ios"
+ wallet_fhse:
+ :path: ".symlinks/plugins/wallet_fhse/ios"
+ wallet_openalias:
+ :path: ".symlinks/plugins/wallet_openalias/ios"
+ webcrypto:
+ :path: ".symlinks/plugins/webcrypto/darwin"
workmanager_apple:
:path: ".symlinks/plugins/workmanager_apple/ios"
SPEC CHECKSUMS:
+ camera_avfoundation: 769d252259fa21e39ada7399c9dc9c0921af8165
+ fhse_native: 81771cc2d62b5c300e82a4724ffd4ea1b66ea902
+ file_selector_ios: 80c12e90ad3f2045ed6819d03742f1a4c5ec3f93
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
- flutter_local_notifications: a5a732f069baa862e728d839dd2ebb904737effb
- flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13
- local_auth_darwin: c3ee6cce0a8d56be34c8ccb66ba31f7f180aaebb
- mobile_scanner: 9157936403f5a0644ca3779a38ff8404c5434a93
- package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
- path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880
- permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
- screen_brightness_ios: 9953fd7da5bd480f1a93990daeec2eb42d4f3b52
- share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
- shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
- tor_ffi_plugin: 2a4dd758515e5124dce8323f950f6bb135e611b5
- workmanager_apple: 904529ae31e97fc5be632cf628507652294a0778
+ flutter_foreground_task: 21ef182ab0a29a3005cc72cd70e5f45cb7f7f817
+ flutter_local_notifications: ff50f8405aaa0ccdc7dcfb9022ca192e8ad9688f
+ flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
+ flutter_zxing: 1383f56e9cb3d5fba8d6bb653e4fbed2149f7c75
+ image_picker_ios: 4f2f91b01abdb52842a8e277617df877e40f905b
+ integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
+ local_auth_darwin: 63c73d6d28cc3e239be2b6aa460ea6e317cd5100
+ package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
+ path_provider_foundation: 0b743cbb62d8e47eab856f09262bb8c1ddcfe6ba
+ screen_brightness_ios: 6a6f7794b67f07c4f1e24f6374b2d8ad367ffb39
+ share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
+ shared_preferences_foundation: 5086985c1d43c5ba4d5e69a4e8083a389e2909e6
+ wallet_backup_platform: 4bfb79de0bf9f9a5e399263dece05e91d2e7e243
+ wallet_fhse: 828e81a0310a8cc3e4aa770cc44c2e22e26fc766
+ wallet_openalias: 2e0f3f89a53cd7c1094400eab675463390059dc6
+ webcrypto: aa788ff6b0a956e5d6e613b35b99c13e220ca2d0
+ workmanager_apple: 7bac258335c310689a641e2d66e88d4845d372e9
-PODFILE CHECKSUM: 3d68f7cb47d5f2fb7765407f663653c9b51100f3
+PODFILE CHECKSUM: abb7e9f3d18e33b61c1fd30040cfe43c792b79df
-COCOAPODS: 1.16.2
+COCOAPODS: 1.17.0
### ios/Runner.xcodeproj/project.pbxproj
@@ -13,6 +13,11 @@
6FF8B85D2F19277F00206EFD /* MoneroWallet.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FF8B85C2F19277F00206EFD /* MoneroWallet.xcframework */; };
6FF8B85E2F19277F00206EFD /* MoneroWallet.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6FF8B85C2F19277F00206EFD /* MoneroWallet.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+ FF73651470A3258C9BE6BA6E /* SecurityKeyOperations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 285AB4E3C0ACD6DDA8D3EACD /* SecurityKeyOperations.swift */; };
+ 513EAD7ECFC95D4EACD7524B /* SecurityKeyChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEEB15EF9B8FA7344CFCD11C /* SecurityKeyChannel.swift */; };
+ 6431CB5BDF16DB08076C4F81 /* PrivacyCover.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A84F489497BC2189A49B732 /* PrivacyCover.swift */; };
+ 40BF308701DD5040BB863C5B /* SecureScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18BD308BF063A444AD174FCB /* SecureScreen.swift */; };
+ F4266FC460FC211C6FD972E7 /* YubiKit in Frameworks */ = {isa = PBXBuildFile; productRef = 786BC24A685CA9C36E047769 /* YubiKit */; };
79D78220F5B529E1F8AAEC80 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5801F2E4C06C47481468529E /* Pods_Runner.framework */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
@@ -58,6 +63,11 @@
6FF8B85C2F19277F00206EFD /* MoneroWallet.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = MoneroWallet.xcframework; path = Frameworks/MoneroWallet.xcframework; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
+ 285AB4E3C0ACD6DDA8D3EACD /* SecurityKeyOperations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SecurityKeyOperations.swift; path = ".symlinks/plugins/wallet_fhse/apple/SecurityKeyOperations.swift"; sourceTree = SOURCE_ROOT; };
+ CEEB15EF9B8FA7344CFCD11C /* SecurityKeyChannel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SecurityKeyChannel.swift; path = ".symlinks/plugins/wallet_fhse/apple/SecurityKeyChannel.swift"; sourceTree = SOURCE_ROOT; };
+ 7A84F489497BC2189A49B732 /* PrivacyCover.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = PrivacyCover.swift; path = ".symlinks/plugins/wallet_fhse/apple/PrivacyCover.swift"; sourceTree = SOURCE_ROOT; };
+ 18BD308BF063A444AD174FCB /* SecureScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SecureScreen.swift; path = ".symlinks/plugins/wallet_fhse/apple/SecureScreen.swift"; sourceTree = SOURCE_ROOT; };
+ C20E80BCEA94B1C535960DE5 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
@@ -86,6 +96,7 @@
files = (
6FF8B85D2F19277F00206EFD /* MoneroWallet.xcframework in Frameworks */,
79D78220F5B529E1F8AAEC80 /* Pods_Runner.framework in Frameworks */,
+ F4266FC460FC211C6FD972E7 /* YubiKit in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -160,7 +171,12 @@
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ CEEB15EF9B8FA7344CFCD11C /* SecurityKeyChannel.swift */,
+ 7A84F489497BC2189A49B732 /* PrivacyCover.swift */,
+ 18BD308BF063A444AD174FCB /* SecureScreen.swift */,
+ 285AB4E3C0ACD6DDA8D3EACD /* SecurityKeyOperations.swift */,
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+ C20E80BCEA94B1C535960DE5 /* Runner.entitlements */,
);
path = Runner;
sourceTree = "<group>";
@@ -220,6 +236,9 @@
dependencies = (
);
name = Runner;
+ packageProductDependencies = (
+ 786BC24A685CA9C36E047769 /* YubiKit */,
+ );
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
@@ -253,6 +272,9 @@
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
+ packageReferences = (
+ 6F53B4424E23BB8F384171A1 /* XCRemoteSwiftPackageReference "yubikit-swift" */,
+ );
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
@@ -427,6 +449,10 @@
buildActionMask = 2147483647;
files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+ 513EAD7ECFC95D4EACD7524B /* SecurityKeyChannel.swift in Sources */,
+ 6431CB5BDF16DB08076C4F81 /* PrivacyCover.swift in Sources */,
+ 40BF308701DD5040BB863C5B /* SecureScreen.swift in Sources */,
+ FF73651470A3258C9BE6BA6E /* SecurityKeyOperations.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -504,7 +530,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 15.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -518,11 +544,16 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_CPLUSPLUS_TYPED_ALLOCATOR_SUPPORT = YES;
+ CLANG_ENABLE_C_TYPED_ALLOCATOR_SUPPORT = YES;
CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_STACK_ZERO_INIT = YES;
+ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = Y62MZZFR2Y;
ENABLE_BITCODE = NO;
+ ENABLE_SECURITY_COMPILER_WARNINGS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Frameworks",
@@ -642,7 +673,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 15.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -693,7 +724,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 15.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -709,11 +740,16 @@
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_CPLUSPLUS_TYPED_ALLOCATOR_SUPPORT = YES;
+ CLANG_ENABLE_C_TYPED_ALLOCATOR_SUPPORT = YES;
CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_STACK_ZERO_INIT = YES;
+ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = Y62MZZFR2Y;
ENABLE_BITCODE = NO;
+ ENABLE_SECURITY_COMPILER_WARNINGS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Frameworks",
@@ -740,11 +776,16 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_CPLUSPLUS_TYPED_ALLOCATOR_SUPPORT = YES;
+ CLANG_ENABLE_C_TYPED_ALLOCATOR_SUPPORT = YES;
CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_STACK_ZERO_INIT = YES;
+ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = Y62MZZFR2Y;
ENABLE_BITCODE = NO;
+ ENABLE_SECURITY_COMPILER_WARNINGS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Frameworks",
@@ -799,6 +840,25 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
+
+/* Begin XCRemoteSwiftPackageReference section */
+ 6F53B4424E23BB8F384171A1 /* XCRemoteSwiftPackageReference "yubikit-swift" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/Yubico/yubikit-swift";
+ requirement = {
+ kind = exactVersion;
+ version = 1.4.0;
+ };
+ };
+/* End XCRemoteSwiftPackageReference section */
+
+/* Begin XCSwiftPackageProductDependency section */
+ 786BC24A685CA9C36E047769 /* YubiKit */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = 6F53B4424E23BB8F384171A1 /* XCRemoteSwiftPackageReference "yubikit-swift" */;
+ productName = YubiKit;
+ };
+/* End XCSwiftPackageProductDependency section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
### ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -0,0 +1,24 @@
+{
+ "originHash" : "27c93eff4dfb0ee36f0f5d536b891dbb7ac5a65ff544f77bdd05550fd667147f",
+ "pins" : [
+ {
+ "identity" : "swift-log",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-log",
+ "state" : {
+ "revision" : "4038b6a4f74a1426f47eb1dd5b4bb5628a15d597",
+ "version" : "1.16.1"
+ }
+ },
+ {
+ "identity" : "yubikit-swift",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/Yubico/yubikit-swift",
+ "state" : {
+ "revision" : "e19212f2efbca9af280e57542e669885de5acdc1",
+ "version" : "1.4.0"
+ }
+ }
+ ],
+ "version" : 3
+}
### ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -0,0 +1,24 @@
+{
+ "originHash" : "27c93eff4dfb0ee36f0f5d536b891dbb7ac5a65ff544f77bdd05550fd667147f",
+ "pins" : [
+ {
+ "identity" : "swift-log",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-log",
+ "state" : {
+ "revision" : "4038b6a4f74a1426f47eb1dd5b4bb5628a15d597",
+ "version" : "1.16.1"
+ }
+ },
+ {
+ "identity" : "yubikit-swift",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/Yubico/yubikit-swift",
+ "state" : {
+ "revision" : "e19212f2efbca9af280e57542e669885de5acdc1",
+ "version" : "1.4.0"
+ }
+ }
+ ],
+ "version" : 3
+}
### ios/Runner/AppDelegate.swift
@@ -8,12 +8,20 @@ import workmanager_apple
private var secureClipboardChannel: FlutterMethodChannel?
private var storeReviewChannel: FlutterMethodChannel?
private var hostPlatformChannel: FlutterMethodChannel?
+ private var secureScreenChannel: FlutterMethodChannel?
+ private var securityKeyChannel: SecurityKeyChannel?
+ private var paymentLinks: PaymentLinks?
private var sceneConnectObserver: NSObjectProtocol?
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
+ // The launch screen over the app whenever it is not active: the app
+ // switcher, and the Face ID prompt on the way back (wallet_fhse's
+ // apple/PrivacyCover.swift).
+ PrivacyCover.shared.install()
+
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
}
@@ -108,6 +116,27 @@ import workmanager_apple
storeReviewChannel = channel
}
+ let secureScreenRegistrar = engineBridge.pluginRegistry.registrar(forPlugin: "SecureScreen")
+ if let messenger = secureScreenRegistrar?.messenger() {
+ // App-neutral name shared with wallet-core's SecureScreenMixin. Keeps the
+ // window out of screenshots and recordings while a secret is on screen
+ // (wallet_fhse's apple/SecureScreen.swift).
+ let channel = FlutterMethodChannel(
+ name: "org.magicgrants.wallet/secure_screen",
+ binaryMessenger: messenger
+ )
+ channel.setMethodCallHandler { call, reply in
+ guard call.method == "setSecure" else {
+ reply(FlutterMethodNotImplemented)
+ return
+ }
+ let args = call.arguments as? [String: Any]
+ SecureScreen.shared.setSecure(args?["secure"] as? Bool ?? false)
+ reply(nil)
+ }
+ secureScreenChannel = channel
+ }
+
let hostRegistrar = engineBridge.pluginRegistry.registrar(forPlugin: "HostPlatform")
if let messenger = hostRegistrar?.messenger() {
// App-neutral name shared with wallet-core's HostPlatform. The App Store
@@ -126,6 +155,20 @@ import workmanager_apple
}
hostPlatformChannel = channel
}
+
+ let securityKeyRegistrar = engineBridge.pluginRegistry.registrar(forPlugin: "SecurityKey")
+ if let messenger = securityKeyRegistrar?.messenger() {
+ // FIDO2 security keys (YubiKit) for FHSE wallet-file encryption.
+ securityKeyChannel = SecurityKeyChannel(messenger: messenger)
+ }
+
+ if let registrar = engineBridge.pluginRegistry.registrar(forPlugin: "PaymentLinks") {
+ // Payment links (monero:) for the Send form; see PaymentLinks.
+ let links = PaymentLinks(messenger: registrar.messenger(), schemes: ["monero"])
+ registrar.addSceneDelegate(links)
+ registrar.addApplicationDelegate(links)
+ paymentLinks = links
+ }
}
/// Hands the request to StoreKit's own prompt, which decides whether to show
@@ -142,3 +185,77 @@ import workmanager_apple
return true
}
}
+
+/// Payment links reach Dart over this channel and nowhere else; Dart holds them
+/// until the user is past every lock (wallet_ui's PaymentLinkGate).
+/// FlutterDeepLinkingEnabled is NO in Info.plist, so no URL can name a screen.
+///
+/// The link the app is launched with arrives with the scene's connection and
+/// waits until Dart asks for it ("takeInitialLink"); later ones are sent as
+/// they come.
+final class PaymentLinks: NSObject, FlutterPlugin, FlutterSceneLifeCycleDelegate {
+ private static let channelName = "org.magicgrants.wallet/payment_links"
+ /// Longer than any real payment link. Dart parses and checks it again.
+ private static let maxLength = 2048
+
+ private let schemes: Set<String>
+ private let channel: FlutterMethodChannel
+ private var pending: String?
+ private var dartListening = false
+
+ init(messenger: FlutterBinaryMessenger, schemes: Set<String>) {
+ self.schemes = schemes
+ channel = FlutterMethodChannel(name: Self.channelName, binaryMessenger: messenger)
+ super.init()
+ channel.setMethodCallHandler { [weak self] call, result in
+ guard let self, call.method == "takeInitialLink" else {
+ result(FlutterMethodNotImplemented)
+ return
+ }
+ self.dartListening = true
+ result(self.pending)
+ self.pending = nil
+ }
+ }
+
+ /// Registered by AppDelegate, not by the plugin registrant.
+ static func register(with registrar: FlutterPluginRegistrar) {}
+
+ func scene(
+ _ scene: UIScene,
+ willConnectTo session: UISceneSession,
+ options connectionOptions: UIScene.ConnectionOptions?
+ ) -> Bool {
+ guard let context = connectionOptions?.urlContexts.first else { return false }
+ return accept(context.url)
+ }
+
+ func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) -> Bool {
+ var handled = false
+ for context in URLContexts where accept(context.url) {
+ handled = true
+ }
+ return handled
+ }
+
+ func application(
+ _ application: UIApplication,
+ open url: URL,
+ options: [UIApplication.OpenURLOptionsKey: Any] = [:]
+ ) -> Bool {
+ accept(url)
+ }
+
+ /// Takes a link with one of [schemes], or refuses it.
+ private func accept(_ url: URL) -> Bool {
+ guard let scheme = url.scheme?.lowercased(), schemes.contains(scheme) else { return false }
+ let link = url.absoluteString
+ guard link.count <= Self.maxLength else { return false }
+ if dartListening {
+ channel.invokeMethod("link", arguments: link)
+ } else {
+ pending = link
+ }
+ return true
+ }
+}
### ios/Runner/Info.plist
@@ -21,6 +21,11 @@
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+ <!-- No URL may name a screen: AppDelegate's PaymentLinks forwards payment
+ links to Dart, which opens the Send form only once the user is past
+ every lock. -->
+ <key>FlutterDeepLinkingEnabled</key>
+ <false/>
<key>CFBundleURLTypes</key>
<array>
<dict>
@@ -97,5 +102,28 @@
<string>We need access to your camera to scan QR codes for connection and wallet addresses.</string>
<key>NSFaceIDUsageDescription</key>
<string>We use Face ID to unlock your wallet without typing your password.</string>
+ <key>NFCReaderUsageDescription</key>
+ <string>Skylight uses NFC to talk to your security key.</string>
+ <!-- Smart card applications the NFC reader may select: FIDO2/U2F, and
+ YubiKey Management for the key's serial number (the check that it is
+ the key that was set up, before a PIN is sent). -->
+ <key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
+ <array>
+ <string>A0000006472F0001</string>
+ <string>A000000527471117</string>
+ </array>
+ <!-- Metadata backup: the iCloud container, hidden from the Files app. -->
+ <key>NSUbiquitousContainers</key>
+ <dict>
+ <key>iCloud.org.magicgrants.skylightwallet</key>
+ <dict>
+ <key>NSUbiquitousContainerIsDocumentScopePublic</key>
+ <false/>
+ <key>NSUbiquitousContainerName</key>
+ <string>Skylight</string>
+ <key>NSUbiquitousContainerSupportedFolderLevels</key>
+ <string>None</string>
+ </dict>
+ </dict>
</dict>
</plist>
### ios/Runner/Runner.entitlements
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <!-- Metadata backup: this app's own iCloud container (wallet_backup_platform). -->
+ <key>com.apple.developer.icloud-container-identifiers</key>
+ <array>
+ <string>iCloud.org.magicgrants.skylightwallet</string>
+ </array>
+ <key>com.apple.developer.icloud-services</key>
+ <array>
+ <string>CloudDocuments</string>
+ </array>
+ <key>com.apple.developer.ubiquity-container-identifiers</key>
+ <array>
+ <string>iCloud.org.magicgrants.skylightwallet</string>
+ </array>
+ <key>com.apple.developer.nfc.readersession.formats</key>
+ <array>
+ <string>TAG</string>
+ </array>
+ <key>com.apple.security.smartcard</key>
+ <true/>
+ <!-- Enhanced Security (iOS 26 and later; earlier versions ignore these).
+ All of it except pointer authentication, which needs every binary in
+ the process built for arm64e, and Flutter's engine is arm64 only.
+ Version 2 also turns on guard objects around freed memory.
+ checked-allocations is Memory Integrity Enforcement (hardware memory
+ tagging, A19 and later), enforced rather than in soft mode, and
+ enable-pure-data extends tagging to allocations without pointers,
+ where key material lives. hardened-heap pairs with the typed
+ allocators set in the Runner target and the Podfile. -->
+ <key>com.apple.security.hardened-process</key>
+ <true/>
+ <key>com.apple.security.hardened-process.enhanced-security-version-string</key>
+ <string>2</string>
+ <key>com.apple.security.hardened-process.platform-restrictions-string</key>
+ <string>2</string>
+ <key>com.apple.security.hardened-process.dyld-ro</key>
+ <true/>
+ <key>com.apple.security.hardened-process.hardened-heap</key>
+ <true/>
+ <key>com.apple.security.hardened-process.checked-allocations</key>
+ <true/>
+ <key>com.apple.security.hardened-process.checked-allocations.enable-pure-data</key>
+ <true/>
+</dict>
+</plist>
### lib/l10n/app_en.arb
@@ -29,6 +29,7 @@
"welcomeTermsLink": "Terms of Service",
"welcomeAgreeMiddle": " and ",
"welcomePrivacyLink": "Privacy Policy",
+ "settingsLicensesLabel": "Open-Source Licenses",
"lwsSetupTitle": "Connection Setup",
"lwsSetupDescription": "Connect to a Monero light-wallet server (LWS) or your own full node. Only select a server you trust. Even if you use Tor, this server can learn information about you. With an LWS, your private view key and primary address will be shared with this server.",
"lwsSetupProxyPortLabel": "HTTP Proxy Port (Optional)",
@@ -42,6 +43,9 @@
"connectionRemoteIpNotAllowed": "Connections to remote IP addresses aren't allowed. Use a domain name or a local IP address.",
"connectionLocalOverTorNotAllowed": "A local address can't be reached through Tor. Turn Tor off, or use the server's onion address.",
"connectionOnionNeedsTor": "An onion address can only be reached through Tor. Turn Tor on to use it.",
+ "connectionPathNotSupported": "This server is reached at its root, so its address can't include a path like /wallet. Remove the path.",
+ "lwsAwaitingApprovalAccount": "Your light wallet server hasn't approved this wallet yet. Ask the server's operator to approve it so you can see your balance and transactions.",
+ "lwsAwaitingApprovalRestoreHeight": "Your light wallet server hasn't approved scanning from your restore height yet, so older transactions may be missing. Ask the server's operator to approve it.",
"connectionTorDisabledWarning": "Tor is disabled, so this connection no longer works. Please reconfigure it.",
"connectionProtocolHttps": "Removing protocol. Using HTTPS for domains.",
"connectionProtocolHttp": "Removing protocol. Using HTTP for local addresses.",
@@ -62,15 +66,12 @@
"settingsConnectionOverTor": "over Tor",
"settingsConnectionOverClearnet": "over Clearnet",
"settingsConnectionInLocalNetwork": "in Local Network",
- "settingsBackgroundSyncLabel": "Background Sync",
- "settingsBackgroundSyncDescription": "Periodically sync Monero in the background so it's up to date when you open the app. Only runs while charging and on WiFi.",
- "settingsForegroundSyncLabel": "Continuous Sync",
- "settingsForegroundSyncDescription": "Keep Monero syncing continuously while the app runs in the background, with a persistent notification. Uses more battery.",
- "homeBlocksRemaining": "{count} blocks left",
+ "homeBlocksRemaining": "{count, plural, =1{1 block left} other{{count} blocks left}}",
"@homeBlocksRemaining": {
"placeholders": {
"count": {
- "type": "String"
+ "type": "int",
+ "format": "decimalPattern"
}
}
},
@@ -83,54 +84,53 @@
"fiatModeTorOnlyDesc": "Prices fetched over Tor · recommended",
"fiatModeClearnetDesc": "Not private, the price server sees your IP address",
"fiatModeDisabledDesc": "No prices fetched, balances shown in crypto only",
+ "settingsOpenAliasSettingsLabel": "OpenAlias Settings",
+ "openAliasSettingsSheetSubtitle": "How names like name@example.com are looked up when you send.",
+ "openAliasModeTorOnlyDesc": "Names looked up over Tor · recommended",
+ "openAliasModeClearnetDesc": "Not private, DNS servers see your IP address and the name",
+ "openAliasModeDisabledDesc": "No lookups, send to addresses only",
"fiatApiSettingsDisplayCurrencyLabel": "Display Currency",
"createWalletTitle": "Wallet Setup",
"createWalletDescription": "Would you like to create a new wallet or restore an existing wallet?",
"createWalletRestoreExistingButton": "Restore Existing",
- "createWalletRestoreExistingDesc": "Enter an existing Monero seed",
+ "createWalletRestoreExistingDesc": "Enter an existing Monero recovery phrase",
"createWalletCreateNewButton": "Create New",
- "createWalletCreateNewDesc": "Skylight Wallet generates a new polyseed",
+ "createWalletCreateNewDesc": "Skylight Wallet generates a new Polyseed recovery phrase",
"createWalletPasswordTitle": "Create Wallet Password",
"createWalletPasswordDescription": "Create a password to protect your wallet. This password will be required to unlock your wallet.",
"createWalletPasswordHint": "Enter your password",
"createWalletConfirmPasswordHint": "Confirm your password",
"passwordTooShortError": "Password must be at least 8 characters long.",
"passwordsDoNotMatchError": "Passwords do not match.",
"generateSeedTitle": "Write these down, in order",
- "generateSeedTitleCovered": "Seed Phrase",
+ "generateSeedTitleCovered": "Recovery Phrase",
"generateSeedSubtitleCovered": "These words, in this order, are your wallet. Write them down and keep them in a physical safe. If you lose these words or if you share them with anyone else, you will lose your money permanently. Careful planning now avoids a potential disaster later.",
"generateSeedSubtitleRevealed": "Securely save these. Do not share them.",
"generateSeedScreenshotNote": "Screenshots are blocked on this screen. Make sure nobody is looking over your shoulder.",
"generateSeedReveal": "Tap to reveal",
"generateSeedConfirm": "I have written down all the words and stored them somewhere only I can reach.",
"generateSeedBirthdayLabel": "Wallet birthday",
"generateSeedBirthdayReason": "Where a future restore starts scanning",
- "onboardingTorNotePrivacy": "Tor hides your address from the node you query — slower, and worth it.",
- "onboardingTorNoteChangeable": "Changeable later under Settings → Connections.",
- "onboardingPriceNoteRatesOnly": "The price service is asked for rates only — never for addresses or amounts.",
- "onboardingPriceNoteTor": "Routed over Tor by default, separately from chain traffic.",
- "onboardingConnectionNoteServer": "Point Skylight at a light-wallet server (LWS), or connect to your own Monero node.",
- "onboardingConnectionNoteChangeable": "Changeable later under Settings → Connection.",
- "onboardingWalletNoteGenerated": "A new wallet’s seed is generated here, offline, and shown to you once.",
- "onboardingWalletNoteRestore": "Restoring asks roughly when the seed first held funds, to skip years of scanning.",
- "onboardingWalletCreateBullet1": "A Monero seed phrase, shown once",
- "onboardingWalletCreateBullet2": "Starts empty, syncs from today",
- "onboardingWalletCreateBullet3": "Takes about two minutes",
- "onboardingWalletRestoreBullet1": "A Polyseed, BIP39 or legacy Monero seed",
- "onboardingWalletRestoreBullet2": "Optional scan-from date",
- "onboardingWalletRestoreBullet3": "Recovers your existing balance and history",
- "onboardingSeedNotePassword": "Skylight Wallet asks for your password before ever showing them again.",
- "onboardingPasswordNoteLaunch": "Asked for at every launch, and before the seed is ever shown.",
- "onboardingPasswordNoteNotCloud": "Not a cloud account. Losing it means restoring from your seed phrase.",
+ "onboardingTorNotePrivacy": "Connections over Tor can be slower.",
+ "onboardingTorNoteChangeable": "You can change this later in Settings.",
+ "onboardingPriceNoteRatesOnly": "Only prices are requested. Your addresses and balances are not sent.",
+ "onboardingPriceNoteTor": "Prices are fetched over Tor by default.",
+ "onboardingConnectionNoteServer": "Use a light-wallet server (LWS) or your own Monero node.",
+ "onboardingConnectionNoteChangeable": "You can change this later in Settings.",
+ "onboardingWalletNoteGenerated": "Skylight Wallet generates your recovery phrase on this device.",
+ "onboardingWalletNoteRestore": "When restoring, a scan-from date makes syncing faster.",
+ "onboardingSeedNotePassword": "Skylight Wallet asks for your password before showing these words again.",
+ "onboardingPasswordNoteLaunch": "You need this password to open your wallet and to view your recovery phrase.",
+ "onboardingPasswordNoteNotCloud": "This password can't be recovered. If you lose it, restore your wallet from your recovery phrase.",
"onboardingPasswordStrong": "Strong",
- "onboardingPasswordMatch": "Both entries match",
+ "onboardingPasswordMatch": "Passwords match",
"lwsDetailsTitle": "Wallet Details",
"lwsDetailsDescription": "If your Monero light wallet server (LWS) requires registration, you can use these details to add this wallet to that server. Not all servers require registration.",
"lwsDetailsPrimaryAddressLabel": "Primary Address",
"lwsDetailsSecretViewKeyLabel": "Secret View Key",
"lwsDetailsRestoreHeightLabel": "Restore Height",
"restoreWalletTitle": "Restore Wallet",
- "restoreWalletDescription": "Input your Monero seed below. We will check common formats.",
+ "restoreWalletDescription": "Input your Monero recovery phrase below. We will check common formats.",
"restoreWalletScanFrom": "Scan from",
"restoreWalletScanFromReason": "Skip irrelevant history to save time",
"restoreWalletNotSet": "Not set",
@@ -142,8 +142,8 @@
"restoreScanFromStart": "Genesis",
"restoreScanDone": "Done",
"restoreWalletRestoreButton": "Restore",
- "restoreWalletInvalidMnemonic": "Invalid seed.",
- "restoreWalletSeedLength": "Seed length",
+ "restoreWalletInvalidMnemonic": "Invalid recovery phrase.",
+ "restoreWalletSeedLength": "Number of words",
"restoreWalletPaste": "Paste",
"restoreWalletSeedTypePolyseed": "Polyseed",
"restoreWalletSeedTypeBip39": "BIP39",
@@ -164,8 +164,25 @@
}
}
},
- "restoreWalletChecksumError": "This isn't a valid seed phrase — check the words and their order.",
+ "restoreWalletChecksumError": "This isn't a valid recovery phrase — check the words and their order.",
"navigationBarWallet": "Wallet",
+ "historyTitle": "History",
+ "historyExportCsv": "Export CSV",
+ "historyExported": "History exported",
+ "historyExportFailed": "Could not export the history",
+ "navigationBarHistory": "History",
+ "historyFilterType": "Type",
+ "@historyFilterType": {
+ "description": "History filter: received or sent."
+ },
+ "historyFilterAddress": "Address",
+ "@historyFilterAddress": {
+ "description": "History filter: transactions received at, or sent to, one address."
+ },
+ "historyFilterAddressAny": "Any address",
+ "historyFilterAddressHint": "Transactions received at this address, or sent to it.",
+ "historyFilterAddressInvalid": "Not a Monero address",
+ "historyFilterReset": "Reset",
"navigationBarSettings": "Settings",
"unlockButton": "Unlock",
"unlockReason": "Unlock Wallet",
@@ -194,7 +211,8 @@
"coinHomeSent": "Sent",
"receiveTitle": "Receive",
"receivePrimaryAddressWarn": "Warning: Unless you know what you're doing, please use subaddresses for better privacy.",
- "receiveServerNoSubaddressesWarn": "Warning: This server does not support subaddresses. For better privacy, consider using a server that supports them. You are receiving to your primary address.",
+ "receiveServerNoSubaddressesWarn": "Warning: This server does not support subaddresses. For better privacy, consider using a server that supports them.",
+ "receiveSubaddressUnavailableWarn": "Warning: You need to configure Monero to enable subaddresses, which better protect your privacy.",
"receiveMaxSubaddressesReachedWarn": "You have reached the maximum number of subaddresses supported by this server. This is a used address.",
"receiveSubaddressTab": "Subaddress",
"receivePrimaryTab": "Primary address",
@@ -215,23 +233,33 @@
"sendSendButton": "Send",
"sendTransactionSuccessfullySent": "Transaction successfully sent!",
"sendOpenAliasResolveError": "Invalid OpenAlias.",
+ "sendOpenAliasDisabledError": "OpenAlias is turned off. Turn it on in Settings.",
"sendInvalidAddressError": "Invalid address.",
"sendInsufficientBalanceError": "Insufficient balance.",
"sendInsufficientBalanceToCoverFeeError": "Insufficient balance to cover the network fee.",
"settingsTitle": "Settings",
"settingsSectionGeneral": "General",
- "settingsSectionBehaviour": "Behaviour",
+ "settingsSectionSecurityPrivacy": "Security and privacy",
+ "settingsSectionData": "Data",
+ "settingsSectionBehaviour": "Behavior",
"settingsSectionWallet": "Wallet",
"settingsSectionAbout": "About",
"settingsNotifyNewTxsLabel": "Transaction Notifications",
- "settingsNotifyNewTxsDescription": "Show a notification when you receive a transaction. When connected to a Monero node, Background Sync must also be enabled.",
- "settingsNotifyNewTxsDescriptionIos": "Notifications will be delayed for Tor LWS connections.",
- "settingsAppLockLabel": "App Lock",
+ "settingsNotifyNewTxsDescription": "Show a notification when you receive a transaction. Increase the sync frequency setting to see them sooner.",
+ "settingsSyncFrequencyLabel": "Sync Frequency",
+ "syncFrequencySheetSubtitle": "How often Monero syncs while the app is closed.",
+ "syncFrequencyModeLabel": "Frequency",
+ "syncFrequencyContinuous": "Continuous",
+ "syncFrequencyContinuousDesc": "Continuously sync Monero in the background so it's always up to date when you open the app. Uses more battery and requires a persistent notification.",
+ "syncFrequencyPeriodic": "Periodic",
+ "syncFrequencyPeriodicDesc": "Periodically sync Monero in the background so it's usually up to date when you open the app. With a Monero node, it only syncs while charging and on WiFi.",
+ "syncFrequencyPeriodicDescIos": "Periodically sync Monero in the background so it's usually up to date when you open the app. With a Monero node, it only syncs while charging.",
+ "syncFrequencyOff": "Off",
+ "syncFrequencyOffDesc": "Only syncs while the app is open.",
"settingsAppLockUnlockReason": "Unlock Wallet",
- "settingsAppLockUnableToAuthError": "Unable to authenticate. Make sure you have device unlock set up.",
- "settingsVerboseLoggingLabel": "Diagnostic Logs",
- "settingsVerboseLoggingDescription": "Log wallet operations to a text file in the app's data folder for debugging purposes.",
- "settingsVerboseLoggingDescriptionIos": "Log wallet operations and allow the logs to be exported to a text file.",
+ "settingsLoggingLabel": "Diagnostic Logs",
+ "settingsLoggingDescription": "Log wallet operations to a text file in the app's data folder for debugging purposes.",
+ "settingsLoggingDescriptionIos": "Log wallet operations and allow the logs to be exported to a text file.",
"settingsExportLogsLabel": "Export Logs",
"settingsExportLogsButton": "Export",
"settingsExportLogsError": "No logs found to export.",
@@ -249,15 +277,19 @@
"settingsFiatApiSettingsLabel": "Price Display Settings",
"settingsLwsViewKeysLabel": "LWS View Keys",
"settingsLwsViewKeysButton": "View",
- "revealSeedAuthReason": "Confirm it's you to view your seed phrase",
+ "revealSeedAuthReason": "Confirm it's you to view your recovery phrase",
"settingsSecretKeysLabel": "Secret Restore Keys",
"settingsViewLwsKeysDialogText": "Only share this information with your light-wallet server. These keys allow the holder to permanently see all transactions related to your wallets. Sharing these with an untrusted person will significantly harm your privacy.",
"settingsViewLwsKeysDialogRevealButton": "Reveal",
"settingsViewSecretKeysDialogText": "Do not share these keys with anyone, including anyone claiming to be support. If you receive a request to provide these, you are being scammed. If you provide this information to another person, you will lose your money and it cannot be recovered.",
"settingsViewSecretKeysDialogRevealButton": "Reveal",
"settingsDeleteWalletButton": "Delete Wallet",
- "settingsDeleteWalletDialogText": "Are you sure you want to delete your wallet? You will lose access to your funds unless you have backed up your seed phrase.",
+ "settingsDeleteWalletDialogText": "Are you sure you want to delete your wallet? You will lose access to your funds unless you have backed up your recovery phrase. This will not remove your address book and app settings.",
"settingsDeleteWalletDialogDeleteButton": "Delete",
+ "settingsDeleteAddressBookButton": "Delete Address Book",
+ "settingsDeleteAddressBookDialogText": "Are you sure you want to delete your address book? If automatic backup is turned on, it will also delete the address book in these automatic backups.",
+ "settingsDeleteAddressBookDialogDeleteButton": "Delete",
+ "settingsAddressBookDeleted": "Address book deleted",
"txDetailsTitle": "Transaction Details",
"txDetailsHashLabel": "Hash",
"txDetailsTimeAndDateLabel": "Time and Date",
@@ -278,8 +310,8 @@
"lwsKeysSecretViewKey": "Secret View Key",
"lwsKeysWarning": "Screenshots are blocked on this screen. Make sure nobody is looking over your shoulder.",
"secretKeysTitle": "Secret Restore Keys",
- "secretKeysDescription": "These seeds and keys restore full control of your wallet. Anyone who sees them can spend your funds.",
- "secretKeysMnemonic": "Seed",
+ "secretKeysDescription": "These recovery phrases and keys restore full control of your wallet. Anyone who sees them can spend your funds.",
+ "secretKeysMnemonic": "Recovery phrase",
"secretKeysPublicSpendKey": "Public Spend Key",
"secretKeysSecretSpendKey": "Secret Spend Key",
"secretKeysPublicViewKey": "Public View Key",
@@ -331,7 +363,7 @@
"sendPriorityHeading": "Priority",
"sendPickContactTitle": "Send to a contact",
"sendAvailableSuffix": "available",
- "sendIrreversibleNote": "Monero transactions are irreversible. Double-check the address and amount before sending.",
+ "sendIrreversibleNote": "Transactions are irreversible, so make sure the address and amount are correct.",
"sendSwitchUnit": "Switch amount unit",
"sendFailedToGetFeesError": "Failed to get fees.",
"sendNoConnectionError": "Couldn't reach the server. Check your connection and try again.",
@@ -356,5 +388,36 @@
"torDisabledWalletsWarningConfirm": "Disable Tor",
"settingsTorSettingsLabel": "Tor Settings",
"lwsSetupTorDisabledError": "Tor is disabled. Please go back and enable it.",
- "lwsSetupInvalidQrCode": "Invalid connection address."
+ "coinHomeSwap": "Swap",
+ "coinHomeSwapComingSoon": "Coming soon!",
+ "verifySeedTitle": "Verify Recovery Phrase",
+ "homeIncomingTitle": "Incoming",
+ "homeIncomingUnlocksIn": "Unlocks in about {minutes, plural, =1{1 minute} other{{minutes} minutes}} · {done} of {needed}",
+ "@homeIncomingUnlocksIn": {"placeholders": {"minutes": {"type": "int"}, "done": {"type": "int"}, "needed": {"type": "int"}}},
+ "homeIncomingConfirmations": "{done} of {needed} confirmations",
+ "@homeIncomingConfirmations": {"placeholders": {"done": {"type": "int"}, "needed": {"type": "int"}}},
+ "homeChartTitle": "Balance · 90 days",
+ "homeChartToday": "Today",
+ "homeChartEachCoin": "Each coin's balance",
+ "homeChartNew": "New",
+ "homeChartEmpty": "Your balance over time shows here after your first transaction.",
+ "homeChecklistTitle": "Secure your wallet",
+ "homeChecklistProgress": "{done} of {total}",
+ "@homeChecklistProgress": {"placeholders": {"done": {"type": "int"}, "total": {"type": "int"}}},
+ "homeChecklistVerifySeed": "Verify your recovery phrase",
+ "homeChecklistAutoBackup": "Turn on automatic backups",
+ "homeChecklistTor": "Connect through Tor",
+ "homeChecklistPrivateLookups": "Use Tor for price and OpenAlias lookups",
+ "homeChecklistSecurityKeys": "Set up a security key",
+ "verifySeedSubtitle": "Input words {first}, {second} and {third} of your recovery phrase below.",
+ "@verifySeedSubtitle": {"placeholders": {"first": {"type": "int"}, "second": {"type": "int"}, "third": {"type": "int"}}},
+ "verifySeedButton": "Verify",
+ "verifySeedWrongTitle": "Those words don't match",
+ "verifySeedWrongBody": "Check the recovery phrase you wrote down, then enter the three new words asked for. {count, plural, =1{1 try} other{{count} tries}} left before the app locks.",
+ "@verifySeedWrongBody": {"placeholders": {"count": {"type": "int"}}},
+ "verifySeedTryAgain": "Try again",
+ "verifySeedUnavailable": "Your recovery phrase can't be read right now. Try again after unlocking the wallet.",
+ "verifySeedDone": "Recovery phrase verified",
+ "homeIncomingTitleMore": "Incoming (+{count, plural, =1{1 Other} other{{count} Others}})",
+ "@homeIncomingTitleMore": {"placeholders": {"count": {"type": "int"}}}
}
### lib/l10n/app_localizations.dart
@@ -225,6 +225,12 @@ abstract class AppLocalizations {
/// **'Privacy Policy'**
String get welcomePrivacyLink;
+ /// No description provided for @settingsLicensesLabel.
+ ///
+ /// In en, this message translates to:
+ /// **'Open-Source Licenses'**
+ String get settingsLicensesLabel;
+
/// No description provided for @lwsSetupTitle.
///
/// In en, this message translates to:
@@ -303,6 +309,24 @@ abstract class AppLocalizations {
/// **'An onion address can only be reached through Tor. Turn Tor on to use it.'**
String get connectionOnionNeedsTor;
+ /// No description provided for @connectionPathNotSupported.
+ ///
+ /// In en, this message translates to:
+ /// **'This server is reached at its root, so its address can\'t include a path like /wallet. Remove the path.'**
+ String get connectionPathNotSupported;
+
+ /// No description provided for @lwsAwaitingApprovalAccount.
+ ///
+ /// In en, this message translates to:
+ /// **'Your light wallet server hasn\'t approved this wallet yet. Ask the server\'s operator to approve it so you can see your balance and transactions.'**
+ String get lwsAwaitingApprovalAccount;
+
+ /// No description provided for @lwsAwaitingApprovalRestoreHeight.
+ ///
+ /// In en, this message translates to:
+ /// **'Your light wallet server hasn\'t approved scanning from your restore height yet, so older transactions may be missing. Ask the server\'s operator to approve it.'**
+ String get lwsAwaitingApprovalRestoreHeight;
+
/// No description provided for @connectionTorDisabledWarning.
///
/// In en, this message translates to:
@@ -423,35 +447,11 @@ abstract class AppLocalizations {
/// **'in Local Network'**
String get settingsConnectionInLocalNetwork;
- /// No description provided for @settingsBackgroundSyncLabel.
- ///
- /// In en, this message translates to:
- /// **'Background Sync'**
- String get settingsBackgroundSyncLabel;
-
- /// No description provided for @settingsBackgroundSyncDescription.
- ///
- /// In en, this message translates to:
- /// **'Periodically sync Monero in the background so it\'s up to date when you open the app. Only runs while charging and on WiFi.'**
- String get settingsBackgroundSyncDescription;
-
- /// No description provided for @settingsForegroundSyncLabel.
- ///
- /// In en, this message translates to:
- /// **'Continuous Sync'**
- String get settingsForegroundSyncLabel;
-
- /// No description provided for @settingsForegroundSyncDescription.
- ///
- /// In en, this message translates to:
- /// **'Keep Monero syncing continuously while the app runs in the background, with a persistent notification. Uses more battery.'**
- String get settingsForegroundSyncDescription;
-
/// No description provided for @homeBlocksRemaining.
///
/// In en, this message translates to:
- /// **'{count} blocks left'**
- String homeBlocksRemaining(String count);
+ /// **'{count, plural, =1{1 block left} other{{count} blocks left}}'**
+ String homeBlocksRemaining(int count);
/// No description provided for @fiatApiSetupTitle.
///
@@ -507,6 +507,36 @@ abstract class AppLocalizations {
/// **'No prices fetched, balances shown in crypto only'**
String get fiatModeDisabledDesc;
+ /// No description provided for @settingsOpenAliasSettingsLabel.
+ ///
+ /// In en, this message translates to:
+ /// **'OpenAlias Settings'**
+ String get settingsOpenAliasSettingsLabel;
+
+ /// No description provided for @openAliasSettingsSheetSubtitle.
+ ///
+ /// In en, this message translates to:
+ /// **'How names like name@example.com are looked up when you send.'**
+ String get openAliasSettingsSheetSubtitle;
+
+ /// No description provided for @openAliasModeTorOnlyDesc.
+ ///
+ /// In en, this message translates to:
+ /// **'Names looked up over Tor · recommended'**
+ String get openAliasModeTorOnlyDesc;
+
+ /// No description provided for @openAliasModeClearnetDesc.
+ ///
+ /// In en, this message translates to:
+ /// **'Not private, DNS servers see your IP address and the name'**
+ String get openAliasModeClearnetDesc;
+
+ /// No description provided for @openAliasModeDisabledDesc.
+ ///
+ /// In en, this message translates to:
+ /// **'No lookups, send to addresses only'**
+ String get openAliasModeDisabledDesc;
+
/// No description provided for @fiatApiSettingsDisplayCurrencyLabel.
///
/// In en, this message translates to:
@@ -534,7 +564,7 @@ abstract class AppLocalizations {
/// No description provided for @createWalletRestoreExistingDesc.
///
/// In en, this message translates to:
- /// **'Enter an existing Monero seed'**
+ /// **'Enter an existing Monero recovery phrase'**
String get createWalletRestoreExistingDesc;
/// No description provided for @createWalletCreateNewButton.
@@ -546,7 +576,7 @@ abstract class AppLocalizations {
/// No description provided for @createWalletCreateNewDesc.
///
/// In en, this message translates to:
- /// **'Skylight Wallet generates a new polyseed'**
+ /// **'Skylight Wallet generates a new Polyseed recovery phrase'**
String get createWalletCreateNewDesc;
/// No description provided for @createWalletPasswordTitle.
@@ -594,7 +624,7 @@ abstract class AppLocalizations {
/// No description provided for @generateSeedTitleCovered.
///
/// In en, this message translates to:
- /// **'Seed Phrase'**
+ /// **'Recovery Phrase'**
String get generateSeedTitleCovered;
/// No description provided for @generateSeedSubtitleCovered.
@@ -642,103 +672,67 @@ abstract class AppLocalizations {
/// No description provided for @onboardingTorNotePrivacy.
///
/// In en, this message translates to:
- /// **'Tor hides your address from the node you query — slower, and worth it.'**
+ /// **'Connections over Tor can be slower.'**
String get onboardingTorNotePrivacy;
/// No description provided for @onboardingTorNoteChangeable.
///
/// In en, this message translates to:
- /// **'Changeable later under Settings → Connections.'**
+ /// **'You can change this later in Settings.'**
String get onboardingTorNoteChangeable;
/// No description provided for @onboardingPriceNoteRatesOnly.
///
/// In en, this message translates to:
- /// **'The price service is asked for rates only — never for addresses or amounts.'**
+ /// **'Only prices are requested. Your addresses and balances are not sent.'**
String get onboardingPriceNoteRatesOnly;
/// No description provided for @onboardingPriceNoteTor.
///
/// In en, this message translates to:
- /// **'Routed over Tor by default, separately from chain traffic.'**
+ /// **'Prices are fetched over Tor by default.'**
String get onboardingPriceNoteTor;
/// No description provided for @onboardingConnectionNoteServer.
///
/// In en, this message translates to:
- /// **'Point Skylight at a light-wallet server (LWS), or connect to your own Monero node.'**
+ /// **'Use a light-wallet server (LWS) or your own Monero node.'**
String get onboardingConnectionNoteServer;
/// No description provided for @onboardingConnectionNoteChangeable.
///
/// In en, this message translates to:
- /// **'Changeable later under Settings → Connection.'**
+ /// **'You can change this later in Settings.'**
String get onboardingConnectionNoteChangeable;
/// No description provided for @onboardingWalletNoteGenerated.
///
/// In en, this message translates to:
- /// **'A new wallet’s seed is generated here, offline, and shown to you once.'**
+ /// **'Skylight Wallet generates your recovery phrase on this device.'**
String get onboardingWalletNoteGenerated;
/// No description provided for @onboardingWalletNoteRestore.
///
/// In en, this message translates to:
- /// **'Restoring asks roughly when the seed first held funds, to skip years of scanning.'**
+ /// **'When restoring, a scan-from date makes syncing faster.'**
String get onboardingWalletNoteRestore;
- /// No description provided for @onboardingWalletCreateBullet1.
- ///
- /// In en, this message translates to:
- /// **'A Monero seed phrase, shown once'**
- String get onboardingWalletCreateBullet1;
-
- /// No description provided for @onboardingWalletCreateBullet2.
- ///
- /// In en, this message translates to:
- /// **'Starts empty, syncs from today'**
- String get onboardingWalletCreateBullet2;
-
- /// No description provided for @onboardingWalletCreateBullet3.
- ///
- /// In en, this message translates to:
- /// **'Takes about two minutes'**
- String get onboardingWalletCreateBullet3;
-
- /// No description provided for @onboardingWalletRestoreBullet1.
- ///
- /// In en, this message translates to:
- /// **'A Polyseed, BIP39 or legacy Monero seed'**
- String get onboardingWalletRestoreBullet1;
-
- /// No description provided for @onboardingWalletRestoreBullet2.
- ///
- /// In en, this message translates to:
- /// **'Optional scan-from date'**
- String get onboardingWalletRestoreBullet2;
-
- /// No description provided for @onboardingWalletRestoreBullet3.
- ///
- /// In en, this message translates to:
- /// **'Recovers your existing balance and history'**
- String get onboardingWalletRestoreBullet3;
-
/// No description provided for @onboardingSeedNotePassword.
///
/// In en, this message translates to:
- /// **'Skylight Wallet asks for your password before ever showing them again.'**
+ /// **'Skylight Wallet asks for your password before showing these words again.'**
String get onboardingSeedNotePassword;
/// No description provided for @onboardingPasswordNoteLaunch.
///
/// In en, this message translates to:
- /// **'Asked for at every launch, and before the seed is ever shown.'**
+ /// **'You need this password to open your wallet and to view your recovery phrase.'**
String get onboardingPasswordNoteLaunch;
/// No description provided for @onboardingPasswordNoteNotCloud.
///
/// In en, this message translates to:
- /// **'Not a cloud account. Losing it means restoring from your seed phrase.'**
+ /// **'This password can\'t be recovered. If you lose it, restore your wallet from your recovery phrase.'**
String get onboardingPasswordNoteNotCloud;
/// No description provided for @onboardingPasswordStrong.
@@ -750,7 +744,7 @@ abstract class AppLocalizations {
/// No description provided for @onboardingPasswordMatch.
///
/// In en, this message translates to:
- /// **'Both entries match'**
+ /// **'Passwords match'**
String get onboardingPasswordMatch;
/// No description provided for @lwsDetailsTitle.
@@ -792,7 +786,7 @@ abstract class AppLocalizations {
/// No description provided for @restoreWalletDescription.
///
/// In en, this message translates to:
- /// **'Input your Monero seed below. We will check common formats.'**
+ /// **'Input your Monero recovery phrase below. We will check common formats.'**
String get restoreWalletDescription;
/// No description provided for @restoreWalletScanFrom.
@@ -864,13 +858,13 @@ abstract class AppLocalizations {
/// No description provided for @restoreWalletInvalidMnemonic.
///
/// In en, this message translates to:
- /// **'Invalid seed.'**
+ /// **'Invalid recovery phrase.'**
String get restoreWalletInvalidMnemonic;
/// No description provided for @restoreWalletSeedLength.
///
/// In en, this message translates to:
- /// **'Seed length'**
+ /// **'Number of words'**
String get restoreWalletSeedLength;
/// No description provided for @restoreWalletPaste.
@@ -912,7 +906,7 @@ abstract class AppLocalizations {
/// No description provided for @restoreWalletChecksumError.
///
/// In en, this message translates to:
- /// **'This isn\'t a valid seed phrase — check the words and their order.'**
+ /// **'This isn\'t a valid recovery phrase — check the words and their order.'**
String get restoreWalletChecksumError;
/// No description provided for @navigationBarWallet.
@@ -921,6 +915,72 @@ abstract class AppLocalizations {
/// **'Wallet'**
String get navigationBarWallet;
+ /// No description provided for @historyTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'History'**
+ String get historyTitle;
+
+ /// No description provided for @historyExportCsv.
+ ///
+ /// In en, this message translates to:
+ /// **'Export CSV'**
+ String get historyExportCsv;
+
+ /// No description provided for @historyExported.
+ ///
+ /// In en, this message translates to:
+ /// **'History exported'**
+ String get historyExported;
+
+ /// No description provided for @historyExportFailed.
+ ///
+ /// In en, this message translates to:
+ /// **'Could not export the history'**
+ String get historyExportFailed;
+
+ /// No description provided for @navigationBarHistory.
+ ///
+ /// In en, this message translates to:
+ /// **'History'**
+ String get navigationBarHistory;
+
+ /// History filter: received or sent.
+ ///
+ /// In en, this message translates to:
+ /// **'Type'**
+ String get historyFilterType;
+
+ /// History filter: transactions received at, or sent to, one address.
+ ///
+ /// In en, this message translates to:
+ /// **'Address'**
+ String get historyFilterAddress;
+
+ /// No description provided for @historyFilterAddressAny.
+ ///
+ /// In en, this message translates to:
+ /// **'Any address'**
+ String get historyFilterAddressAny;
+
+ /// No description provided for @historyFilterAddressHint.
+ ///
+ /// In en, this message translates to:
+ /// **'Transactions received at this address, or sent to it.'**
+ String get historyFilterAddressHint;
+
+ /// No description provided for @historyFilterAddressInvalid.
+ ///
+ /// In en, this message translates to:
+ /// **'Not a Monero address'**
+ String get historyFilterAddressInvalid;
+
+ /// No description provided for @historyFilterReset.
+ ///
+ /// In en, this message translates to:
+ /// **'Reset'**
+ String get historyFilterReset;
+
/// No description provided for @navigationBarSettings.
///
/// In en, this message translates to:
@@ -1092,9 +1152,15 @@ abstract class AppLocalizations {
/// No description provided for @receiveServerNoSubaddressesWarn.
///
/// In en, this message translates to:
- /// **'Warning: This server does not support subaddresses. For better privacy, consider using a server that supports them. You are receiving to your primary address.'**
+ /// **'Warning: This server does not support subaddresses. For better privacy, consider using a server that supports them.'**
String get receiveServerNoSubaddressesWarn;
+ /// No description provided for @receiveSubaddressUnavailableWarn.
+ ///
+ /// In en, this message translates to:
+ /// **'Warning: You need to configure Monero to enable subaddresses, which better protect your privacy.'**
+ String get receiveSubaddressUnavailableWarn;
+
/// No description provided for @receiveMaxSubaddressesReachedWarn.
///
/// In en, this message translates to:
@@ -1173,6 +1239,12 @@ abstract class AppLocalizations {
/// **'Invalid OpenAlias.'**
String get sendOpenAliasResolveError;
+ /// No description provided for @sendOpenAliasDisabledError.
+ ///
+ /// In en, this message translates to:
+ /// **'OpenAlias is turned off. Turn it on in Settings.'**
+ String get sendOpenAliasDisabledError;
+
/// No description provided for @sendInvalidAddressError.
///
/// In en, this message translates to:
@@ -1203,10 +1275,22 @@ abstract class AppLocalizations {
/// **'General'**
String get settingsSectionGeneral;
+ /// No description provided for @settingsSectionSecurityPrivacy.
+ ///
+ /// In en, this message translates to:
+ /// **'Security and privacy'**
+ String get settingsSectionSecurityPrivacy;
+
+ /// No description provided for @settingsSectionData.
+ ///
+ /// In en, this message translates to:
+ /// **'Data'**
+ String get settingsSectionData;
+
/// No description provided for @settingsSectionBehaviour.
///
/// In en, this message translates to:
- /// **'Behaviour'**
+ /// **'Behavior'**
String get settingsSectionBehaviour;
/// No description provided for @settingsSectionWallet.
@@ -1230,50 +1314,92 @@ abstract class AppLocalizations {
/// No description provided for @settingsNotifyNewTxsDescription.
///
/// In en, this message translates to:
- /// **'Show a notification when you receive a transaction. When connected to a Monero node, Background Sync must also be enabled.'**
+ /// **'Show a notification when you receive a transaction. Increase the sync frequency setting to see them sooner.'**
String get settingsNotifyNewTxsDescription;
- /// No description provided for @settingsNotifyNewTxsDescriptionIos.
+ /// No description provided for @settingsSyncFrequencyLabel.
///
/// In en, this message translates to:
- /// **'Notifications will be delayed for Tor LWS connections.'**
- String get settingsNotifyNewTxsDescriptionIos;
+ /// **'Sync Frequency'**
+ String get settingsSyncFrequencyLabel;
- /// No description provided for @settingsAppLockLabel.
+ /// No description provided for @syncFrequencySheetSubtitle.
///
/// In en, this message translates to:
- /// **'App Lock'**
- String get settingsAppLockLabel;
+ /// **'How often Monero syncs while the app is closed.'**
+ String get syncFrequencySheetSubtitle;
- /// No description provided for @settingsAppLockUnlockReason.
+ /// No description provided for @syncFrequencyModeLabel.
///
/// In en, this message translates to:
- /// **'Unlock Wallet'**
- String get settingsAppLockUnlockReason;
+ /// **'Frequency'**
+ String get syncFrequencyModeLabel;
+
+ /// No description provided for @syncFrequencyContinuous.
+ ///
+ /// In en, this message translates to:
+ /// **'Continuous'**
+ String get syncFrequencyContinuous;
- /// No description provided for @settingsAppLockUnableToAuthError.
+ /// No description provided for @syncFrequencyContinuousDesc.
///
/// In en, this message translates to:
- /// **'Unable to authenticate. Make sure you have device unlock set up.'**
- String get settingsAppLockUnableToAuthError;
+ /// **'Continuously sync Monero in the background so it\'s always up to date when you open the app. Uses more battery and requires a persistent notification.'**
+ String get syncFrequencyContinuousDesc;
- /// No description provided for @settingsVerboseLoggingLabel.
+ /// No description provided for @syncFrequencyPeriodic.
+ ///
+ /// In en, this message translates to:
+ /// **'Periodic'**
+ String get syncFrequencyPeriodic;
+
+ /// No description provided for @syncFrequencyPeriodicDesc.
+ ///
+ /// In en, this message translates to:
+ /// **'Periodically sync Monero in the background so it\'s usually up to date when you open the app. With a Monero node, it only syncs while charging and on WiFi.'**
+ String get syncFrequencyPeriodicDesc;
+
+ /// No description provided for @syncFrequencyPeriodicDescIos.
+ ///
+ /// In en, this message translates to:
+ /// **'Periodically sync Monero in the background so it\'s usually up to date when you open the app. With a Monero node, it only syncs while charging.'**
+ String get syncFrequencyPeriodicDescIos;
+
+ /// No description provided for @syncFrequencyOff.
+ ///
+ /// In en, this message translates to:
+ /// **'Off'**
+ String get syncFrequencyOff;
+
+ /// No description provided for @syncFrequencyOffDesc.
+ ///
+ /// In en, this message translates to:
+ /// **'Only syncs while the app is open.'**
+ String get syncFrequencyOffDesc;
+
+ /// No description provided for @settingsAppLockUnlockReason.
+ ///
+ /// In en, this message translates to:
+ /// **'Unlock Wallet'**
+ String get settingsAppLockUnlockReason;
+
+ /// No description provided for @settingsLoggingLabel.
///
/// In en, this message translates to:
/// **'Diagnostic Logs'**
- String get settingsVerboseLoggingLabel;
+ String get settingsLoggingLabel;
- /// No description provided for @settingsVerboseLoggingDescription.
+ /// No description provided for @settingsLoggingDescription.
///
/// In en, this message translates to:
/// **'Log wallet operations to a text file in the app\'s data folder for debugging purposes.'**
- String get settingsVerboseLoggingDescription;
+ String get settingsLoggingDescription;
- /// No description provided for @settingsVerboseLoggingDescriptionIos.
+ /// No description provided for @settingsLoggingDescriptionIos.
///
/// In en, this message translates to:
/// **'Log wallet operations and allow the logs to be exported to a text file.'**
- String get settingsVerboseLoggingDescriptionIos;
+ String get settingsLoggingDescriptionIos;
/// No description provided for @settingsExportLogsLabel.
///
@@ -1380,7 +1506,7 @@ abstract class AppLocalizations {
/// No description provided for @revealSeedAuthReason.
///
/// In en, this message translates to:
- /// **'Confirm it\'s you to view your seed phrase'**
+ /// **'Confirm it\'s you to view your recovery phrase'**
String get revealSeedAuthReason;
/// No description provided for @settingsSecretKeysLabel.
@@ -1422,7 +1548,7 @@ abstract class AppLocalizations {
/// No description provided for @settingsDeleteWalletDialogText.
///
/// In en, this message translates to:
- /// **'Are you sure you want to delete your wallet? You will lose access to your funds unless you have backed up your seed phrase.'**
+ /// **'Are you sure you want to delete your wallet? You will lose access to your funds unless you have backed up your recovery phrase. This will not remove your address book and app settings.'**
String get settingsDeleteWalletDialogText;
/// No description provided for @settingsDeleteWalletDialogDeleteButton.
@@ -1431,6 +1557,30 @@ abstract class AppLocalizations {
/// **'Delete'**
String get settingsDeleteWalletDialogDeleteButton;
+ /// No description provided for @settingsDeleteAddressBookButton.
+ ///
+ /// In en, this message translates to:
+ /// **'Delete Address Book'**
+ String get settingsDeleteAddressBookButton;
+
+ /// No description provided for @settingsDeleteAddressBookDialogText.
+ ///
+ /// In en, this message translates to:
+ /// **'Are you sure you want to delete your address book? If automatic backup is turned on, it will also delete the address book in these automatic backups.'**
+ String get settingsDeleteAddressBookDialogText;
+
+ /// No description provided for @settingsDeleteAddressBookDialogDeleteButton.
+ ///
+ /// In en, this message translates to:
+ /// **'Delete'**
+ String get settingsDeleteAddressBookDialogDeleteButton;
+
+ /// No description provided for @settingsAddressBookDeleted.
+ ///
+ /// In en, this message translates to:
+ /// **'Address book deleted'**
+ String get settingsAddressBookDeleted;
+
/// No description provided for @txDetailsTitle.
///
/// In en, this message translates to:
@@ -1554,13 +1704,13 @@ abstract class AppLocalizations {
/// No description provided for @secretKeysDescription.
///
/// In en, this message translates to:
- /// **'These seeds and keys restore full control of your wallet. Anyone who sees them can spend your funds.'**
+ /// **'These recovery phrases and keys restore full control of your wallet. Anyone who sees them can spend your funds.'**
String get secretKeysDescription;
/// No description provided for @secretKeysMnemonic.
///
/// In en, this message translates to:
- /// **'Seed'**
+ /// **'Recovery phrase'**
String get secretKeysMnemonic;
/// No description provided for @secretKeysPublicSpendKey.
@@ -1788,7 +1938,7 @@ abstract class AppLocalizations {
/// No description provided for @sendIrreversibleNote.
///
/// In en, this message translates to:
- /// **'Monero transactions are irreversible. Double-check the address and amount before sending.'**
+ /// **'Transactions are irreversible, so make sure the address and amount are correct.'**
String get sendIrreversibleNote;
/// No description provided for @sendSwitchUnit.
@@ -1935,11 +2085,161 @@ abstract class AppLocalizations {
/// **'Tor is disabled. Please go back and enable it.'**
String get lwsSetupTorDisabledError;
- /// No description provided for @lwsSetupInvalidQrCode.
+ /// No description provided for @coinHomeSwap.
+ ///
+ /// In en, this message translates to:
+ /// **'Swap'**
+ String get coinHomeSwap;
+
+ /// No description provided for @coinHomeSwapComingSoon.
+ ///
+ /// In en, this message translates to:
+ /// **'Coming soon!'**
+ String get coinHomeSwapComingSoon;
+
+ /// No description provided for @verifySeedTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Verify Recovery Phrase'**
+ String get verifySeedTitle;
+
+ /// No description provided for @homeIncomingTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Incoming'**
+ String get homeIncomingTitle;
+
+ /// No description provided for @homeIncomingUnlocksIn.
+ ///
+ /// In en, this message translates to:
+ /// **'Unlocks in about {minutes, plural, =1{1 minute} other{{minutes} minutes}} · {done} of {needed}'**
+ String homeIncomingUnlocksIn(int minutes, int done, int needed);
+
+ /// No description provided for @homeIncomingConfirmations.
+ ///
+ /// In en, this message translates to:
+ /// **'{done} of {needed} confirmations'**
+ String homeIncomingConfirmations(int done, int needed);
+
+ /// No description provided for @homeChartTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Balance · 90 days'**
+ String get homeChartTitle;
+
+ /// No description provided for @homeChartToday.
+ ///
+ /// In en, this message translates to:
+ /// **'Today'**
+ String get homeChartToday;
+
+ /// No description provided for @homeChartEachCoin.
+ ///
+ /// In en, this message translates to:
+ /// **'Each coin\'s balance'**
+ String get homeChartEachCoin;
+
+ /// No description provided for @homeChartNew.
+ ///
+ /// In en, this message translates to:
+ /// **'New'**
+ String get homeChartNew;
+
+ /// No description provided for @homeChartEmpty.
+ ///
+ /// In en, this message translates to:
+ /// **'Your balance over time shows here after your first transaction.'**
+ String get homeChartEmpty;
+
+ /// No description provided for @homeChecklistTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Secure your wallet'**
+ String get homeChecklistTitle;
+
+ /// No description provided for @homeChecklistProgress.
+ ///
+ /// In en, this message translates to:
+ /// **'{done} of {total}'**
+ String homeChecklistProgress(int done, int total);
+
+ /// No description provided for @homeChecklistVerifySeed.
+ ///
+ /// In en, this message translates to:
+ /// **'Verify your recovery phrase'**
+ String get homeChecklistVerifySeed;
+
+ /// No description provided for @homeChecklistAutoBackup.
+ ///
+ /// In en, this message translates to:
+ /// **'Turn on automatic backups'**
+ String get homeChecklistAutoBackup;
+
+ /// No description provided for @homeChecklistTor.
+ ///
+ /// In en, this message translates to:
+ /// **'Connect through Tor'**
+ String get homeChecklistTor;
+
+ /// No description provided for @homeChecklistPrivateLookups.
+ ///
+ /// In en, this message translates to:
+ /// **'Use Tor for price and OpenAlias lookups'**
+ String get homeChecklistPrivateLookups;
+
+ /// No description provided for @homeChecklistSecurityKeys.
+ ///
+ /// In en, this message translates to:
+ /// **'Set up a security key'**
+ String get homeChecklistSecurityKeys;
+
+ /// No description provided for @verifySeedSubtitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Input words {first}, {second} and {third} of your recovery phrase below.'**
+ String verifySeedSubtitle(int first, int second, int third);
+
+ /// No description provided for @verifySeedButton.
+ ///
+ /// In en, this message translates to:
+ /// **'Verify'**
+ String get verifySeedButton;
+
+ /// No description provided for @verifySeedWrongTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Those words don\'t match'**
+ String get verifySeedWrongTitle;
+
+ /// No description provided for @verifySeedWrongBody.
+ ///
+ /// In en, this message translates to:
+ /// **'Check the recovery phrase you wrote down, then enter the three new words asked for. {count, plural, =1{1 try} other{{count} tries}} left before the app locks.'**
+ String verifySeedWrongBody(int count);
+
+ /// No description provided for @verifySeedTryAgain.
+ ///
+ /// In en, this message translates to:
+ /// **'Try again'**
+ String get verifySeedTryAgain;
+
+ /// No description provided for @verifySeedUnavailable.
+ ///
+ /// In en, this message translates to:
+ /// **'Your recovery phrase can\'t be read right now. Try again after unlocking the wallet.'**
+ String get verifySeedUnavailable;
+
+ /// No description provided for @verifySeedDone.
+ ///
+ /// In en, this message translates to:
+ /// **'Recovery phrase verified'**
+ String get verifySeedDone;
+
+ /// No description provided for @homeIncomingTitleMore.
///
/// In en, this message translates to:
- /// **'Invalid connection address.'**
- String get lwsSetupInvalidQrCode;
+ /// **'Incoming (+{count, plural, =1{1 Other} other{{count} Others}})'**
+ String homeIncomingTitleMore(int count);
}
class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
### lib/l10n/app_localizations_en.dart
@@ -1,5 +1,6 @@
// ignore: unused_import
import 'package:intl/intl.dart' as intl;
+
import 'app_localizations.dart';
// ignore_for_file: type=lint
@@ -77,6 +78,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get welcomePrivacyLink => 'Privacy Policy';
+ @override
+ String get settingsLicensesLabel => 'Open-Source Licenses';
+
@override
String get lwsSetupTitle => 'Connection Setup';
@@ -120,6 +124,18 @@ class AppLocalizationsEn extends AppLocalizations {
String get connectionOnionNeedsTor =>
'An onion address can only be reached through Tor. Turn Tor on to use it.';
+ @override
+ String get connectionPathNotSupported =>
+ 'This server is reached at its root, so its address can\'t include a path like /wallet. Remove the path.';
+
+ @override
+ String get lwsAwaitingApprovalAccount =>
+ 'Your light wallet server hasn\'t approved this wallet yet. Ask the server\'s operator to approve it so you can see your balance and transactions.';
+
+ @override
+ String get lwsAwaitingApprovalRestoreHeight =>
+ 'Your light wallet server hasn\'t approved scanning from your restore height yet, so older transactions may be missing. Ask the server\'s operator to approve it.';
+
@override
String get connectionTorDisabledWarning =>
'Tor is disabled, so this connection no longer works. Please reconfigure it.';
@@ -183,22 +199,17 @@ class AppLocalizationsEn extends AppLocalizations {
String get settingsConnectionInLocalNetwork => 'in Local Network';
@override
- String get settingsBackgroundSyncLabel => 'Background Sync';
+ String homeBlocksRemaining(int count) {
+ final intl.NumberFormat countNumberFormat = intl.NumberFormat.decimalPattern(localeName);
+ final String countString = countNumberFormat.format(count);
- @override
- String get settingsBackgroundSyncDescription =>
- 'Periodically sync Monero in the background so it\'s up to date when you open the app. Only runs while charging and on WiFi.';
-
- @override
- String get settingsForegroundSyncLabel => 'Continuous Sync';
-
- @override
- String get settingsForegroundSyncDescription =>
- 'Keep Monero syncing continuously while the app runs in the background, with a persistent notification. Uses more battery.';
-
- @override
- String homeBlocksRemaining(String count) {
- return '$count blocks left';
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$countString blocks left',
+ one: '1 block left',
+ );
+ return '$_temp0';
}
@override
@@ -229,6 +240,23 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get fiatModeDisabledDesc => 'No prices fetched, balances shown in crypto only';
+ @override
+ String get settingsOpenAliasSettingsLabel => 'OpenAlias Settings';
+
+ @override
+ String get openAliasSettingsSheetSubtitle =>
+ 'How names like name@example.com are looked up when you send.';
+
+ @override
+ String get openAliasModeTorOnlyDesc => 'Names looked up over Tor · recommended';
+
+ @override
+ String get openAliasModeClearnetDesc =>
+ 'Not private, DNS servers see your IP address and the name';
+
+ @override
+ String get openAliasModeDisabledDesc => 'No lookups, send to addresses only';
+
@override
String get fiatApiSettingsDisplayCurrencyLabel => 'Display Currency';
@@ -243,13 +271,14 @@ class AppLocalizationsEn extends AppLocalizations {
String get createWalletRestoreExistingButton => 'Restore Existing';
@override
- String get createWalletRestoreExistingDesc => 'Enter an existing Monero seed';
+ String get createWalletRestoreExistingDesc => 'Enter an existing Monero recovery phrase';
@override
String get createWalletCreateNewButton => 'Create New';
@override
- String get createWalletCreateNewDesc => 'Skylight Wallet generates a new polyseed';
+ String get createWalletCreateNewDesc =>
+ 'Skylight Wallet generates a new Polyseed recovery phrase';
@override
String get createWalletPasswordTitle => 'Create Wallet Password';
@@ -274,7 +303,7 @@ class AppLocalizationsEn extends AppLocalizations {
String get generateSeedTitle => 'Write these down, in order';
@override
- String get generateSeedTitleCovered => 'Seed Phrase';
+ String get generateSeedTitleCovered => 'Recovery Phrase';
@override
String get generateSeedSubtitleCovered =>
@@ -301,69 +330,50 @@ class AppLocalizationsEn extends AppLocalizations {
String get generateSeedBirthdayReason => 'Where a future restore starts scanning';
@override
- String get onboardingTorNotePrivacy =>
- 'Tor hides your address from the node you query — slower, and worth it.';
+ String get onboardingTorNotePrivacy => 'Connections over Tor can be slower.';
@override
- String get onboardingTorNoteChangeable => 'Changeable later under Settings → Connections.';
+ String get onboardingTorNoteChangeable => 'You can change this later in Settings.';
@override
String get onboardingPriceNoteRatesOnly =>
- 'The price service is asked for rates only — never for addresses or amounts.';
+ 'Only prices are requested. Your addresses and balances are not sent.';
@override
- String get onboardingPriceNoteTor => 'Routed over Tor by default, separately from chain traffic.';
+ String get onboardingPriceNoteTor => 'Prices are fetched over Tor by default.';
@override
String get onboardingConnectionNoteServer =>
- 'Point Skylight at a light-wallet server (LWS), or connect to your own Monero node.';
+ 'Use a light-wallet server (LWS) or your own Monero node.';
@override
- String get onboardingConnectionNoteChangeable => 'Changeable later under Settings → Connection.';
+ String get onboardingConnectionNoteChangeable => 'You can change this later in Settings.';
@override
String get onboardingWalletNoteGenerated =>
- 'A new wallet’s seed is generated here, offline, and shown to you once.';
+ 'Skylight Wallet generates your recovery phrase on this device.';
@override
String get onboardingWalletNoteRestore =>
- 'Restoring asks roughly when the seed first held funds, to skip years of scanning.';
-
- @override
- String get onboardingWalletCreateBullet1 => 'A Monero seed phrase, shown once';
-
- @override
- String get onboardingWalletCreateBullet2 => 'Starts empty, syncs from today';
-
- @override
- String get onboardingWalletCreateBullet3 => 'Takes about two minutes';
-
- @override
- String get onboardingWalletRestoreBullet1 => 'A Polyseed, BIP39 or legacy Monero seed';
-
- @override
- String get onboardingWalletRestoreBullet2 => 'Optional scan-from date';
-
- @override
- String get onboardingWalletRestoreBullet3 => 'Recovers your existing balance and history';
+ 'When restoring, a scan-from date makes syncing faster.';
@override
String get onboardingSeedNotePassword =>
- 'Skylight Wallet asks for your password before ever showing them again.';
+ 'Skylight Wallet asks for your password before showing these words again.';
@override
String get onboardingPasswordNoteLaunch =>
- 'Asked for at every launch, and before the seed is ever shown.';
+ 'You need this password to open your wallet and to view your recovery phrase.';
@override
String get onboardingPasswordNoteNotCloud =>
- 'Not a cloud account. Losing it means restoring from your seed phrase.';
+ 'This password can\'t be recovered. If you lose it, restore your wallet from your recovery phrase.';
@override
String get onboardingPasswordStrong => 'Strong';
@override
- String get onboardingPasswordMatch => 'Both entries match';
+ String get onboardingPasswordMatch => 'Passwords match';
@override
String get lwsDetailsTitle => 'Wallet Details';
@@ -386,7 +396,7 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get restoreWalletDescription =>
- 'Input your Monero seed below. We will check common formats.';
+ 'Input your Monero recovery phrase below. We will check common formats.';
@override
String get restoreWalletScanFrom => 'Scan from';
@@ -424,10 +434,10 @@ class AppLocalizationsEn extends AppLocalizations {
String get restoreWalletRestoreButton => 'Restore';
@override
- String get restoreWalletInvalidMnemonic => 'Invalid seed.';
+ String get restoreWalletInvalidMnemonic => 'Invalid recovery phrase.';
@override
- String get restoreWalletSeedLength => 'Seed length';
+ String get restoreWalletSeedLength => 'Number of words';
@override
String get restoreWalletPaste => 'Paste';
@@ -453,11 +463,44 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get restoreWalletChecksumError =>
- 'This isn\'t a valid seed phrase — check the words and their order.';
+ 'This isn\'t a valid recovery phrase — check the words and their order.';
@override
String get navigationBarWallet => 'Wallet';
+ @override
+ String get historyTitle => 'History';
+
+ @override
+ String get historyExportCsv => 'Export CSV';
+
+ @override
+ String get historyExported => 'History exported';
+
+ @override
+ String get historyExportFailed => 'Could not export the history';
+
+ @override
+ String get navigationBarHistory => 'History';
+
+ @override
+ String get historyFilterType => 'Type';
+
+ @override
+ String get historyFilterAddress => 'Address';
+
+ @override
+ String get historyFilterAddressAny => 'Any address';
+
+ @override
+ String get historyFilterAddressHint => 'Transactions received at this address, or sent to it.';
+
+ @override
+ String get historyFilterAddressInvalid => 'Not a Monero address';
+
+ @override
+ String get historyFilterReset => 'Reset';
+
@override
String get navigationBarSettings => 'Settings';
@@ -545,7 +588,11 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get receiveServerNoSubaddressesWarn =>
- 'Warning: This server does not support subaddresses. For better privacy, consider using a server that supports them. You are receiving to your primary address.';
+ 'Warning: This server does not support subaddresses. For better privacy, consider using a server that supports them.';
+
+ @override
+ String get receiveSubaddressUnavailableWarn =>
+ 'Warning: You need to configure Monero to enable subaddresses, which better protect your privacy.';
@override
String get receiveMaxSubaddressesReachedWarn =>
@@ -589,6 +636,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get sendOpenAliasResolveError => 'Invalid OpenAlias.';
+ @override
+ String get sendOpenAliasDisabledError => 'OpenAlias is turned off. Turn it on in Settings.';
+
@override
String get sendInvalidAddressError => 'Invalid address.';
@@ -606,7 +656,13 @@ class AppLocalizationsEn extends AppLocalizations {
String get settingsSectionGeneral => 'General';
@override
- String get settingsSectionBehaviour => 'Behaviour';
+ String get settingsSectionSecurityPrivacy => 'Security and privacy';
+
+ @override
+ String get settingsSectionData => 'Data';
+
+ @override
+ String get settingsSectionBehaviour => 'Behavior';
@override
String get settingsSectionWallet => 'Wallet';
@@ -619,31 +675,53 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get settingsNotifyNewTxsDescription =>
- 'Show a notification when you receive a transaction. When connected to a Monero node, Background Sync must also be enabled.';
+ 'Show a notification when you receive a transaction. Increase the sync frequency setting to see them sooner.';
@override
- String get settingsNotifyNewTxsDescriptionIos =>
- 'Notifications will be delayed for Tor LWS connections.';
+ String get settingsSyncFrequencyLabel => 'Sync Frequency';
@override
- String get settingsAppLockLabel => 'App Lock';
+ String get syncFrequencySheetSubtitle => 'How often Monero syncs while the app is closed.';
@override
- String get settingsAppLockUnlockReason => 'Unlock Wallet';
+ String get syncFrequencyModeLabel => 'Frequency';
+
+ @override
+ String get syncFrequencyContinuous => 'Continuous';
+
+ @override
+ String get syncFrequencyContinuousDesc =>
+ 'Continuously sync Monero in the background so it\'s always up to date when you open the app. Uses more battery and requires a persistent notification.';
+
+ @override
+ String get syncFrequencyPeriodic => 'Periodic';
+
+ @override
+ String get syncFrequencyPeriodicDesc =>
+ 'Periodically sync Monero in the background so it\'s usually up to date when you open the app. With a Monero node, it only syncs while charging and on WiFi.';
+
+ @override
+ String get syncFrequencyPeriodicDescIos =>
+ 'Periodically sync Monero in the background so it\'s usually up to date when you open the app. With a Monero node, it only syncs while charging.';
@override
- String get settingsAppLockUnableToAuthError =>
- 'Unable to authenticate. Make sure you have device unlock set up.';
+ String get syncFrequencyOff => 'Off';
+
+ @override
+ String get syncFrequencyOffDesc => 'Only syncs while the app is open.';
+
+ @override
+ String get settingsAppLockUnlockReason => 'Unlock Wallet';
@override
- String get settingsVerboseLoggingLabel => 'Diagnostic Logs';
+ String get settingsLoggingLabel => 'Diagnostic Logs';
@override
- String get settingsVerboseLoggingDescription =>
+ String get settingsLoggingDescription =>
'Log wallet operations to a text file in the app\'s data folder for debugging purposes.';
@override
- String get settingsVerboseLoggingDescriptionIos =>
+ String get settingsLoggingDescriptionIos =>
'Log wallet operations and allow the logs to be exported to a text file.';
@override
@@ -698,7 +776,7 @@ class AppLocalizationsEn extends AppLocalizations {
String get settingsLwsViewKeysButton => 'View';
@override
- String get revealSeedAuthReason => 'Confirm it\'s you to view your seed phrase';
+ String get revealSeedAuthReason => 'Confirm it\'s you to view your recovery phrase';
@override
String get settingsSecretKeysLabel => 'Secret Restore Keys';
@@ -722,11 +800,24 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get settingsDeleteWalletDialogText =>
- 'Are you sure you want to delete your wallet? You will lose access to your funds unless you have backed up your seed phrase.';
+ 'Are you sure you want to delete your wallet? You will lose access to your funds unless you have backed up your recovery phrase. This will not remove your address book and app settings.';
@override
String get settingsDeleteWalletDialogDeleteButton => 'Delete';
+ @override
+ String get settingsDeleteAddressBookButton => 'Delete Address Book';
+
+ @override
+ String get settingsDeleteAddressBookDialogText =>
+ 'Are you sure you want to delete your address book? If automatic backup is turned on, it will also delete the address book in these automatic backups.';
+
+ @override
+ String get settingsDeleteAddressBookDialogDeleteButton => 'Delete';
+
+ @override
+ String get settingsAddressBookDeleted => 'Address book deleted';
+
@override
String get txDetailsTitle => 'Transaction Details';
@@ -791,10 +882,10 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get secretKeysDescription =>
- 'These seeds and keys restore full control of your wallet. Anyone who sees them can spend your funds.';
+ 'These recovery phrases and keys restore full control of your wallet. Anyone who sees them can spend your funds.';
@override
- String get secretKeysMnemonic => 'Seed';
+ String get secretKeysMnemonic => 'Recovery phrase';
@override
String get secretKeysPublicSpendKey => 'Public Spend Key';
@@ -915,7 +1006,7 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get sendIrreversibleNote =>
- 'Monero transactions are irreversible. Double-check the address and amount before sending.';
+ 'Transactions are irreversible, so make sure the address and amount are correct.';
@override
String get sendSwitchUnit => 'Switch amount unit';
@@ -993,5 +1084,111 @@ class AppLocalizationsEn extends AppLocalizations {
String get lwsSetupTorDisabledError => 'Tor is disabled. Please go back and enable it.';
@override
- String get lwsSetupInvalidQrCode => 'Invalid connection address.';
+ String get coinHomeSwap => 'Swap';
+
+ @override
+ String get coinHomeSwapComingSoon => 'Coming soon!';
+
+ @override
+ String get verifySeedTitle => 'Verify Recovery Phrase';
+
+ @override
+ String get homeIncomingTitle => 'Incoming';
+
+ @override
+ String homeIncomingUnlocksIn(int minutes, int done, int needed) {
+ String _temp0 = intl.Intl.pluralLogic(
+ minutes,
+ locale: localeName,
+ other: '$minutes minutes',
+ one: '1 minute',
+ );
+ return 'Unlocks in about $_temp0 · $done of $needed';
+ }
+
+ @override
+ String homeIncomingConfirmations(int done, int needed) {
+ return '$done of $needed confirmations';
+ }
+
+ @override
+ String get homeChartTitle => 'Balance · 90 days';
+
+ @override
+ String get homeChartToday => 'Today';
+
+ @override
+ String get homeChartEachCoin => 'Each coin\'s balance';
+
+ @override
+ String get homeChartNew => 'New';
+
+ @override
+ String get homeChartEmpty => 'Your balance over time shows here after your first transaction.';
+
+ @override
+ String get homeChecklistTitle => 'Secure your wallet';
+
+ @override
+ String homeChecklistProgress(int done, int total) {
+ return '$done of $total';
+ }
+
+ @override
+ String get homeChecklistVerifySeed => 'Verify your recovery phrase';
+
+ @override
+ String get homeChecklistAutoBackup => 'Turn on automatic backups';
+
+ @override
+ String get homeChecklistTor => 'Connect through Tor';
+
+ @override
+ String get homeChecklistPrivateLookups => 'Use Tor for price and OpenAlias lookups';
+
+ @override
+ String get homeChecklistSecurityKeys => 'Set up a security key';
+
+ @override
+ String verifySeedSubtitle(int first, int second, int third) {
+ return 'Input words $first, $second and $third of your recovery phrase below.';
+ }
+
+ @override
+ String get verifySeedButton => 'Verify';
+
+ @override
+ String get verifySeedWrongTitle => 'Those words don\'t match';
+
+ @override
+ String verifySeedWrongBody(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count tries',
+ one: '1 try',
+ );
+ return 'Check the recovery phrase you wrote down, then enter the three new words asked for. $_temp0 left before the app locks.';
+ }
+
+ @override
+ String get verifySeedTryAgain => 'Try again';
+
+ @override
+ String get verifySeedUnavailable =>
+ 'Your recovery phrase can\'t be read right now. Try again after unlocking the wallet.';
+
+ @override
+ String get verifySeedDone => 'Recovery phrase verified';
+
+ @override
+ String homeIncomingTitleMore(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count Others',
+ one: '1 Other',
+ );
+ return 'Incoming (+$_temp0)';
+ }
}
### lib/l10n/app_localizations_pt.dart
@@ -1,5 +1,6 @@
// ignore: unused_import
import 'package:intl/intl.dart' as intl;
+
import 'app_localizations.dart';
// ignore_for_file: type=lint
@@ -77,6 +78,9 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get welcomePrivacyLink => 'Política de Privacidade';
+ @override
+ String get settingsLicensesLabel => 'Licenças de Código Aberto';
+
@override
String get lwsSetupTitle => 'Configuração da conexão';
@@ -120,6 +124,18 @@ class AppLocalizationsPt extends AppLocalizations {
String get connectionOnionNeedsTor =>
'Um endereço onion só pode ser acessado via Tor. Ative o Tor para usá-lo.';
+ @override
+ String get connectionPathNotSupported =>
+ 'Este servidor é acessado pela raiz, então o endereço não pode incluir um caminho como /wallet. Remova o caminho.';
+
+ @override
+ String get lwsAwaitingApprovalAccount =>
+ 'Seu servidor de carteira leve ainda não aprovou esta carteira. Peça ao operador do servidor para aprová-la para ver seu saldo e suas transações.';
+
+ @override
+ String get lwsAwaitingApprovalRestoreHeight =>
+ 'Seu servidor de carteira leve ainda não aprovou a verificação a partir da sua altura de restauração, então transações mais antigas podem estar faltando. Peça ao operador do servidor para aprová-la.';
+
@override
String get connectionTorDisabledWarning =>
'O Tor está desativado, então esta conexão não funciona mais. Reconfigure-a.';
@@ -184,22 +200,17 @@ class AppLocalizationsPt extends AppLocalizations {
String get settingsConnectionInLocalNetwork => 'na rede local';
@override
- String get settingsBackgroundSyncLabel => 'Sincronização em segundo plano';
+ String homeBlocksRemaining(int count) {
+ final intl.NumberFormat countNumberFormat = intl.NumberFormat.decimalPattern(localeName);
+ final String countString = countNumberFormat.format(count);
- @override
- String get settingsBackgroundSyncDescription =>
- 'Sincroniza o Monero periodicamente em segundo plano para que esteja atualizado ao abrir o app. Só roda enquanto carrega e no WiFi.';
-
- @override
- String get settingsForegroundSyncLabel => 'Sincronização contínua';
-
- @override
- String get settingsForegroundSyncDescription =>
- 'Mantém o Monero sincronizando continuamente enquanto o app roda em segundo plano, com uma notificação persistente. Usa mais bateria.';
-
- @override
- String homeBlocksRemaining(String count) {
- return '$count blocos restantes';
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$countString blocos restantes',
+ one: '1 bloco restante',
+ );
+ return '$_temp0';
}
@override
@@ -230,6 +241,23 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get fiatModeDisabledDesc => 'Sem preços; saldos exibidos apenas em cripto';
+ @override
+ String get settingsOpenAliasSettingsLabel => 'Configurações do OpenAlias';
+
+ @override
+ String get openAliasSettingsSheetSubtitle =>
+ 'Como nomes como nome@exemplo.com são consultados quando você envia.';
+
+ @override
+ String get openAliasModeTorOnlyDesc => 'Nomes consultados pelo Tor · recomendado';
+
+ @override
+ String get openAliasModeClearnetDesc =>
+ 'Não privado, os servidores DNS veem seu endereço IP e o nome';
+
+ @override
+ String get openAliasModeDisabledDesc => 'Sem consultas; envie apenas para endereços';
+
@override
String get fiatApiSettingsDisplayCurrencyLabel => 'Moeda de Exibição';
@@ -244,13 +272,14 @@ class AppLocalizationsPt extends AppLocalizations {
String get createWalletRestoreExistingButton => 'Restaurar Existente';
@override
- String get createWalletRestoreExistingDesc => 'Insira uma semente Monero existente';
+ String get createWalletRestoreExistingDesc => 'Insira uma frase de recuperação Monero existente';
@override
String get createWalletCreateNewButton => 'Criar Nova';
@override
- String get createWalletCreateNewDesc => 'A Skylight Wallet gera uma nova polyseed';
+ String get createWalletCreateNewDesc =>
+ 'A Skylight Wallet gera uma nova frase de recuperação Polyseed';
@override
String get createWalletPasswordTitle => 'Criar Senha da Carteira';
@@ -275,7 +304,7 @@ class AppLocalizationsPt extends AppLocalizations {
String get generateSeedTitle => 'Anote-as, em ordem';
@override
- String get generateSeedTitleCovered => 'Frase Seed';
+ String get generateSeedTitleCovered => 'Frase de Recuperação';
@override
String get generateSeedSubtitleCovered =>
@@ -302,70 +331,51 @@ class AppLocalizationsPt extends AppLocalizations {
String get generateSeedBirthdayReason => 'Onde uma futura restauração começa a escanear';
@override
- String get onboardingTorNotePrivacy =>
- 'O Tor esconde seu endereço do nó que você consulta — mais lento, e vale a pena.';
+ String get onboardingTorNotePrivacy => 'Conexões pelo Tor podem ser mais lentas.';
@override
- String get onboardingTorNoteChangeable => 'Pode ser alterado depois em Configurações → Conexões.';
+ String get onboardingTorNoteChangeable => 'Você pode alterar isso depois nas Configurações.';
@override
String get onboardingPriceNoteRatesOnly =>
- 'O serviço de preços recebe apenas pedidos de cotações — nunca endereços ou valores.';
+ 'Apenas os preços são solicitados. Seus endereços e saldos não são enviados.';
@override
- String get onboardingPriceNoteTor => 'Roteado pelo Tor por padrão, separado do tráfego da rede.';
+ String get onboardingPriceNoteTor => 'Os preços são buscados pelo Tor por padrão.';
@override
String get onboardingConnectionNoteServer =>
- 'Aponte a Skylight para um servidor de carteira leve (LWS), ou conecte-se ao seu próprio nó Monero.';
+ 'Use um servidor light-wallet (LWS) ou seu próprio nó Monero.';
@override
String get onboardingConnectionNoteChangeable =>
- 'Pode ser alterado depois em Configurações → Conexão.';
+ 'Você pode alterar isso depois nas Configurações.';
@override
String get onboardingWalletNoteGenerated =>
- 'A seed de uma nova carteira é gerada aqui, offline, e mostrada a você uma única vez.';
+ 'A Skylight Wallet gera sua frase de recuperação neste dispositivo.';
@override
String get onboardingWalletNoteRestore =>
- 'A restauração pergunta aproximadamente quando a seed teve fundos pela primeira vez, para pular anos de escaneamento.';
-
- @override
- String get onboardingWalletCreateBullet1 => 'Uma frase seed Monero, mostrada uma vez';
-
- @override
- String get onboardingWalletCreateBullet2 => 'Começa vazia, sincroniza a partir de hoje';
-
- @override
- String get onboardingWalletCreateBullet3 => 'Leva cerca de dois minutos';
-
- @override
- String get onboardingWalletRestoreBullet1 => 'Uma seed Monero Polyseed, BIP39 ou legada';
-
- @override
- String get onboardingWalletRestoreBullet2 => 'Data de escaneamento opcional';
-
- @override
- String get onboardingWalletRestoreBullet3 => 'Recupera seu saldo e histórico existentes';
+ 'Ao restaurar, uma data para escanear a partir dela torna a sincronização mais rápida.';
@override
String get onboardingSeedNotePassword =>
- 'A Skylight Wallet pede sua senha antes de mostrá-las novamente.';
+ 'A Skylight Wallet pede sua senha antes de mostrar estas palavras novamente.';
@override
String get onboardingPasswordNoteLaunch =>
- 'Pedida a cada abertura, e antes de a seed ser mostrada.';
+ 'Você precisa desta senha para abrir sua carteira e para ver sua frase de recuperação.';
@override
String get onboardingPasswordNoteNotCloud =>
- 'Não é uma conta na nuvem. Perdê-la significa restaurar a partir da sua frase seed.';
+ 'Esta senha não pode ser recuperada. Se você a perder, restaure sua carteira a partir da sua frase de recuperação.';
@override
String get onboardingPasswordStrong => 'Forte';
@override
- String get onboardingPasswordMatch => 'As duas entradas coincidem';
+ String get onboardingPasswordMatch => 'As senhas coincidem';
@override
String get lwsDetailsTitle => 'Detalhes da Carteira';
@@ -388,7 +398,7 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get restoreWalletDescription =>
- 'Insira sua semente Monero abaixo. Verificaremos os formatos comuns.';
+ 'Insira sua frase de recuperação Monero abaixo. Verificaremos os formatos comuns.';
@override
String get restoreWalletScanFrom => 'Escanear a partir de';
@@ -426,10 +436,10 @@ class AppLocalizationsPt extends AppLocalizations {
String get restoreWalletRestoreButton => 'Restaurar';
@override
- String get restoreWalletInvalidMnemonic => 'Semente inválida.';
+ String get restoreWalletInvalidMnemonic => 'Frase de recuperação inválida.';
@override
- String get restoreWalletSeedLength => 'Tamanho da semente';
+ String get restoreWalletSeedLength => 'Número de palavras';
@override
String get restoreWalletPaste => 'Colar';
@@ -455,11 +465,45 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get restoreWalletChecksumError =>
- 'Esta não é uma frase-semente válida — verifique as palavras e sua ordem.';
+ 'Esta não é uma frase de recuperação válida — verifique as palavras e sua ordem.';
@override
String get navigationBarWallet => 'Carteira';
+ @override
+ String get historyTitle => 'Histórico';
+
+ @override
+ String get historyExportCsv => 'Exportar CSV';
+
+ @override
+ String get historyExported => 'Histórico exportado';
+
+ @override
+ String get historyExportFailed => 'Não foi possível exportar o histórico';
+
+ @override
+ String get navigationBarHistory => 'Histórico';
+
+ @override
+ String get historyFilterType => 'Tipo';
+
+ @override
+ String get historyFilterAddress => 'Endereço';
+
+ @override
+ String get historyFilterAddressAny => 'Qualquer endereço';
+
+ @override
+ String get historyFilterAddressHint =>
+ 'Transações recebidas neste endereço ou enviadas para ele.';
+
+ @override
+ String get historyFilterAddressInvalid => 'Não é um endereço Monero';
+
+ @override
+ String get historyFilterReset => 'Redefinir';
+
@override
String get navigationBarSettings => 'Configurações';
@@ -547,7 +591,11 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get receiveServerNoSubaddressesWarn =>
- 'Aviso: Este servidor não suporta subendereços. Para melhor privacidade, considere usar um servidor que os suporte. Você está recebendo no seu endereço primário.';
+ 'Aviso: Este servidor não suporta subendereços. Para melhor privacidade, considere usar um servidor que os suporte.';
+
+ @override
+ String get receiveSubaddressUnavailableWarn =>
+ 'Aviso: Você precisa configurar o Monero para ativar subendereços, que protegem melhor sua privacidade.';
@override
String get receiveMaxSubaddressesReachedWarn =>
@@ -591,6 +639,9 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get sendOpenAliasResolveError => 'OpenAlias inválido.';
+ @override
+ String get sendOpenAliasDisabledError => 'O OpenAlias está desligado. Ligue-o nas Configurações.';
+
@override
String get sendInvalidAddressError => 'Endereço inválido.';
@@ -607,6 +658,12 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get settingsSectionGeneral => 'Geral';
+ @override
+ String get settingsSectionSecurityPrivacy => 'Segurança e privacidade';
+
+ @override
+ String get settingsSectionData => 'Dados';
+
@override
String get settingsSectionBehaviour => 'Comportamento';
@@ -621,31 +678,54 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get settingsNotifyNewTxsDescription =>
- 'Mostrar uma notificação quando você receber uma transação. Ao conectar-se a um nó Monero, a Sincronização em Segundo Plano também precisa estar ativada.';
+ 'Mostrar uma notificação quando você receber uma transação. Aumente a frequência de sincronização para vê-las mais cedo.';
@override
- String get settingsNotifyNewTxsDescriptionIos =>
- 'As notificações serão atrasadas para conexões LWS via Tor.';
+ String get settingsSyncFrequencyLabel => 'Frequência de sincronização';
@override
- String get settingsAppLockLabel => 'Desbloqueio com PIN/Biometria';
+ String get syncFrequencySheetSubtitle =>
+ 'Com que frequência o Monero sincroniza enquanto o app está fechado.';
@override
- String get settingsAppLockUnlockReason => 'Desbloquear carteira';
+ String get syncFrequencyModeLabel => 'Frequência';
+
+ @override
+ String get syncFrequencyContinuous => 'Contínua';
+
+ @override
+ String get syncFrequencyContinuousDesc =>
+ 'Sincroniza o Monero continuamente em segundo plano para que esteja sempre atualizado ao abrir o app. Usa mais bateria e exige uma notificação persistente.';
+
+ @override
+ String get syncFrequencyPeriodic => 'Periódica';
+
+ @override
+ String get syncFrequencyPeriodicDesc =>
+ 'Sincroniza o Monero periodicamente em segundo plano para que geralmente esteja atualizado ao abrir o app. Com um nó Monero, só sincroniza enquanto carrega e no WiFi.';
+
+ @override
+ String get syncFrequencyPeriodicDescIos =>
+ 'Sincroniza o Monero periodicamente em segundo plano para que geralmente esteja atualizado ao abrir o app. Com um nó Monero, só sincroniza enquanto carrega.';
@override
- String get settingsAppLockUnableToAuthError =>
- 'Não foi possível autenticar. Verifique se o desbloqueio de tela está configurado.';
+ String get syncFrequencyOff => 'Desligada';
+
+ @override
+ String get syncFrequencyOffDesc => 'Só sincroniza enquanto o app está aberto.';
+
+ @override
+ String get settingsAppLockUnlockReason => 'Desbloquear carteira';
@override
- String get settingsVerboseLoggingLabel => 'Logs de Diagnóstico';
+ String get settingsLoggingLabel => 'Logs de Diagnóstico';
@override
- String get settingsVerboseLoggingDescription =>
+ String get settingsLoggingDescription =>
'Registrar operações da carteira em um arquivo de texto na pasta de dados do app para fins de depuração.';
@override
- String get settingsVerboseLoggingDescriptionIos =>
+ String get settingsLoggingDescriptionIos =>
'Registrar operações da carteira e permitir exportar os logs para um arquivo de texto.';
@override
@@ -700,7 +780,7 @@ class AppLocalizationsPt extends AppLocalizations {
String get settingsLwsViewKeysButton => 'Ver';
@override
- String get revealSeedAuthReason => 'Confirme sua identidade para ver a frase seed';
+ String get revealSeedAuthReason => 'Confirme sua identidade para ver a frase de recuperação';
@override
String get settingsSecretKeysLabel => 'Chaves Privadas de Restauração';
@@ -724,11 +804,24 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get settingsDeleteWalletDialogText =>
- 'Tem certeza que deseja excluir sua carteira? Você perderá acesso à seus fundos, a menos que tenha anotado sua semente.';
+ 'Tem certeza que deseja excluir sua carteira? Você perderá acesso à seus fundos, a menos que tenha anotado sua frase de recuperação. Isso não remove sua lista de contatos nem as configurações do app.';
@override
String get settingsDeleteWalletDialogDeleteButton => 'Excluir';
+ @override
+ String get settingsDeleteAddressBookButton => 'Excluir Lista de Contatos';
+
+ @override
+ String get settingsDeleteAddressBookDialogText =>
+ 'Tem certeza que deseja excluir sua lista de contatos? Se o backup automático estiver ligado, ela também será excluída desses backups automáticos.';
+
+ @override
+ String get settingsDeleteAddressBookDialogDeleteButton => 'Excluir';
+
+ @override
+ String get settingsAddressBookDeleted => 'Lista de contatos excluída';
+
@override
String get txDetailsTitle => 'Detalhes da transação';
@@ -793,10 +886,10 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get secretKeysDescription =>
- 'Estas sementes e chaves restauram o controle total da sua carteira. Qualquer pessoa que as veja pode gastar seus fundos.';
+ 'Estas frases de recuperação e chaves restauram o controle total da sua carteira. Qualquer pessoa que as veja pode gastar seus fundos.';
@override
- String get secretKeysMnemonic => 'Semente';
+ String get secretKeysMnemonic => 'Frase de recuperação';
@override
String get secretKeysPublicSpendKey => 'Chave Pública de Gasto';
@@ -917,7 +1010,7 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get sendIrreversibleNote =>
- 'Transações Monero são irreversíveis. Confira o endereço e o valor antes de enviar.';
+ 'As transações são irreversíveis, então verifique se o endereço e o valor estão corretos.';
@override
String get sendSwitchUnit => 'Alternar unidade do valor';
@@ -996,5 +1089,112 @@ class AppLocalizationsPt extends AppLocalizations {
String get lwsSetupTorDisabledError => 'O Tor está desativado. Por favor, volte e ative-o.';
@override
- String get lwsSetupInvalidQrCode => 'Endereço de conexão inválido.';
+ String get coinHomeSwap => 'Trocar';
+
+ @override
+ String get coinHomeSwapComingSoon => 'Em breve!';
+
+ @override
+ String get verifySeedTitle => 'Verificar Frase de Recuperação';
+
+ @override
+ String get homeIncomingTitle => 'A receber';
+
+ @override
+ String homeIncomingUnlocksIn(int minutes, int done, int needed) {
+ String _temp0 = intl.Intl.pluralLogic(
+ minutes,
+ locale: localeName,
+ other: '$minutes minutos',
+ one: '1 minuto',
+ );
+ return 'Desbloqueia em cerca de $_temp0 · $done de $needed';
+ }
+
+ @override
+ String homeIncomingConfirmations(int done, int needed) {
+ return '$done de $needed confirmações';
+ }
+
+ @override
+ String get homeChartTitle => 'Saldo · 90 dias';
+
+ @override
+ String get homeChartToday => 'Hoje';
+
+ @override
+ String get homeChartEachCoin => 'Saldo de cada moeda';
+
+ @override
+ String get homeChartNew => 'Novo';
+
+ @override
+ String get homeChartEmpty =>
+ 'Seu saldo ao longo do tempo aparece aqui após sua primeira transação.';
+
+ @override
+ String get homeChecklistTitle => 'Proteja sua carteira';
+
+ @override
+ String homeChecklistProgress(int done, int total) {
+ return '$done de $total';
+ }
+
+ @override
+ String get homeChecklistVerifySeed => 'Verifique sua frase de recuperação';
+
+ @override
+ String get homeChecklistAutoBackup => 'Ative os backups automáticos';
+
+ @override
+ String get homeChecklistTor => 'Conecte-se pelo Tor';
+
+ @override
+ String get homeChecklistPrivateLookups => 'Use o Tor nas consultas de preço e OpenAlias';
+
+ @override
+ String get homeChecklistSecurityKeys => 'Configure uma chave de segurança';
+
+ @override
+ String verifySeedSubtitle(int first, int second, int third) {
+ return 'Insira as palavras $first, $second e $third da sua frase de recuperação abaixo.';
+ }
+
+ @override
+ String get verifySeedButton => 'Verificar';
+
+ @override
+ String get verifySeedWrongTitle => 'Essas palavras não conferem';
+
+ @override
+ String verifySeedWrongBody(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Restam $count tentativas',
+ one: 'Resta 1 tentativa',
+ );
+ return 'Confira a frase de recuperação que você anotou e insira as três novas palavras pedidas. $_temp0 antes de o app bloquear.';
+ }
+
+ @override
+ String get verifySeedTryAgain => 'Tentar novamente';
+
+ @override
+ String get verifySeedUnavailable =>
+ 'Não é possível ler sua frase de recuperação agora. Tente novamente depois de desbloquear a carteira.';
+
+ @override
+ String get verifySeedDone => 'Frase de recuperação verificada';
+
+ @override
+ String homeIncomingTitleMore(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count Outras',
+ one: '1 Outra',
+ );
+ return 'A receber (+$_temp0)';
+ }
}
### lib/l10n/app_pt.arb
@@ -29,6 +29,7 @@
"welcomeTermsLink": "Termos de Serviço",
"welcomeAgreeMiddle": " e a ",
"welcomePrivacyLink": "Política de Privacidade",
+ "settingsLicensesLabel": "Licenças de Código Aberto",
"lwsSetupTitle": "Configuração da conexão",
"lwsSetupDescription": "Conecte-se a um servidor light-wallet Monero (LWS) ou ao seu próprio nó completo. Selecione apenas um servidor em que você confia. Mesmo se você usar o Tor, este servidor pode obter informações sobre você. Com um LWS, sua chave privada de visualização e seu endereço primário serão compartilhados com este servidor.",
"lwsSetupProxyPortLabel": "Porta do Proxy HTTP (opcional)",
@@ -42,6 +43,9 @@
"connectionRemoteIpNotAllowed": "Conexões com endereços IP remotos não são permitidas. Use um nome de domínio ou um endereço IP local.",
"connectionLocalOverTorNotAllowed": "Um endereço local não pode ser acessado via Tor. Desative o Tor ou use o endereço onion do servidor.",
"connectionOnionNeedsTor": "Um endereço onion só pode ser acessado via Tor. Ative o Tor para usá-lo.",
+ "connectionPathNotSupported": "Este servidor é acessado pela raiz, então o endereço não pode incluir um caminho como /wallet. Remova o caminho.",
+ "lwsAwaitingApprovalAccount": "Seu servidor de carteira leve ainda não aprovou esta carteira. Peça ao operador do servidor para aprová-la para ver seu saldo e suas transações.",
+ "lwsAwaitingApprovalRestoreHeight": "Seu servidor de carteira leve ainda não aprovou a verificação a partir da sua altura de restauração, então transações mais antigas podem estar faltando. Peça ao operador do servidor para aprová-la.",
"connectionTorDisabledWarning": "O Tor está desativado, então esta conexão não funciona mais. Reconfigure-a.",
"connectionProtocolHttps": "Removendo protocolo. Usando HTTPS para domínios.",
"connectionProtocolHttp": "Removendo protocolo. Usando HTTP para endereços locais.",
@@ -62,15 +66,12 @@
"settingsConnectionOverTor": "via Tor",
"settingsConnectionOverClearnet": "via Clearnet",
"settingsConnectionInLocalNetwork": "na rede local",
- "settingsBackgroundSyncLabel": "Sincronização em segundo plano",
- "settingsBackgroundSyncDescription": "Sincroniza o Monero periodicamente em segundo plano para que esteja atualizado ao abrir o app. Só roda enquanto carrega e no WiFi.",
- "settingsForegroundSyncLabel": "Sincronização contínua",
- "settingsForegroundSyncDescription": "Mantém o Monero sincronizando continuamente enquanto o app roda em segundo plano, com uma notificação persistente. Usa mais bateria.",
- "homeBlocksRemaining": "{count} blocos restantes",
+ "homeBlocksRemaining": "{count, plural, =1{1 bloco restante} other{{count} blocos restantes}}",
"@homeBlocksRemaining": {
"placeholders": {
"count": {
- "type": "String"
+ "type": "int",
+ "format": "decimalPattern"
}
}
},
@@ -83,54 +84,53 @@
"fiatModeTorOnlyDesc": "Preços buscados pelo Tor · recomendado",
"fiatModeClearnetDesc": "Não privado, o servidor de preços vê seu endereço IP",
"fiatModeDisabledDesc": "Sem preços; saldos exibidos apenas em cripto",
+ "settingsOpenAliasSettingsLabel": "Configurações do OpenAlias",
+ "openAliasSettingsSheetSubtitle": "Como nomes como nome@exemplo.com são consultados quando você envia.",
+ "openAliasModeTorOnlyDesc": "Nomes consultados pelo Tor · recomendado",
+ "openAliasModeClearnetDesc": "Não privado, os servidores DNS veem seu endereço IP e o nome",
+ "openAliasModeDisabledDesc": "Sem consultas; envie apenas para endereços",
"fiatApiSettingsDisplayCurrencyLabel": "Moeda de Exibição",
"createWalletTitle": "Configuração da Carteira",
"createWalletDescription": "Você quer criar uma nova carteira ou restaurar uma carteira existente?",
"createWalletRestoreExistingButton": "Restaurar Existente",
- "createWalletRestoreExistingDesc": "Insira uma semente Monero existente",
+ "createWalletRestoreExistingDesc": "Insira uma frase de recuperação Monero existente",
"createWalletCreateNewButton": "Criar Nova",
- "createWalletCreateNewDesc": "A Skylight Wallet gera uma nova polyseed",
+ "createWalletCreateNewDesc": "A Skylight Wallet gera uma nova frase de recuperação Polyseed",
"createWalletPasswordTitle": "Criar Senha da Carteira",
"createWalletPasswordDescription": "Crie uma senha para proteger sua carteira. Esta senha será necessária para desbloquear sua carteira.",
"createWalletPasswordHint": "Digite sua senha",
"createWalletConfirmPasswordHint": "Confirme sua senha",
"passwordTooShortError": "A senha deve ter pelo menos 8 caracteres.",
"passwordsDoNotMatchError": "As senhas não coincidem.",
"generateSeedTitle": "Anote-as, em ordem",
- "generateSeedTitleCovered": "Frase Seed",
+ "generateSeedTitleCovered": "Frase de Recuperação",
"generateSeedSubtitleCovered": "Estas palavras, nesta ordem, são a sua carteira. Anote-as e guarde-as em um cofre físico. Se você perder estas palavras ou compartilhá-las com outra pessoa, perderá seu dinheiro permanentemente. Um planejamento cuidadoso agora evita um possível desastre depois.",
"generateSeedSubtitleRevealed": "Guarde-as em segurança. Não as compartilhe.",
"generateSeedScreenshotNote": "As capturas de tela estão bloqueadas nesta tela. Certifique-se de que ninguém está olhando por cima do seu ombro.",
"generateSeedReveal": "Toque para revelar",
"generateSeedConfirm": "Anotei todas as palavras e as guardei em um lugar que só eu posso acessar.",
"generateSeedBirthdayLabel": "Aniversário da carteira",
"generateSeedBirthdayReason": "Onde uma futura restauração começa a escanear",
- "onboardingTorNotePrivacy": "O Tor esconde seu endereço do nó que você consulta — mais lento, e vale a pena.",
- "onboardingTorNoteChangeable": "Pode ser alterado depois em Configurações → Conexões.",
- "onboardingPriceNoteRatesOnly": "O serviço de preços recebe apenas pedidos de cotações — nunca endereços ou valores.",
- "onboardingPriceNoteTor": "Roteado pelo Tor por padrão, separado do tráfego da rede.",
- "onboardingConnectionNoteServer": "Aponte a Skylight para um servidor de carteira leve (LWS), ou conecte-se ao seu próprio nó Monero.",
- "onboardingConnectionNoteChangeable": "Pode ser alterado depois em Configurações → Conexão.",
- "onboardingWalletNoteGenerated": "A seed de uma nova carteira é gerada aqui, offline, e mostrada a você uma única vez.",
- "onboardingWalletNoteRestore": "A restauração pergunta aproximadamente quando a seed teve fundos pela primeira vez, para pular anos de escaneamento.",
- "onboardingWalletCreateBullet1": "Uma frase seed Monero, mostrada uma vez",
- "onboardingWalletCreateBullet2": "Começa vazia, sincroniza a partir de hoje",
- "onboardingWalletCreateBullet3": "Leva cerca de dois minutos",
- "onboardingWalletRestoreBullet1": "Uma seed Monero Polyseed, BIP39 ou legada",
- "onboardingWalletRestoreBullet2": "Data de escaneamento opcional",
- "onboardingWalletRestoreBullet3": "Recupera seu saldo e histórico existentes",
- "onboardingSeedNotePassword": "A Skylight Wallet pede sua senha antes de mostrá-las novamente.",
- "onboardingPasswordNoteLaunch": "Pedida a cada abertura, e antes de a seed ser mostrada.",
- "onboardingPasswordNoteNotCloud": "Não é uma conta na nuvem. Perdê-la significa restaurar a partir da sua frase seed.",
+ "onboardingTorNotePrivacy": "Conexões pelo Tor podem ser mais lentas.",
+ "onboardingTorNoteChangeable": "Você pode alterar isso depois nas Configurações.",
+ "onboardingPriceNoteRatesOnly": "Apenas os preços são solicitados. Seus endereços e saldos não são enviados.",
+ "onboardingPriceNoteTor": "Os preços são buscados pelo Tor por padrão.",
+ "onboardingConnectionNoteServer": "Use um servidor light-wallet (LWS) ou seu próprio nó Monero.",
+ "onboardingConnectionNoteChangeable": "Você pode alterar isso depois nas Configurações.",
+ "onboardingWalletNoteGenerated": "A Skylight Wallet gera sua frase de recuperação neste dispositivo.",
+ "onboardingWalletNoteRestore": "Ao restaurar, uma data para escanear a partir dela torna a sincronização mais rápida.",
+ "onboardingSeedNotePassword": "A Skylight Wallet pede sua senha antes de mostrar estas palavras novamente.",
+ "onboardingPasswordNoteLaunch": "Você precisa desta senha para abrir sua carteira e para ver sua frase de recuperação.",
+ "onboardingPasswordNoteNotCloud": "Esta senha não pode ser recuperada. Se você a perder, restaure sua carteira a partir da sua frase de recuperação.",
"onboardingPasswordStrong": "Forte",
- "onboardingPasswordMatch": "As duas entradas coincidem",
+ "onboardingPasswordMatch": "As senhas coincidem",
"lwsDetailsTitle": "Detalhes da Carteira",
"lwsDetailsDescription": "Se o seu servidor Light Wallet Monero (LWS) exigir registro, você pode usar estes dados para adicionar esta carteira a esse servidor. Nem todos os servidores exigem registro.",
"lwsDetailsPrimaryAddressLabel": "Endereço Primário",
"lwsDetailsSecretViewKeyLabel": "Chave Privada de Visualização",
"lwsDetailsRestoreHeightLabel": "Bloco de Restauração",
"restoreWalletTitle": "Restaurar Carteira",
- "restoreWalletDescription": "Insira sua semente Monero abaixo. Verificaremos os formatos comuns.",
+ "restoreWalletDescription": "Insira sua frase de recuperação Monero abaixo. Verificaremos os formatos comuns.",
"restoreWalletScanFrom": "Escanear a partir de",
"restoreWalletScanFromReason": "Ignore o histórico irrelevante para economizar tempo",
"restoreWalletNotSet": "Não definido",
@@ -142,8 +142,8 @@
"restoreScanFromStart": "Genesis",
"restoreScanDone": "Concluir",
"restoreWalletRestoreButton": "Restaurar",
- "restoreWalletInvalidMnemonic": "Semente inválida.",
- "restoreWalletSeedLength": "Tamanho da semente",
+ "restoreWalletInvalidMnemonic": "Frase de recuperação inválida.",
+ "restoreWalletSeedLength": "Número de palavras",
"restoreWalletPaste": "Colar",
"restoreWalletSeedTypePolyseed": "Polyseed",
"restoreWalletSeedTypeBip39": "BIP39",
@@ -164,8 +164,19 @@
}
}
},
- "restoreWalletChecksumError": "Esta não é uma frase-semente válida — verifique as palavras e sua ordem.",
+ "restoreWalletChecksumError": "Esta não é uma frase de recuperação válida — verifique as palavras e sua ordem.",
"navigationBarWallet": "Carteira",
+ "historyTitle": "Histórico",
+ "historyExportCsv": "Exportar CSV",
+ "historyExported": "Histórico exportado",
+ "historyExportFailed": "Não foi possível exportar o histórico",
+ "navigationBarHistory": "Histórico",
+ "historyFilterType": "Tipo",
+ "historyFilterAddress": "Endereço",
+ "historyFilterAddressAny": "Qualquer endereço",
+ "historyFilterAddressHint": "Transações recebidas neste endereço ou enviadas para ele.",
+ "historyFilterAddressInvalid": "Não é um endereço Monero",
+ "historyFilterReset": "Redefinir",
"navigationBarSettings": "Configurações",
"unlockButton": "Desbloquear",
"unlockReason": "Desbloquear carteira",
@@ -194,7 +205,8 @@
"coinHomeSent": "Enviado",
"receiveTitle": "Receber",
"receivePrimaryAddressWarn": "Aviso: A menos que saiba o que está fazendo, por favor use subendereços para melhor privacidade.",
- "receiveServerNoSubaddressesWarn": "Aviso: Este servidor não suporta subendereços. Para melhor privacidade, considere usar um servidor que os suporte. Você está recebendo no seu endereço primário.",
+ "receiveServerNoSubaddressesWarn": "Aviso: Este servidor não suporta subendereços. Para melhor privacidade, considere usar um servidor que os suporte.",
+ "receiveSubaddressUnavailableWarn": "Aviso: Você precisa configurar o Monero para ativar subendereços, que protegem melhor sua privacidade.",
"receiveMaxSubaddressesReachedWarn": "Você atingiu o número máximo de subendereços suportados por este servidor. Este é um endereço já usado.",
"receiveSubaddressTab": "Subendereço",
"receivePrimaryTab": "Endereço primário",
@@ -215,23 +227,33 @@
"sendSendButton": "Enviar",
"sendTransactionSuccessfullySent": "Transação enviada com sucesso!",
"sendOpenAliasResolveError": "OpenAlias inválido.",
+ "sendOpenAliasDisabledError": "O OpenAlias está desligado. Ligue-o nas Configurações.",
"sendInvalidAddressError": "Endereço inválido.",
"sendInsufficientBalanceError": "Saldo insuficiente.",
"sendInsufficientBalanceToCoverFeeError": "Saldo insuficiente para cobrir a taxa da rede.",
"settingsTitle": "Configurações",
"settingsSectionGeneral": "Geral",
+ "settingsSectionSecurityPrivacy": "Segurança e privacidade",
+ "settingsSectionData": "Dados",
"settingsSectionBehaviour": "Comportamento",
"settingsSectionWallet": "Carteira",
"settingsSectionAbout": "Sobre",
"settingsNotifyNewTxsLabel": "Notificações de Transações",
- "settingsNotifyNewTxsDescription": "Mostrar uma notificação quando você receber uma transação. Ao conectar-se a um nó Monero, a Sincronização em Segundo Plano também precisa estar ativada.",
- "settingsNotifyNewTxsDescriptionIos": "As notificações serão atrasadas para conexões LWS via Tor.",
- "settingsAppLockLabel": "Desbloqueio com PIN/Biometria",
+ "settingsNotifyNewTxsDescription": "Mostrar uma notificação quando você receber uma transação. Aumente a frequência de sincronização para vê-las mais cedo.",
+ "settingsSyncFrequencyLabel": "Frequência de sincronização",
+ "syncFrequencySheetSubtitle": "Com que frequência o Monero sincroniza enquanto o app está fechado.",
+ "syncFrequencyModeLabel": "Frequência",
+ "syncFrequencyContinuous": "Contínua",
+ "syncFrequencyContinuousDesc": "Sincroniza o Monero continuamente em segundo plano para que esteja sempre atualizado ao abrir o app. Usa mais bateria e exige uma notificação persistente.",
+ "syncFrequencyPeriodic": "Periódica",
+ "syncFrequencyPeriodicDesc": "Sincroniza o Monero periodicamente em segundo plano para que geralmente esteja atualizado ao abrir o app. Com um nó Monero, só sincroniza enquanto carrega e no WiFi.",
+ "syncFrequencyPeriodicDescIos": "Sincroniza o Monero periodicamente em segundo plano para que geralmente esteja atualizado ao abrir o app. Com um nó Monero, só sincroniza enquanto carrega.",
+ "syncFrequencyOff": "Desligada",
+ "syncFrequencyOffDesc": "Só sincroniza enquanto o app está aberto.",
"settingsAppLockUnlockReason": "Desbloquear carteira",
- "settingsAppLockUnableToAuthError": "Não foi possível autenticar. Verifique se o desbloqueio de tela está configurado.",
- "settingsVerboseLoggingLabel": "Logs de Diagnóstico",
- "settingsVerboseLoggingDescription": "Registrar operações da carteira em um arquivo de texto na pasta de dados do app para fins de depuração.",
- "settingsVerboseLoggingDescriptionIos": "Registrar operações da carteira e permitir exportar os logs para um arquivo de texto.",
+ "settingsLoggingLabel": "Logs de Diagnóstico",
+ "settingsLoggingDescription": "Registrar operações da carteira em um arquivo de texto na pasta de dados do app para fins de depuração.",
+ "settingsLoggingDescriptionIos": "Registrar operações da carteira e permitir exportar os logs para um arquivo de texto.",
"settingsExportLogsLabel": "Exportar Logs",
"settingsExportLogsButton": "Exportar",
"settingsExportLogsError": "Nenhum log encontrado para exportar.",
@@ -249,15 +271,19 @@
"settingsFiatApiSettingsLabel": "Configurações de Exibição de Preços",
"settingsLwsViewKeysLabel": "Chaves de Visualização do LWS",
"settingsLwsViewKeysButton": "Ver",
- "revealSeedAuthReason": "Confirme sua identidade para ver a frase seed",
+ "revealSeedAuthReason": "Confirme sua identidade para ver a frase de recuperação",
"settingsSecretKeysLabel": "Chaves Privadas de Restauração",
"settingsViewLwsKeysDialogText": "Somente compartilhe estas informações com o seu servidor light-wallet. Essas chaves permitem que o portador veja permanentemente todas as transações relacionadas às suas carteiras. Compartilhá-las com uma pessoa não confiável prejudicará significativamente sua privacidade.",
"settingsViewLwsKeysDialogRevealButton": "Revelar",
"settingsViewSecretKeysDialogText": "Não compartilhe essas chaves com ninguém, incluindo pessoas que aleguem ser suporte. Se você receber um pedido para fornecê-las, está sendo vítima de um golpe. Se você fornecer essas informações a outra pessoa, perderá seu dinheiro e ele não poderá ser recuperado.",
"settingsViewSecretKeysDialogRevealButton": "Revelar",
"settingsDeleteWalletButton": "Excluir Carteira",
- "settingsDeleteWalletDialogText": "Tem certeza que deseja excluir sua carteira? Você perderá acesso à seus fundos, a menos que tenha anotado sua semente.",
+ "settingsDeleteWalletDialogText": "Tem certeza que deseja excluir sua carteira? Você perderá acesso à seus fundos, a menos que tenha anotado sua frase de recuperação. Isso não remove sua lista de contatos nem as configurações do app.",
"settingsDeleteWalletDialogDeleteButton": "Excluir",
+ "settingsDeleteAddressBookButton": "Excluir Lista de Contatos",
+ "settingsDeleteAddressBookDialogText": "Tem certeza que deseja excluir sua lista de contatos? Se o backup automático estiver ligado, ela também será excluída desses backups automáticos.",
+ "settingsDeleteAddressBookDialogDeleteButton": "Excluir",
+ "settingsAddressBookDeleted": "Lista de contatos excluída",
"txDetailsTitle": "Detalhes da transação",
"txDetailsHashLabel": "Hash",
"txDetailsTimeAndDateLabel": "Data e Hora",
@@ -278,8 +304,8 @@
"lwsKeysSecretViewKey": "Chave Privada de Visualização",
"lwsKeysWarning": "As capturas de tela estão bloqueadas nesta tela. Certifique-se de que ninguém está olhando por cima do seu ombro.",
"secretKeysTitle": "Chaves Privadas de Restauração",
- "secretKeysDescription": "Estas sementes e chaves restauram o controle total da sua carteira. Qualquer pessoa que as veja pode gastar seus fundos.",
- "secretKeysMnemonic": "Semente",
+ "secretKeysDescription": "Estas frases de recuperação e chaves restauram o controle total da sua carteira. Qualquer pessoa que as veja pode gastar seus fundos.",
+ "secretKeysMnemonic": "Frase de recuperação",
"secretKeysPublicSpendKey": "Chave Pública de Gasto",
"secretKeysSecretSpendKey": "Chave Privada de Gasto",
"secretKeysPublicViewKey": "Chave Pública de Visualização",
@@ -331,7 +357,7 @@
"sendPriorityHeading": "Prioridade",
"sendPickContactTitle": "Enviar para um contato",
"sendAvailableSuffix": "disponível",
- "sendIrreversibleNote": "Transações Monero são irreversíveis. Confira o endereço e o valor antes de enviar.",
+ "sendIrreversibleNote": "As transações são irreversíveis, então verifique se o endereço e o valor estão corretos.",
"sendSwitchUnit": "Alternar unidade do valor",
"sendFailedToGetFeesError": "Não foi possível carregar taxas.",
"sendNoConnectionError": "Não foi possível conectar ao servidor. Verifique sua conexão e tente novamente.",
@@ -356,5 +382,30 @@
"torDisabledWalletsWarningConfirm": "Desativar o Tor",
"settingsTorSettingsLabel": "Configurações do Tor",
"lwsSetupTorDisabledError": "O Tor está desativado. Por favor, volte e ative-o.",
- "lwsSetupInvalidQrCode": "Endereço de conexão inválido."
+ "coinHomeSwap": "Trocar",
+ "coinHomeSwapComingSoon": "Em breve!",
+ "verifySeedTitle": "Verificar Frase de Recuperação",
+ "homeIncomingTitle": "A receber",
+ "homeIncomingUnlocksIn": "Desbloqueia em cerca de {minutes, plural, =1{1 minuto} other{{minutes} minutos}} · {done} de {needed}",
+ "homeIncomingConfirmations": "{done} de {needed} confirmações",
+ "homeChartTitle": "Saldo · 90 dias",
+ "homeChartToday": "Hoje",
+ "homeChartEachCoin": "Saldo de cada moeda",
+ "homeChartNew": "Novo",
+ "homeChartEmpty": "Seu saldo ao longo do tempo aparece aqui após sua primeira transação.",
+ "homeChecklistTitle": "Proteja sua carteira",
+ "homeChecklistProgress": "{done} de {total}",
+ "homeChecklistVerifySeed": "Verifique sua frase de recuperação",
+ "homeChecklistAutoBackup": "Ative os backups automáticos",
+ "homeChecklistTor": "Conecte-se pelo Tor",
+ "homeChecklistPrivateLookups": "Use o Tor nas consultas de preço e OpenAlias",
+ "homeChecklistSecurityKeys": "Configure uma chave de segurança",
+ "verifySeedSubtitle": "Insira as palavras {first}, {second} e {third} da sua frase de recuperação abaixo.",
+ "verifySeedButton": "Verificar",
+ "verifySeedWrongTitle": "Essas palavras não conferem",
+ "verifySeedWrongBody": "Confira a frase de recuperação que você anotou e insira as três novas palavras pedidas. {count, plural, =1{Resta 1 tentativa} other{Restam {count} tentativas}} antes de o app bloquear.",
+ "verifySeedTryAgain": "Tentar novamente",
+ "verifySeedUnavailable": "Não é possível ler sua frase de recuperação agora. Tente novamente depois de desbloquear a carteira.",
+ "verifySeedDone": "Frase de recuperação verificada",
+ "homeIncomingTitleMore": "A receber (+{count, plural, =1{1 Outra} other{{count} Outras}})"
}
### lib/main.dart
@@ -5,8 +5,6 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
-import 'package:skeletonizer/skeletonizer.dart';
-import 'package:timeago/timeago.dart' as timeago;
import 'package:skylight_wallet/models/fiat_rate_model.dart';
import 'package:skylight_wallet/models/contact_model.dart';
@@ -29,10 +27,12 @@ import 'package:skylight_wallet/screens/send.dart';
import 'package:skylight_wallet/screens/create_wallet.dart';
import 'package:skylight_wallet/screens/create_wallet_password.dart';
import 'package:skylight_wallet/screens/restore_wallet.dart';
+import 'package:skylight_wallet/screens/verify_seed.dart';
import 'package:skylight_wallet/screens/wallet_home.dart';
import 'package:skylight_wallet/screens/welcome.dart';
import 'package:skylight_wallet/screens/tor_settings.dart';
import 'package:skylight_wallet/screens/address_book.dart';
+import 'package:skylight_wallet/screens/history.dart';
import 'package:skylight_wallet/screens/privacy_policy.dart';
import 'package:skylight_wallet/screens/terms_of_service.dart';
import 'package:skylight_wallet/screens/unlock.dart';
@@ -45,8 +45,11 @@ import 'package:skylight_wallet/services/foreground_sync_service.dart';
import 'package:skylight_wallet/util/dirs.dart';
import 'package:skylight_wallet/util/logging.dart';
import 'package:skylight_wallet/util/platform.dart';
+import 'package:skylight_wallet/route_policy.dart';
import 'package:skylight_wallet/wallet_core_glue.dart';
-import 'package:wallet_domain/wallet_domain.dart' show WalletManager, parsePaymentUri;
+import 'package:wallet_backup_platform/backup_ui.dart';
+import 'package:wallet_domain/wallet_domain.dart' show AppSession, WalletManager, parsePaymentUri;
+import 'package:wallet_fhse/security_keys_ui.dart';
import 'package:wallet_infra/wallet_infra.dart' show HostPlatform;
void main() async {
@@ -58,6 +61,8 @@ void main() async {
await HostPlatform.init();
installWalletCore();
+ installSecurityKeysUi();
+ installMetadataBackup();
BrandColors.install(skylightPalette);
// Selected onboarding option cards stay white — only the accent border
// marks the selection (no tinted fill).
@@ -71,8 +76,6 @@ void main() async {
}
};
- timeago.setLocaleMessages('pt', timeago.PtBrMessages());
-
if (Platform.isLinux) {
await createAppDir();
NotificationService().init();
@@ -82,6 +85,9 @@ void main() async {
NotificationService().init();
}
+ // Before anything reads Sync Frequency: the tasks, the service, a wallet open.
+ await migrateSyncSettings();
+
if (Platform.isAndroid) {
registerPeriodicTasks();
startForegroundSyncIfEnabled();
@@ -90,8 +96,8 @@ void main() async {
if (Platform.isIOS) {
await cleanTorDirectoriesOnIOS();
- // Background sync here is LWS-only and decided by the connection; see
- // periodic_tasks._applyIosBackgroundTasks.
+ // BGTaskScheduler windows under Sync Frequency; see wallet_background's
+ // README.
registerPeriodicTasks();
NotificationService().init();
}
@@ -135,7 +141,8 @@ class _AppRoot extends StatefulWidget {
State<_AppRoot> createState() => _AppRootState();
}
-class _AppRootState extends State<_AppRoot> with WidgetsBindingObserver {
+class _AppRootState extends State<_AppRoot>
+ with WidgetsBindingObserver, AppLockLifecycle<_AppRoot> {
// Started once, on the first build. Building it inside the builder would
// re-run it on every theme/language change, opening the wallet again — a
// second wallet on the same file, with its own sync loop, while the first is
@@ -152,13 +159,13 @@ class _AppRootState extends State<_AppRoot> with WidgetsBindingObserver {
// actual flip we force an in-place rebuild of the navigator subtree.
final GlobalKey<NavigatorState> _navigatorKey = GlobalKey<NavigatorState>();
final _CurrentRouteObserver _routeObserver = _CurrentRouteObserver();
- bool _relockPending = false;
- bool _walletExists = false;
Brightness? _lastBrightness;
- // A payment deep link (monero:) awaiting replay. Held until the app is past the
- // lock, then opened on the send form — see _onRouteChanged.
- String? _pendingPaymentUri;
+ // Every route the platform pushes is dropped; payment links (monero:) come
+ // over PaymentLinkChannel instead and wait in the gate until the user is past
+ // every lock (AppSession) and on a screen behind them.
+ final _routeLinkBlocker = RouteLinkBlocker();
+ late final PaymentLinkGate _paymentLinks;
static const _paymentUriSchemes = {'monero'};
static void _markSubtreeDirty(Element element) {
@@ -168,9 +175,9 @@ class _AppRootState extends State<_AppRoot> with WidgetsBindingObserver {
// The bottom-nav destinations. Tapping a nav tab must not animate, so these
// get a zero-duration route in _onGenerateRoute.
- static const _noTransitionRoutes = {'/wallet_home', '/address_book', '/settings'};
+ static const _noTransitionRoutes = {'/wallet_home', '/history', '/address_book', '/settings'};
- Map<String, WidgetBuilder> get _routes => {
+ static final Map<String, WidgetBuilder> _routes = {
'/welcome': (context) => WelcomeScreen(),
'/tor_settings': (context) => TorSettingsScreen(),
'/connection_setup': (context) => ConnectionSetupScreen(),
@@ -181,27 +188,37 @@ class _AppRootState extends State<_AppRoot> with WidgetsBindingObserver {
'/lws_details': (context) => LwsDetailsScreen(),
'/restore_wallet': (context) => RestoreWalletScreen(),
'/unlock': (context) => UnlockScreen(),
+ '/security_key_unlock': (context) => const SecurityKeyUnlockScreen(),
+ // Re-authenticates every time it opens: it can turn security keys off.
+ '/advanced_security': (context) => const GuardedAdvancedSecurityScreen(),
+ '/metadata_backup': (context) => const MetadataBackupScreen(),
+ '/verify_seed': (context) => const VerifySeedScreen(),
'/wallet_home': (context) => WalletHomeScreen(),
'/settings': (context) => SettingsScreen(),
- '/lws_keys': (context) => ReauthGate(
+ '/lws_keys': (context) => AppLockGate(
reason: AppLocalizations.of(context)!.settingsAppLockUnlockReason,
child: LwsKeysScreen(),
),
- '/secret_keys': (context) => ReauthGate(
+ '/secret_keys': (context) => AppLockGate(
reason: AppLocalizations.of(context)!.revealSeedAuthReason,
child: SecretKeysScreen(),
),
'/send': (context) => SendScreen(),
'/scan_qr': (context) => ScanQrScreen(),
'/receive': (context) => ReceiveScreen(),
'/address_book': (context) => AddressBookScreen(),
+ '/history': (context) => const HistoryScreen(),
'/terms_of_service': (context) => TermsOfService(),
'/privacy_policy': (context) => PrivacyPolicy(),
};
Route<dynamic>? _onGenerateRoute(RouteSettings settings) {
+ // Deny by default (route_policy.dart): an unlisted route, or one behind the
+ // locks while the app is locked, shows nothing and removes itself.
final builder = _routes[settings.name];
- if (builder == null) return null;
+ if (builder == null || !routePolicy.allows(settings.name, unlocked: AppSession.isUnlocked)) {
+ return RefusedRoute(settings, listed: routePolicy.access.containsKey(settings.name));
+ }
// Desktop: no transition anywhere. Mobile: only between the nav-bar screens;
// every other push/pop keeps its normal animation.
if (isDesktop || _noTransitionRoutes.contains(settings.name)) {
@@ -213,55 +230,41 @@ class _AppRootState extends State<_AppRoot> with WidgetsBindingObserver {
@override
void initState() {
super.initState();
+ assert(() {
+ final c = routePolicy.check(_routes.keys);
+ return c.unlisted.isEmpty && c.stale.isEmpty;
+ }(), 'route_policy.dart does not match the routes');
+ // Android: the Continuous Sync service and this app take turns holding the
+ // wallets, never both at once; installed before anything opens.
+ ForegroundSyncLink.install(Provider.of<WalletManager>(context, listen: false));
+ // First, so it is asked before WidgetsApp's own observer and drops every
+ // pushed route before WidgetsApp could turn it into a screen.
+ WidgetsBinding.instance.addObserver(_routeLinkBlocker);
WidgetsBinding.instance.addObserver(this);
- _routeObserver.current.addListener(_onRouteChanged);
+ _paymentLinks = PaymentLinkGate(
+ schemes: _paymentUriSchemes,
+ unlocked: AppSession.unlocked,
+ landing: _routeObserver.current,
+ canLand: () => routePolicy.requiresUnlock(_routeObserver.currentName),
+ open: _openPaymentUri,
+ );
+ unawaited(PaymentLinkChannel.listen(_paymentLinks.offer));
}
@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
- _routeObserver.current.removeListener(_onRouteChanged);
+ WidgetsBinding.instance.removeObserver(_routeLinkBlocker);
+ _paymentLinks.dispose();
_announceWallet?.removeListener(_announceNewTxsOnGrowth);
super.dispose();
}
- // A deep link that arrives while the app is running (warm start). Payment links
- // open the send form; anything else is left to the default handling.
- @override
- Future<bool> didPushRouteInformation(RouteInformation routeInformation) async {
- if (_handleDeepLink(routeInformation.uri.toString())) return true;
- return super.didPushRouteInformation(routeInformation);
- }
-
- bool _isPaymentUri(String raw) {
- final scheme = Uri.tryParse(raw.trim())?.scheme.toLowerCase();
- return scheme != null && _paymentUriSchemes.contains(scheme);
- }
-
- // Open a payment link now if the app is past the lock, else hold it for replay.
- bool _handleDeepLink(String raw) {
- if (!_isPaymentUri(raw)) return false;
- final current = _routeObserver.currentName;
- if (!_walletExists || current == null || current == '/unlock') {
- _pendingPaymentUri = raw;
- } else {
- _openPaymentUri(raw);
- }
- return true;
- }
-
- // Replay a held payment link the first time the app reaches home — after boot
- // (no lock) or after unlock. The send form still reviews and authenticates the
- // spend; the link only prefills it.
- void _onRouteChanged() {
- final raw = _pendingPaymentUri;
- if (raw == null || _routeObserver.currentName != '/wallet_home') return;
- _pendingPaymentUri = null;
- WidgetsBinding.instance.addPostFrameCallback((_) => _openPaymentUri(raw));
- }
-
+ /// Opens the Send form for a payment link the gate let through: the user is
+ /// past every lock and on a screen behind them. It only pre-fills the form,
+ /// which reviews and confirms the payment as always.
void _openPaymentUri(String raw) {
- if (!mounted) return;
+ if (!mounted || !AppSession.isUnlocked) return;
final manager = Provider.of<WalletManager>(context, listen: false);
final request = parsePaymentUri(raw, manager.allWallets);
if (request == null) return;
@@ -279,43 +282,36 @@ class _AppRootState extends State<_AppRoot> with WidgetsBindingObserver {
);
return;
}
+ // Over whatever screen the user was on, so its back link says just "Back".
+ final overlayContext = _navigatorKey.currentState?.overlay?.context;
_navigatorKey.currentState?.pushNamed(
'/send',
- arguments: SendScreenArgs(destinationAddress: request.address, amount: request.amount),
+ arguments: SendScreenArgs(
+ destinationAddress: request.address,
+ amount: request.amount,
+ backLabel: overlayContext == null ? null : AppLocalizations.of(overlayContext)?.back,
+ ),
);
}
+ // App Lock and the full locks (AppLockLifecycle) run on this navigator.
@override
- void didChangeAppLifecycleState(AppLifecycleState state) {
- if (!isMobile) return;
-
- if (state == AppLifecycleState.paused) {
- // App Lock has to cover backgrounding, not just a cold start. Without
- // this, resuming walked straight back into an unlocked wallet with the
- // password still in memory, and the seed was reachable from there.
- unawaited(_maybeArmRelock());
-
- // Leaving the app marks everything on screen as seen so a background
- // isolate won't re-notify a tx the user just watched arrive. Desktop has
- // no background isolate — and doing this would pre-empt its foreground
- // announce. Marks only synced history (hash-based), so an unsynced
- // receipt is still announced later.
- unawaited(appWalletOf(context, listen: false).notifyNewIncomingTxs(announce: false));
- } else if (state == AppLifecycleState.resumed && _relockPending) {
- _relockPending = false;
- // Pushed ON TOP of the current stack rather than replacing it, so
- // unlocking pops straight back to the screen the user left. Skipped when
- // one is already showing, which would stack duplicates.
- if (_routeObserver.currentName != '/unlock') {
- _navigatorKey.currentState?.pushNamed('/unlock');
- }
- }
- }
+ NavigatorState? get appLockNavigator => _navigatorKey.currentState;
+
+ @override
+ String? get appLockTopRouteName => _routeObserver.currentName;
+
+ @override
+ Route<dynamic>? get appLockTopRoute => _routeObserver.top;
- /// On background: with App Lock on and a wallet present, drop the in-memory
- /// password and arm a re-lock so the next resume returns to the lock screen.
- Future<void> _maybeArmRelock() async {
- _relockPending = await armAppLockRelock(context);
+ /// Leaving the app marks everything on screen as seen so a background
+ /// isolate won't re-notify a tx the user just watched arrive. Desktop has
+ /// no background isolate — and doing this would pre-empt its foreground
+ /// announce. Marks only synced history (hash-based), so an unsynced
+ /// receipt is still announced later.
+ @override
+ void onMobilePaused() {
+ unawaited(appWalletOf(context, listen: false).notifyNewIncomingTxs(announce: false));
}
// Desktop has no background isolate to announce incoming txs, so the
@@ -355,19 +351,12 @@ class _AppRootState extends State<_AppRoot> with WidgetsBindingObserver {
final theme = sharedPreferences.getString(SharedPreferencesKeys.theme) ?? 'system';
- final appLockEnabled =
- sharedPreferences.getBool(SharedPreferencesKeys.appLockEnabled) ?? false;
-
- // A desktop OS asks for the typed password at every launch.
- final initialRoute = walletExists
- ? appLockEnabled || isDesktopOS
- ? '/unlock'
- : '/wallet_home'
- : '/welcome';
+ // App Lock at every launch (always on; the typed password on
+ // Linux and Windows). With security keys on, a key comes next.
+ final initialRoute = walletExists ? '/unlock' : '/welcome';
if (!_startedServices) {
_startedServices = true;
- _walletExists = walletExists;
// Only the built-in Tor is ours to start; external/disabled must
// not spin up an embedded Tor, whose status would then misreport
// the external proxy.
@@ -398,7 +387,11 @@ class _AppRootState extends State<_AppRoot> with WidgetsBindingObserver {
navigatorKey: _navigatorKey,
navigatorObservers: [_routeObserver],
title: 'Skylight Monero Wallet',
- localizationsDelegates: AppLocalizations.localizationsDelegates,
+ localizationsDelegates: const [
+ ...AppLocalizations.localizationsDelegates,
+ FhseLocalizations.delegate,
+ BackupLocalizations.delegate,
+ ],
supportedLocales: AppLocalizations.supportedLocales,
theme: brandLightTheme(),
darkTheme: brandDarkTheme(),
@@ -419,24 +412,23 @@ class _AppRootState extends State<_AppRoot> with WidgetsBindingObserver {
});
}
_lastBrightness = brightness;
- // Brand-tone skeletons (the default grey clashes with the
- // navy/orange scheme); tokens resolve to the current theme.
- return SkeletonizerConfig(
- data: SkeletonizerConfigData(
- effect: SoldColorEffect(color: BrandColors.surfaceMuted),
+ // App Lock's cover above the navigator; on a desktop OS,
+ // input anywhere counts as use for "Lock after".
+ return buildAppLock(
+ cover: (_) => UnlockScreen(
+ onUnlocked: hideAppLockCover,
+ onKeyNeeded: appLockCoverNeedsKey,
),
child: child ?? const SizedBox.shrink(),
);
},
initialRoute: initialRoute,
- // Always boot through the resolved initial route; a cold-start deep
- // link arrives here, so capture a payment link for replay past the
- // lock and never let it become the initial route (which would race
- // boot/unlock and skip the lock). The `route` extra is ignored.
- onGenerateInitialRoutes: (deepLink) {
- if (_isPaymentUri(deepLink)) _pendingPaymentUri = deepLink;
- return [_onGenerateRoute(RouteSettings(name: initialRoute))!];
- },
+ // Always boot through the resolved initial route. Whatever the
+ // platform offers as a deep link is ignored: payment links
+ // arrive over PaymentLinkChannel, and nothing else is taken.
+ onGenerateInitialRoutes: (_) => [
+ _onGenerateRoute(RouteSettings(name: initialRoute))!,
+ ],
locale: Locale.fromSubtags(languageCode: languageProvider.language),
onGenerateRoute: _onGenerateRoute,
);
@@ -484,15 +476,36 @@ class _CurrentRouteObserver extends NavigatorObserver {
String? get currentName => current.value;
+ /// The top route itself.
+ Route<dynamic>? top;
+
+ @override
+ void didPush(Route<dynamic> route, Route<dynamic>? previousRoute) {
+ top = route;
+ current.value = route.settings.name;
+ }
+
@override
- void didPush(Route<dynamic> route, Route<dynamic>? previousRoute) =>
- current.value = route.settings.name;
+ void didPop(Route<dynamic> route, Route<dynamic>? previousRoute) {
+ top = previousRoute;
+ current.value = previousRoute?.settings.name;
+ }
@override
- void didPop(Route<dynamic> route, Route<dynamic>? previousRoute) =>
- current.value = previousRoute?.settings.name;
+ void didReplace({Route<dynamic>? newRoute, Route<dynamic>? oldRoute}) {
+ top = newRoute;
+ current.value = newRoute?.settings.name;
+ }
+ /// A route taken out from under the top (a refused one removes itself).
@override
- void didReplace({Route<dynamic>? newRoute, Route<dynamic>? oldRoute}) =>
- current.value = newRoute?.settings.name;
+ void didRemove(Route<dynamic> route, Route<dynamic>? previousRoute) {
+ if (!identical(route, top)) return;
+ top = previousRoute;
+ current.value = previousRoute?.settings.name;
+ }
}
+
+/// Every route name the app defines, for test/route_policy_test.dart.
+@visibleForTesting
+Iterable<String> get appRouteNames => _AppRootState._routes.keys;
### lib/models/app_wallet.dart
@@ -1,4 +1,5 @@
import 'package:flutter/foundation.dart' show Listenable;
+import 'package:wallet_monero/wallet_monero.dart' show LwsPendingApproval;
import 'package:skylight_wallet/models/wallet_types.dart'
show TxDetails, LWSConnectionDetails, ResolvedOpenAlias;
@@ -31,7 +32,11 @@ abstract interface class AppWallet implements Listenable {
bool get hasAttemptedConnection;
bool get torRequirementBroken;
+ /// What the light-wallet server is still waiting to approve, or null.
+ LwsPendingApproval? get lwsPendingApproval;
+
String connectionAddressExampleForType(String type);
+ bool connectionAllowsPath(String type);
// Sync
bool get isConnected;
### lib/models/monero_wallet_adapter.dart
@@ -6,7 +6,7 @@ import 'package:skylight_wallet/models/wallet_types.dart'
import 'package:wallet_domain/wallet_domain.dart' as domain;
import 'package:wallet_infra/wallet_infra.dart' show requiresSecureTransport;
-import 'package:wallet_monero/wallet_monero.dart' show MoneroWallet;
+import 'package:wallet_monero/wallet_monero.dart' show LwsPendingApproval, MoneroWallet;
const _moneroDecimals = 12;
@@ -22,8 +22,7 @@ bool _deriveSsl(String address) =>
/// converting wallet-core types (BigInt amounts, TxDetails, connection details)
/// to skylight's. Re-fires the wrapped wallet's notifications.
class MoneroWalletAdapter extends ChangeNotifier implements AppWallet {
- MoneroWalletAdapter(this._wallet, {StoredSeedReader? readStoredSeed})
- : _readStoredSeed = readStoredSeed {
+ MoneroWalletAdapter(this._wallet, {this._readStoredSeed}) {
_wallet.addListener(notifyListeners);
}
@@ -59,9 +58,14 @@ class MoneroWalletAdapter extends ChangeNotifier implements AppWallet {
@override
bool get torRequirementBroken => _wallet.torRequirementBroken;
@override
+ LwsPendingApproval? get lwsPendingApproval => _wallet.lwsPendingApproval;
+ @override
String connectionAddressExampleForType(String type) =>
_wallet.connectionAddressExampleForType(type);
+ @override
+ bool connectionAllowsPath(String type) => _wallet.connectionAllowsPath(type);
+
// Sync
@override
bool get isConnected => _wallet.isConnected;
@@ -266,8 +270,9 @@ class MoneroWalletAdapter extends ChangeNotifier implements AppWallet {
@override
Future<ResolvedOpenAlias?> resolveOpenAlias(String alias) async {
- // resolveAlias throws when Tor is down or the input is a raw address;
- // skylight's send flow expects null on any failure.
+ // resolveAlias follows the OpenAlias setting (over Tor, directly, or not
+ // at all) and throws when that lookup cannot happen or the input is a raw
+ // address; skylight's send flow expects null on any failure.
try {
final resolved = await _wallet.resolveAlias(alias);
if (resolved == null) return null;
### lib/periodic_tasks.dart
@@ -7,7 +7,7 @@ import 'package:wallet_background/wallet_background.dart';
// only the isolate entry point, because a fresh background isolate has none of
// the app's wallet-core statics and the package can't reach the app's bootstrap.
export 'package:wallet_background/wallet_background.dart'
- show PeriodicTasks, registerPeriodicTasks, applyBackgroundTaskRegistration;
+ show PeriodicTasks, registerPeriodicTasks, applyBackgroundTaskRegistration, migrateSyncSettings;
/// WorkManager isolate entry: bootstrap this isolate (`installWalletCore` also
/// installs the `BackgroundSync` config), then run the shared orchestration.
### lib/route_policy.dart
@@ -0,0 +1,39 @@
+import 'package:wallet_ui/wallet_ui.dart' show RouteAccess, RoutePolicy;
+
+/// Who may open each of Skylight's routes. Deny by default: `onGenerateRoute`
+/// refuses a route that is not listed here, and one marked
+/// [RouteAccess.unlocked] until the user is past every lock (App Lock, the
+/// typed password, security keys). `test/route_policy_test.dart` fails if a
+/// route is missing.
+const routePolicy = RoutePolicy({
+ // Onboarding, before a wallet exists.
+ '/welcome': RouteAccess.public,
+ '/tor_settings': RouteAccess.public,
+ '/fiat_api_setup': RouteAccess.public,
+ '/connection_setup': RouteAccess.public,
+ '/create_wallet': RouteAccess.public,
+ '/create_wallet_password': RouteAccess.public,
+ '/generate_seed': RouteAccess.public,
+ '/restore_wallet': RouteAccess.public,
+ // Restore scans a seed's QR code; Send and the address book use it too.
+ '/scan_qr': RouteAccess.public,
+ // The locks themselves.
+ '/unlock': RouteAccess.public,
+ '/security_key_unlock': RouteAccess.public,
+ // Legal pages, linked from onboarding.
+ '/terms_of_service': RouteAccess.public,
+ '/privacy_policy': RouteAccess.public,
+ // The wallet.
+ '/wallet_home': RouteAccess.unlocked,
+ '/send': RouteAccess.unlocked,
+ '/receive': RouteAccess.unlocked,
+ '/address_book': RouteAccess.unlocked,
+ '/history': RouteAccess.unlocked,
+ '/settings': RouteAccess.unlocked,
+ '/lws_details': RouteAccess.unlocked,
+ '/lws_keys': RouteAccess.unlocked,
+ '/secret_keys': RouteAccess.unlocked,
+ '/advanced_security': RouteAccess.unlocked,
+ '/metadata_backup': RouteAccess.unlocked,
+ '/verify_seed': RouteAccess.unlocked,
+});
### lib/screens/address_book.dart
@@ -177,7 +177,7 @@ class _AddressBookScreenState extends State<AddressBookScreen> {
return Scaffold(
backgroundColor: BrandColors.paper,
- bottomNavigationBar: const WalletNavigationBar(selectedIndex: 1),
+ bottomNavigationBar: const WalletNavigationBar(selectedIndex: 2),
body: SafeArea(
bottom: false,
child: Center(
@@ -512,7 +512,11 @@ class _AddressRow extends StatelessWidget {
onPressed: () => Navigator.pushNamed(
context,
'/send',
- arguments: SendScreenArgs(destinationAddress: _xmrAddress(contact), contact: contact),
+ arguments: SendScreenArgs(
+ destinationAddress: _xmrAddress(contact),
+ contact: contact,
+ backLabel: i18n.addressBookTitle,
+ ),
),
),
],
@@ -631,7 +635,12 @@ class _ContactSheetState extends State<_ContactSheet> {
if (widget.contact == null) {
await model.addContact(name, {'XMR': address});
} else {
- await model.updateContact(widget.contact!.id, name, {'XMR': address});
+ // Keep the addresses Skylight does not show (a contact shared with
+ // Spice through the backup can hold BTC or ETH ones too).
+ await model.updateContact(widget.contact!.id, name, {
+ ...widget.contact!.addresses,
+ 'XMR': address,
+ });
}
if (mounted) Navigator.pop(context);
} catch (_) {
### lib/screens/create_wallet.dart
@@ -59,16 +59,6 @@ class _CreateWalletScreenState extends State<CreateWalletScreen> {
continueText: i18n.continueText,
noteGenerated: i18n.onboardingWalletNoteGenerated,
noteRestore: i18n.onboardingWalletNoteRestore,
- createBullets: [
- i18n.onboardingWalletCreateBullet1,
- i18n.onboardingWalletCreateBullet2,
- i18n.onboardingWalletCreateBullet3,
- ],
- restoreBullets: [
- i18n.onboardingWalletRestoreBullet1,
- i18n.onboardingWalletRestoreBullet2,
- i18n.onboardingWalletRestoreBullet3,
- ],
onCreateNew: createNew,
onRestore: _restoreExisting,
onBack: () => Navigator.pop(context),
### lib/screens/desktop/home_shell.dart
@@ -6,9 +6,8 @@ import 'package:skylight_wallet/l10n/app_localizations.dart';
import 'package:skylight_wallet/screens/settings.dart';
import 'package:skylight_wallet/widgets/ui/ui.dart';
-/// The top-level desktop destinations, mirroring the mobile navigation bar
-/// (Skylight has no separate History screen).
-enum DesktopNav { home, addressBook, settings }
+/// The top-level desktop destinations, mirroring the mobile navigation bar.
+enum DesktopNav { home, history, addressBook, settings }
/// Shared style for a desktop screen's large title (Settings, Contacts, …).
TextStyle get desktopTitleStyle => TextStyle(
@@ -182,6 +181,8 @@ class _DesktopShellState extends State<DesktopShell> {
'/wallet_home',
),
const SizedBox(height: 2),
+ _navItem(DesktopNav.history, Icons.history, i18n.navigationBarHistory, '/history'),
+ const SizedBox(height: 2),
_navItem(
DesktopNav.addressBook,
Icons.people_outline,
### lib/screens/desktop/wallet_setup_view.dart
@@ -6,14 +6,12 @@ import 'package:skylight_wallet/widgets/ui/ui.dart';
/// Desktop Step 4 of 6 — create-new vs restore. Selection then Continue (rather
/// than the mobile immediate-navigate). Card title/description reuse the mobile
-/// [CreateWalletLabels]; the feature bullets are desktop-only copy.
+/// [CreateWalletLabels].
class DesktopWalletSetupView extends StatefulWidget {
final CreateWalletLabels labels;
final String continueText;
final String noteGenerated;
final String noteRestore;
- final List<String> createBullets;
- final List<String> restoreBullets;
final VoidCallback onCreateNew;
final VoidCallback onRestore;
final VoidCallback? onBack;
@@ -24,8 +22,6 @@ class DesktopWalletSetupView extends StatefulWidget {
required this.continueText,
required this.noteGenerated,
required this.noteRestore,
- required this.createBullets,
- required this.restoreBullets,
required this.onCreateNew,
required this.onRestore,
this.onBack,
@@ -67,7 +63,6 @@ class _DesktopWalletSetupViewState extends State<DesktopWalletSetupView> {
title: l.createNew,
description: l.createNewDesc,
onTap: () => setState(() => _selected = _new),
- trailing: _Bullets(widget.createBullets),
),
const SizedBox(height: 10),
OnboardingRadioCard(
@@ -76,46 +71,9 @@ class _DesktopWalletSetupViewState extends State<DesktopWalletSetupView> {
title: l.restore,
description: l.restoreDesc,
onTap: () => setState(() => _selected = _restore),
- trailing: _Bullets(widget.restoreBullets),
),
],
),
);
}
}
-
-class _Bullets extends StatelessWidget {
- final List<String> items;
- const _Bullets(this.items);
-
- @override
- Widget build(BuildContext context) {
- return Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- for (final item in items)
- Padding(
- padding: const EdgeInsets.only(top: 6),
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Icon(Icons.check, size: 14, color: BrandColors.primary),
- const SizedBox(width: 8),
- Expanded(
- child: Text(
- item,
- style: TextStyle(
- fontFamily: 'Ubuntu',
- fontSize: 12.5,
- height: 1.5,
- color: BrandColors.inkMuted,
- ),
- ),
- ),
- ],
- ),
- ),
- ],
- );
- }
-}
### lib/screens/generate_seed.dart
@@ -36,14 +36,14 @@ class _GenerateSeedScreenState extends State<GenerateSeedScreen> with SecureScre
_seed = generated.seed.mnemonic.split(' ');
}
- /// A desktop OS adds a password step (password-last flow). Mobile has no
- /// password screen — it's guarded by the device app lock — so it commits the
- /// wallet directly from here. That includes the iOS build on a Mac, which
- /// shows the desktop layout but keeps the mobile wallet password.
+ /// Linux and Windows add a password step (password-last flow). Elsewhere there
+ /// is no password screen — a generated password is guarded by the device's
+ /// App Lock — so it commits the wallet directly from here. That includes
+ /// macOS and the iOS build on a Mac, which show the desktop layout.
void _continue() {
final generated = _generated;
if (generated == null) return;
- if (isDesktopOS) {
+ if (typesWalletPassword) {
Navigator.pushNamed(
context,
'/create_wallet_password',
@@ -111,7 +111,7 @@ class _GenerateSeedScreenState extends State<GenerateSeedScreen> with SecureScre
).format(_generated!.restoreDate)
: null,
confirmLabel: i18n.generateSeedConfirm,
- passwordNote: isDesktopOS ? i18n.onboardingSeedNotePassword : null,
+ passwordNote: typesWalletPassword ? i18n.onboardingSeedNotePassword : null,
revealLabel: i18n.generateSeedReveal,
continueText: i18n.continueText,
loading: _committing,
### lib/screens/history.dart
@@ -0,0 +1,771 @@
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:provider/provider.dart';
+
+import 'package:skylight_wallet/consts.dart' as consts;
+import 'package:skylight_wallet/l10n/app_localizations.dart';
+import 'package:skylight_wallet/models/fiat_rate_model.dart';
+import 'package:skylight_wallet/screens/desktop/home_shell.dart';
+import 'package:skylight_wallet/util/platform.dart';
+import 'package:skylight_wallet/wallet_core_glue.dart';
+import 'package:skylight_wallet/widgets/ui/ui.dart';
+import 'package:skylight_wallet/widgets/wallet_navigation_bar.dart';
+import 'package:wallet_domain/wallet_domain.dart' show CryptoWallet, TxDetails;
+import 'package:wallet_infra/wallet_infra.dart' show LogLevel, exportFileName, log, saveExportFile;
+
+/// The wallet's transactions, filterable by direction and by address, and
+/// exportable as CSV (the filtered ones, or all of them with no filter). A
+/// top-level destination in the navigation bar, as in Spice; Skylight holds
+/// only Monero, so Spice's blockchain and asset filters have no place here.
+class HistoryScreen extends StatefulWidget {
+ const HistoryScreen({super.key});
+
+ @override
+ State<HistoryScreen> createState() => _HistoryScreenState();
+}
+
+enum _Filter { type, address }
+
+/// Whether [tx] involves [address]: received at it, or sent to it.
+///
+/// One list serves both directions: on an incoming transaction `recipients`
+/// holds the wallet's own addresses it was received at, and on an outgoing one
+/// who was paid. Change is included deliberately: a spend that returned change
+/// to the address did involve it. Monero addresses are compared exactly; base58
+/// is case-significant.
+@visibleForTesting
+bool txInvolvesAddress(TxDetails tx, String address) {
+ final wanted = address.trim();
+ return tx.recipients.any((r) => r.address.trim() == wanted);
+}
+
+class _HistoryScreenState extends State<HistoryScreen> {
+ // Unchecked (hidden) directions; empty = everything checked (the default).
+ final Set<int> _typesHidden = {};
+
+ /// The one address the address filter matches, or null for no filter.
+ String? _address;
+
+ /// The last paste or scan was not a Monero address. Cleared by the next
+ /// attempt or a reset.
+ bool _addressInvalid = false;
+
+ _Filter? _open;
+
+ void _toggleOpen(_Filter f) => setState(() => _open = _open == f ? null : f);
+
+ /// A bare address or a `monero:<address>?...` URI; null if neither.
+ String? _extractAddress(String raw, CryptoWallet wallet) {
+ final value = raw.trim();
+ if (value.isEmpty) return null;
+ final uri = Uri.tryParse(value);
+ if (uri != null && uri.scheme.toLowerCase() == 'monero') {
+ return wallet.isAddressValid(uri.path) ? uri.path : null;
+ }
+ return wallet.isAddressValid(value) ? value : null;
+ }
+
+ void _setAddress(String? raw, CryptoWallet wallet) {
+ final found = raw == null ? null : _extractAddress(raw, wallet);
+ setState(() {
+ if (found == null) {
+ _addressInvalid = true;
+ return;
+ }
+ _address = found;
+ _addressInvalid = false;
+ });
+ }
+
+ Future<void> _pasteAddress(CryptoWallet wallet) async {
+ final data = await Clipboard.getData(Clipboard.kTextPlain);
+ if (mounted) _setAddress(data?.text, wallet);
+ }
+
+ Future<void> _scanAddress(CryptoWallet wallet) async {
+ final result = await Navigator.pushNamed(context, '/scan_qr');
+ if (mounted && result is String) _setAddress(result, wallet);
+ }
+
+ void _clearAddress() => setState(() {
+ _address = null;
+ _addressInvalid = false;
+ });
+
+ /// Saves [txs], the transactions the filters let through, as CSV. [anchor]
+ /// is the button, for the iPad share popover.
+ Future<void> _export(CryptoWallet asset, List<TxDetails> txs, BuildContext anchor) async {
+ final i18n = AppLocalizations.of(context)!;
+ final box = anchor.findRenderObject() as RenderBox?;
+ final origin = box == null ? null : box.localToGlobal(Offset.zero) & box.size;
+ try {
+ final saved = await saveExportFile(
+ name: exportFileName('skylight-history', 'csv', DateTime.now()),
+ bytes: utf8.encode(txHistoryCsv([for (final tx in txs) (tx: tx, asset: asset)])),
+ typeLabel: 'CSV',
+ extension: 'csv',
+ mimeType: 'text/csv',
+ sharePositionOrigin: origin,
+ );
+ if (saved && mounted) showBrandToast(context, i18n.historyExported);
+ } catch (e) {
+ log(LogLevel.error, '[History] CSV export failed: $e');
+ if (mounted) showBrandToast(context, i18n.historyExportFailed);
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final i18n = AppLocalizations.of(context)!;
+ // Watched so the list follows new transactions; the rows read the engine
+ // wallet's exact amounts.
+ appWalletOf(context, listen: true);
+ final fiatRate = context.watch<FiatRateModel>();
+ final asset = xmrWallet(context);
+ // Content gutter: the desktop shell caps width and wants wider margins.
+ final gutter = isDesktop ? 44.0 : 20.0;
+
+ final all = asset?.txHistory ?? const <TxDetails>[];
+ final entries = all.where((tx) {
+ if (_typesHidden.contains(tx.direction)) return false;
+ final address = _address;
+ if (address != null && !txInvolvesAddress(tx, address)) return false;
+ return true;
+ }).toList();
+
+ int typeCount(int type) => all.where((tx) => tx.direction == type).length;
+ final typeOptions = [
+ _Option(
+ '${consts.txDirectionIncoming}',
+ i18n.coinHomeReceived,
+ _typeIcon(Icons.south, BrandColors.success, BrandColors.successBg),
+ typeCount(consts.txDirectionIncoming),
+ ),
+ _Option(
+ '${consts.txDirectionOutgoing}',
+ i18n.coinHomeSent,
+ _typeIcon(Icons.north, BrandColors.primary, BrandColors.surfaceAccent),
+ typeCount(consts.txDirectionOutgoing),
+ ),
+ ];
+ // The pill shows the number of checked options, but only once some are
+ // unchecked: all checked is the default and reads as "no filter".
+ final typesChecked = typeOptions.where((o) => !_typesHidden.contains(int.parse(o.value)));
+ final typeCountBadge = typesChecked.length == typeOptions.length ? null : typesChecked.length;
+
+ final list = entries.isEmpty || asset == null
+ ? Center(child: Text(i18n.homeNoTransactions, style: BrandText.bodyMuted))
+ : _Timeline(
+ entries: entries,
+ asset: asset,
+ i18n: i18n,
+ fiatRate: fiatRate,
+ gutter: gutter,
+ onTapTx: (tx) => showTxDetailsDialog(context, tx),
+ );
+
+ final canExport = asset != null && entries.isNotEmpty;
+ void export(BuildContext anchor) {
+ if (canExport) _export(asset, entries, anchor);
+ }
+
+ final filters = <Widget>[
+ SingleChildScrollView(
+ scrollDirection: Axis.horizontal,
+ padding: EdgeInsets.fromLTRB(gutter, 0, gutter, 12),
+ child: Row(
+ children: [
+ _FilterPill(
+ label: i18n.historyFilterType,
+ count: typeCountBadge,
+ open: _open == _Filter.type,
+ onTap: () => _toggleOpen(_Filter.type),
+ ),
+ const SizedBox(width: 7),
+ _FilterPill(
+ label: i18n.historyFilterAddress,
+ count: _address == null ? null : 1,
+ open: _open == _Filter.address,
+ onTap: () => _toggleOpen(_Filter.address),
+ ),
+ ],
+ ),
+ ),
+ if (_open == _Filter.type)
+ _FilterPanel(
+ header: i18n.historyFilterType,
+ options: typeOptions,
+ isSelected: (v) => !_typesHidden.contains(int.parse(v)),
+ gutter: gutter,
+ onToggle: (v) => setState(() => _typesHidden.toggle(int.parse(v))),
+ onReset: () => setState(_typesHidden.clear),
+ onDone: () => setState(() => _open = null),
+ ),
+ if (_open == _Filter.address && asset != null)
+ _AddressPanel(
+ address: _address,
+ iconAsset: asset.iconAsset,
+ invalid: _addressInvalid,
+ gutter: gutter,
+ onPaste: () => _pasteAddress(asset),
+ onScan: () => _scanAddress(asset),
+ onClear: _clearAddress,
+ onDone: () => setState(() => _open = null),
+ ),
+ Expanded(
+ child: _open == null
+ ? list
+ : GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: () => setState(() => _open = null),
+ child: Opacity(opacity: 0.4, child: IgnorePointer(child: list)),
+ ),
+ ),
+ ];
+
+ if (isDesktop) {
+ return DesktopShell(
+ active: DesktopNav.history,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ Padding(
+ padding: const EdgeInsets.fromLTRB(44, 30, 44, 20),
+ child: Row(
+ children: [
+ Expanded(child: Text(i18n.historyTitle, style: desktopTitleStyle)),
+ Builder(
+ builder: (anchor) => BrandButton.secondary(
+ label: i18n.historyExportCsv,
+ icon: Icons.file_download_outlined,
+ expand: false,
+ onPressed: canExport ? () => export(anchor) : null,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ...filters,
+ ],
+ ),
+ );
+ }
+
+ return Scaffold(
+ backgroundColor: BrandColors.paper,
+ bottomNavigationBar: const WalletNavigationBar(selectedIndex: 1),
+ body: SafeArea(
+ bottom: false,
+ child: Center(
+ child: ConstrainedBox(
+ constraints: const BoxConstraints(maxWidth: 520),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 6),
+ child: BrandScreenHeader(
+ center: Text(i18n.historyTitle, style: BrandText.appBar.copyWith(fontSize: 16)),
+ action: Tooltip(
+ message: i18n.historyExportCsv,
+ child: Opacity(
+ opacity: canExport ? 1 : 0.4,
+ child: Builder(
+ builder: (anchor) => IconCircleButton(
+ icon: Icons.file_download_outlined,
+ onPressed: canExport ? () => export(anchor) : null,
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ const SizedBox(height: 8),
+ ...filters,
+ ],
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+
+ Widget _typeIcon(IconData icon, Color fg, Color bg) {
+ return Container(
+ width: 24,
+ height: 24,
+ alignment: Alignment.center,
+ decoration: BoxDecoration(color: bg, borderRadius: BorderRadius.circular(8)),
+ child: Icon(icon, size: 13, color: fg),
+ );
+ }
+}
+
+extension _ToggleSet<T> on Set<T> {
+ void toggle(T value) => contains(value) ? remove(value) : add(value);
+}
+
+/// A filter option: its stored value, display name, leading icon, and how many
+/// transactions match it overall.
+class _Option {
+ final String value;
+ final String label;
+ final Widget icon;
+ final int count;
+ const _Option(this.value, this.label, this.icon, this.count);
+}
+
+class _Timeline extends StatelessWidget {
+ final List<TxDetails> entries;
+ final CryptoWallet asset;
+ final AppLocalizations i18n;
+ final FiatRateModel fiatRate;
+ final double gutter;
+ final void Function(TxDetails tx) onTapTx;
+
+ const _Timeline({
+ required this.entries,
+ required this.asset,
+ required this.i18n,
+ required this.fiatRate,
+ required this.gutter,
+ required this.onTapTx,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ final rows = withDayHeaders(entries, (tx) => tx.timestamp);
+
+ return ListView.builder(
+ padding: EdgeInsets.fromLTRB(gutter, 0, gutter, 24),
+ itemCount: rows.length,
+ itemBuilder: (context, index) {
+ final row = rows[index];
+ if (row is String) {
+ return Padding(
+ padding: EdgeInsets.only(top: index == 0 ? 0 : 18, bottom: 4),
+ child: SectionHeader(label: row, padding: EdgeInsets.zero),
+ );
+ }
+ final tx = row as TxDetails;
+ final next = index + 1 < rows.length ? rows[index + 1] : null;
+ // No coin icon, as on the home screen: Skylight is single-coin.
+ return TxActivityRow(
+ tx: tx,
+ asset: asset,
+ showCoinIcon: false,
+ labels: TxActivityLabels(received: i18n.coinHomeReceived, sent: i18n.coinHomeSent),
+ fiatRate: fiatRate,
+ showDivider: next is TxDetails,
+ onTap: () => onTapTx(tx),
+ );
+ },
+ );
+ }
+}
+
+/// The address filter's panel: one Monero address, set by paste or scan.
+///
+/// Same chrome as [_FilterPanel] (card, shadow, sunken footer) over the
+/// address book's entry row, so setting an address here looks like setting
+/// one on a contact.
+class _AddressPanel extends StatelessWidget {
+ final String? address;
+ final String iconAsset;
+ final bool invalid;
+ final double gutter;
+ final VoidCallback onPaste;
+ final VoidCallback onScan;
+ final VoidCallback onClear;
+ final VoidCallback onDone;
+
+ const _AddressPanel({
+ required this.address,
+ required this.iconAsset,
+ required this.invalid,
+ required this.gutter,
+ required this.onPaste,
+ required this.onScan,
+ required this.onClear,
+ required this.onDone,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ final i18n = AppLocalizations.of(context)!;
+ return Padding(
+ padding: EdgeInsets.fromLTRB(gutter, 0, gutter, 12),
+ child: Container(
+ clipBehavior: Clip.antiAlias,
+ decoration: _panelDecoration,
+ foregroundDecoration: _panelBorder,
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Padding(
+ padding: const EdgeInsets.fromLTRB(16, 14, 16, 4),
+ child: SectionHeader(label: i18n.historyFilterAddress, padding: EdgeInsets.zero),
+ ),
+ Padding(
+ padding: const EdgeInsets.fromLTRB(16, 2, 16, 0),
+ child: Text(i18n.historyFilterAddressHint, style: BrandText.caption),
+ ),
+ Padding(
+ padding: const EdgeInsets.fromLTRB(16, 10, 16, 14),
+ child: address == null ? _empty(i18n) : _filled(),
+ ),
+ _PanelFooter(onReset: onClear, onDone: onDone),
+ ],
+ ),
+ ),
+ );
+ }
+
+ Widget _empty(AppLocalizations i18n) => Container(
+ decoration: BoxDecoration(
+ color: BrandColors.surfaceSunken,
+ border: Border.all(color: invalid ? BrandColors.error : BrandColors.border),
+ borderRadius: BorderRadius.circular(14),
+ ),
+ padding: const EdgeInsets.symmetric(horizontal: 13, vertical: 11),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ children: [
+ Container(
+ width: 30,
+ height: 30,
+ alignment: Alignment.center,
+ decoration: BoxDecoration(color: BrandColors.surfaceTinted, shape: BoxShape.circle),
+ child: Icon(
+ Icons.account_balance_wallet_outlined,
+ size: 15,
+ color: BrandColors.inkFaint,
+ ),
+ ),
+ const SizedBox(width: 11),
+ Expanded(
+ child: Text(
+ i18n.historyFilterAddressAny,
+ style: TextStyle(
+ fontSize: 12.5,
+ fontWeight: FontWeight.w500,
+ color: BrandColors.inkFaint,
+ ),
+ ),
+ ),
+ MiniActionButton(
+ bordered: true,
+ icon: Icons.content_paste_outlined,
+ label: i18n.sendPasteButton,
+ onTap: onPaste,
+ ),
+ if (Platform.isAndroid || Platform.isIOS) ...[
+ const SizedBox(width: 7),
+ MiniActionButton(
+ bordered: true,
+ icon: Icons.qr_code_scanner,
+ label: i18n.sendScanButton,
+ onTap: onScan,
+ ),
+ ],
+ ],
+ ),
+ if (invalid) ...[
+ const SizedBox(height: 8),
+ Text(
+ i18n.historyFilterAddressInvalid,
+ style: BrandText.caption.copyWith(color: BrandColors.error),
+ ),
+ ],
+ ],
+ ),
+ );
+
+ Widget _filled() => BrandCard(
+ radius: 14,
+ padding: const EdgeInsets.symmetric(horizontal: 13, vertical: 11),
+ child: Row(
+ children: [
+ CoinMark(coinSymbol: 'XMR', iconAsset: iconAsset, size: 30),
+ const SizedBox(width: 11),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ 'Monero',
+ style: TextStyle(
+ fontSize: 12.5,
+ fontWeight: FontWeight.w500,
+ color: BrandColors.ink,
+ ),
+ ),
+ const SizedBox(height: 3),
+ Text(
+ shortenMiddle(address!, head: 9, tail: 9),
+ style: TextStyle(
+ fontFamily: 'Ubuntu Mono',
+ fontSize: 11,
+ color: BrandColors.inkMuted,
+ ),
+ ),
+ ],
+ ),
+ ),
+ Tappable(
+ behavior: HitTestBehavior.opaque,
+ onTap: onClear,
+ child: Container(
+ width: 26,
+ height: 26,
+ alignment: Alignment.center,
+ decoration: BoxDecoration(color: BrandColors.surfaceTinted, shape: BoxShape.circle),
+ child: Icon(Icons.close, size: 13, color: BrandColors.inkMuted),
+ ),
+ ),
+ ],
+ ),
+ );
+}
+
+/// A filter panel's card: shadowed, with its border in the foreground so the
+/// footer's fill cannot overpaint it (a background border is drawn behind the
+/// children, dimming the bottom corners). Getters: the colours follow the
+/// theme.
+BoxDecoration get _panelDecoration => BoxDecoration(
+ color: BrandColors.card,
+ borderRadius: BorderRadius.circular(18),
+ boxShadow: const [
+ BoxShadow(color: Color(0x242C170C), blurRadius: 28, offset: Offset(0, 8)),
+ BoxShadow(color: Color(0x0F2C170C), blurRadius: 2, offset: Offset(0, 1)),
+ ],
+);
+
+BoxDecoration get _panelBorder => BoxDecoration(
+ borderRadius: BorderRadius.circular(18),
+ border: Border.all(color: BrandColors.borderStrong),
+);
+
+/// A filter panel's Reset / Done footer.
+class _PanelFooter extends StatelessWidget {
+ final VoidCallback onReset;
+ final VoidCallback onDone;
+
+ const _PanelFooter({required this.onReset, required this.onDone});
+
+ @override
+ Widget build(BuildContext context) {
+ final i18n = AppLocalizations.of(context)!;
+ return Container(
+ decoration: BoxDecoration(
+ color: BrandColors.surfaceSunken,
+ border: Border(top: BorderSide(color: BrandColors.surfaceTinted)),
+ ),
+ padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Tappable(
+ behavior: HitTestBehavior.opaque,
+ onTap: onReset,
+ child: Padding(
+ padding: const EdgeInsets.symmetric(vertical: 5),
+ child: Text(
+ i18n.historyFilterReset,
+ style: TextStyle(fontSize: 13, color: BrandColors.primary),
+ ),
+ ),
+ ),
+ BrandButton(label: i18n.done, onPressed: onDone, expand: false, dense: true),
+ ],
+ ),
+ );
+ }
+}
+
+/// A rounded filter chip: category name, a count badge and an up/down chevron.
+/// Goes dark (the design's ink pill) once it is open or has a selection.
+class _FilterPill extends StatelessWidget {
+ final String label;
+ final int? count; // null = every option checked (the default): no badge.
+ final bool open;
+ final VoidCallback onTap;
+
+ const _FilterPill({
+ required this.label,
+ required this.count,
+ required this.open,
+ required this.onTap,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ final active = open || count != null;
+ final fg = active ? BrandColors.onPrimary : BrandColors.ink;
+ return Tappable(
+ behavior: HitTestBehavior.opaque,
+ onTap: onTap,
+ child: Container(
+ padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 12),
+ decoration: BoxDecoration(
+ color: active ? BrandColors.inverseSurface : BrandColors.card,
+ borderRadius: BorderRadius.circular(100),
+ border: Border.all(color: active ? BrandColors.inverseSurface : BrandColors.borderStrong),
+ ),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(label, style: TextStyle(fontSize: 12.5, color: fg)),
+ if (count != null) ...[
+ const SizedBox(width: 7),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 2.5),
+ decoration: BoxDecoration(
+ color: BrandColors.onPrimary.withValues(alpha: 0.22),
+ borderRadius: BorderRadius.circular(20),
+ ),
+ child: Text(
+ '$count',
+ style: TextStyle(
+ fontFamily: 'Ubuntu Mono',
+ fontSize: 10,
+ fontWeight: FontWeight.w700,
+ color: fg,
+ ),
+ ),
+ ),
+ ],
+ const SizedBox(width: 7),
+ Icon(
+ open ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
+ size: 15,
+ color: active ? fg : BrandColors.inkMuted,
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+/// The inline multi-select dropdown for one filter: a card of checkbox rows
+/// (icon, name, count) with a Reset / Done footer.
+class _FilterPanel extends StatelessWidget {
+ final String header;
+ final List<_Option> options;
+ final bool Function(String value) isSelected;
+ final double gutter;
+ final ValueChanged<String> onToggle;
+ final VoidCallback onReset;
+ final VoidCallback onDone;
+
+ const _FilterPanel({
+ required this.header,
+ required this.options,
+ required this.isSelected,
+ required this.gutter,
+ required this.onToggle,
+ required this.onReset,
+ required this.onDone,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: EdgeInsets.fromLTRB(gutter, 0, gutter, 12),
+ child: Container(
+ clipBehavior: Clip.antiAlias,
+ decoration: _panelDecoration,
+ foregroundDecoration: _panelBorder,
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Padding(
+ padding: const EdgeInsets.fromLTRB(16, 14, 16, 4),
+ child: SectionHeader(label: header, padding: EdgeInsets.zero),
+ ),
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 16),
+ child: Column(
+ children: [
+ for (var i = 0; i < options.length; i++)
+ _row(options[i], last: i == options.length - 1),
+ ],
+ ),
+ ),
+ _PanelFooter(onReset: onReset, onDone: onDone),
+ ],
+ ),
+ ),
+ );
+ }
+
+ Widget _row(_Option opt, {required bool last}) {
+ final selected = isSelected(opt.value);
+ return Tappable(
+ behavior: HitTestBehavior.opaque,
+ onTap: () => onToggle(opt.value),
+ child: Container(
+ decoration: last
+ ? null
+ : BoxDecoration(
+ border: Border(bottom: BorderSide(color: BrandColors.surfaceTinted)),
+ ),
+ padding: const EdgeInsets.symmetric(vertical: 10),
+ child: Row(
+ children: [
+ _Check(selected: selected),
+ const SizedBox(width: 12),
+ opt.icon,
+ const SizedBox(width: 12),
+ Expanded(
+ child: Text(
+ opt.label,
+ style: TextStyle(
+ fontSize: 14,
+ color: selected ? BrandColors.ink : BrandColors.inkMuted,
+ ),
+ ),
+ ),
+ Text(
+ '${opt.count}',
+ style: TextStyle(
+ fontFamily: 'Ubuntu Mono',
+ fontSize: 12,
+ color: BrandColors.inkMuted,
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+/// The 20×20 rounded checkbox: a filled tick when on.
+class _Check extends StatelessWidget {
+ final bool selected;
+ const _Check({required this.selected});
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ width: 20,
+ height: 20,
+ alignment: Alignment.center,
+ decoration: BoxDecoration(
+ color: selected ? BrandColors.primaryDeep : null,
+ borderRadius: BorderRadius.circular(6),
+ border: selected ? null : Border.all(color: BrandColors.inputBorder, width: 1.5),
+ ),
+ child: selected ? const Icon(Icons.check, size: 13, color: BrandColors.onPrimary) : null,
+ );
+ }
+}
### lib/screens/lws_keys.dart
@@ -5,10 +5,14 @@ import 'package:skylight_wallet/util/secure_clipboard.dart';
import 'package:skylight_wallet/util/secure_screen.dart';
import 'package:skylight_wallet/wallet_core_glue.dart';
import 'package:skylight_wallet/widgets/ui/ui.dart';
+import 'package:wallet_fhse/security_keys_ui.dart' show passAppLock;
-/// Desktop: LWS keys as a centered modal (opened from Settings); mobile keeps
-/// the full-screen route.
-Future<void> showLwsKeysSheet(BuildContext context) {
+/// Desktop: LWS keys as a centered modal (opened from Settings), once App Lock
+/// passes ([passAppLock]): a sheet is not a route, so the `/lws_keys`
+/// AppLockGate does not cover it. Mobile keeps that route.
+Future<void> showLwsKeysSheet(BuildContext context) async {
+ final reason = AppLocalizations.of(context)!.settingsAppLockUnlockReason;
+ if (!await passAppLock(context, reason: reason) || !context.mounted) return;
return showBrandSheet<void>(
context: context,
isScrollControlled: true,
### lib/screens/receive.dart
@@ -107,20 +107,23 @@ class _ReceiveScreenState extends State<ReceiveScreen> {
// they can name different subaddresses.
final sub = isDemoMode ? null : wallet.unusedSubaddress;
final subSupported = wallet.serverSupportsSubaddresses;
- final canToggle = subSupported == true && !isDemoMode;
+ // The toggle needs a subaddress to toggle to. Until there is one (the
+ // server has not answered yet, or cannot be reached at all) the primary
+ // address is shown: every server scans it. Waiting for the subaddress
+ // instead spun forever with no connection.
+ final canToggle = subSupported == true && sub != null;
String? address;
- if (subSupported == false || isDemoMode) {
+ if (canToggle && _showSubaddress) {
+ address = sub.address;
+ } else if (primaryAddress.isNotEmpty) {
address = primaryAddress;
}
- if (subSupported == true) {
- address = _showSubaddress ? sub?.address : primaryAddress;
- }
- final ready = (subSupported != null || isDemoMode) && address != null;
- final warning = _warning(i18n, wallet, subSupported);
+ final ready = address != null;
+ final warning = _warning(i18n, wallet, isDemoMode, subSupported, sub);
final qrHeading = canToggle && _showSubaddress
- ? (sub != null ? '${i18n.receiveSubaddressTab} #${sub.index}' : i18n.receiveSubaddressTab)
+ ? '${i18n.receiveSubaddressTab} #${sub.index}'
: i18n.receiveAddressHeading('Monero');
if (isDesktop) {
@@ -173,12 +176,18 @@ class _ReceiveScreenState extends State<ReceiveScreen> {
);
}
- String? _warning(AppLocalizations i18n, AppWallet wallet, bool? subSupported) {
+ String? _warning(
+ AppLocalizations i18n,
+ AppWallet wallet,
+ bool isDemoMode,
+ bool? subSupported,
+ ({int index, String address})? sub,
+ ) {
+ if (isDemoMode) return null;
if (subSupported == false) return i18n.receiveServerNoSubaddressesWarn;
- if (subSupported == true && !_showSubaddress) return i18n.receivePrimaryAddressWarn;
- if (subSupported == true &&
- _showSubaddress &&
- wallet.unusedSubaddressIndexIsSupported == false) {
+ if (sub == null) return i18n.receiveSubaddressUnavailableWarn;
+ if (!_showSubaddress) return i18n.receivePrimaryAddressWarn;
+ if (wallet.unusedSubaddressIndexIsSupported == false) {
return i18n.receiveMaxSubaddressesReachedWarn;
}
return null;
### lib/screens/restore_wallet.dart
@@ -18,6 +18,7 @@ import 'package:skylight_wallet/util/secure_screen.dart';
import 'package:skylight_wallet/wallet_core_glue.dart';
import 'package:skylight_wallet/widgets/ui/ui.dart';
import 'package:wallet_domain/wallet_domain.dart' show SeedSource, parseRestoreQr;
+import 'package:wallet_backup_platform/backup_ui.dart' show scheduleImportWalletData;
class RestoreWalletScreen extends StatefulWidget {
const RestoreWalletScreen({super.key});
@@ -125,16 +126,18 @@ class _RestoreWalletScreenState extends State<RestoreWalletScreen> with SecureSc
}
final restoreHeight = _restoreHeight;
- // A desktop OS adds a password step; mobile has no password screen (the
- // device app lock guards it), so it restores the wallet directly. That
- // includes the iOS build on a Mac, in the desktop layout.
- if (isDesktopOS) {
+ // Linux and Windows add a password step; elsewhere there is no password
+ // screen (the device's App Lock guards a generated one), so it restores the
+ // wallet directly. That includes macOS and the iOS build on a Mac, in the
+ // desktop layout.
+ if (typesWalletPassword) {
Navigator.pushNamed(
context,
'/create_wallet_password',
arguments: CreateWalletPasswordArgs(
commit: (ctx) async {
await restoreWallet(ctx, mnemonic: mnemonic, restoreHeight: restoreHeight);
+ if (ctx.mounted) scheduleImportWalletData(ctx);
return restoreHeight;
},
),
@@ -168,6 +171,8 @@ class _RestoreWalletScreenState extends State<RestoreWalletScreen> with SecureSc
}
if (!mounted) return;
setState(() => _committing = false);
+ // Asks whether to import wallet data (payment details, address book).
+ scheduleImportWalletData(context);
Provider.of<FiatRateModel>(context, listen: false).startService();
if (appWalletOf(context).isNodeMode) {
Navigator.pushNamedAndRemoveUntil(context, '/wallet_home', (route) => false);
### lib/screens/secret_keys.dart
@@ -5,10 +5,14 @@ import 'package:skylight_wallet/util/secure_clipboard.dart';
import 'package:skylight_wallet/util/secure_screen.dart';
import 'package:skylight_wallet/wallet_core_glue.dart';
import 'package:skylight_wallet/widgets/ui/ui.dart';
+import 'package:wallet_fhse/security_keys_ui.dart' show passAppLock;
-/// Desktop: secret keys as a centered modal (opened from Settings); mobile keeps
-/// the full-screen route.
-Future<void> showSecretKeysSheet(BuildContext context) {
+/// Desktop: secret keys as a centered modal (opened from Settings), once App
+/// Lock passes ([passAppLock]): a sheet is not a route, so the `/secret_keys`
+/// AppLockGate does not cover it. Mobile keeps that route.
+Future<void> showSecretKeysSheet(BuildContext context) async {
+ final reason = AppLocalizations.of(context)!.revealSeedAuthReason;
+ if (!await passAppLock(context, reason: reason) || !context.mounted) return;
return showBrandSheet<void>(
context: context,
isScrollControlled: true,
### lib/screens/send.dart
@@ -10,7 +10,8 @@ import 'package:wallet_domain/wallet_domain.dart'
decimalToBaseUnits,
parsePaymentUri,
BroadcastFailure,
- BroadcastOutcome;
+ BroadcastOutcome,
+ OpenAliasMode;
import 'package:wallet_infra/wallet_infra.dart' show RequestNotSentException;
import 'package:wallet_infra/wallet_infra.dart' show StoreReview;
@@ -37,7 +38,11 @@ class SendScreenArgs {
/// so Send opens showing the contact card rather than a bare address.
final Contact? contact;
- SendScreenArgs({required this.destinationAddress, this.amount, this.contact});
+ /// The desktop back link's label: where Back returns to. Null: the wallet
+ /// home ("Wallet"), where Send opens from unless the caller says otherwise.
+ final String? backLabel;
+
+ SendScreenArgs({required this.destinationAddress, this.amount, this.contact, this.backLabel});
}
class SendScreen extends StatefulWidget {
@@ -77,6 +82,7 @@ class _SendScreenState extends State<SendScreen> {
late final AmountEntryController _amount;
bool _isSweepAll = false;
Contact? _selectedContact;
+ String? _backLabel;
List<int?>? _fees; // estimated fee (piconero) per priority; null = estimate failed
int _selectedPriority = 1; // 0=Low, 1=Normal, 2=High
int _feeCalculationCounter = 0; // Track the latest fee calculation request
@@ -87,6 +93,9 @@ class _SendScreenState extends State<SendScreen> {
bool _formValid = false; // gates the send button
int _openAliasResolving = 0; // >0 while OpenAlias resolution is in flight
+ // The user turned OpenAlias lookups off (Settings), so say that rather than
+ // "invalid".
+ bool _openAliasOff = false;
bool _didInit = false; // one-time setup guard for didChangeDependencies
// Caches the last OpenAlias resolution + dedupes concurrent lookups so
@@ -135,7 +144,12 @@ class _SendScreenState extends State<SendScreen> {
final amount = args.amount;
if (amount != null && amount.isNotEmpty) _amount.setCoinText(amount);
// Same field the in-send picker sets, so the contact card renders here too.
- _selectedContact = args.contact;
+ // Set after the text, so the listener cannot check it: check it here.
+ final contact = args.contact;
+ _selectedContact = contact != null && contact.ownsAddress('XMR', args.destinationAddress)
+ ? contact
+ : null;
+ _backLabel = args.backLabel;
}
}
@@ -254,6 +268,8 @@ class _SendScreenState extends State<SendScreen> {
/// in-flight lookup of the same domain so amount changes / revalidations
/// don't re-hit the (slow, over-Tor) resolver. Drives `_openAliasResolving`.
Future<ResolvedOpenAlias?> _resolveDomain(String domain) async {
+ _openAliasOff = await OpenAliasMode.load() == OpenAliasMode.disabled;
+ if (_openAliasOff || !mounted) return null;
if (domain == _resolveCacheInput) return _resolveCacheOutput;
if (_resolveInFlight != null && domain == _resolveInFlightInput) {
return _resolveInFlight!;
@@ -274,7 +290,7 @@ class _SendScreenState extends State<SendScreen> {
// Someone may have resolved this exact alias while we were settling.
if (domain == _resolveCacheInput) return _resolveCacheOutput;
if (_resolveInFlight != null && domain == _resolveInFlightInput) {
- return _resolveInFlight!;
+ return await _resolveInFlight!;
}
// Only a real lookup is published as in-flight, so joining one always
@@ -317,7 +333,9 @@ class _SendScreenState extends State<SendScreen> {
if (resolved == null) {
if (setErrors) {
setState(() {
- _destinationAddressError = i18n.sendOpenAliasResolveError;
+ _destinationAddressError = _openAliasOff
+ ? i18n.sendOpenAliasDisabledError
+ : i18n.sendOpenAliasResolveError;
});
}
return false;
@@ -440,6 +458,8 @@ class _SendScreenState extends State<SendScreen> {
}
final destinationAddressUnresolved = _destinationAddressController.text;
+ // Read with the text: the form can change while the tx is being built.
+ final contact = _selectedContact;
String destinationAddress = '';
String? destinationOpenAlias;
String? destinationOpenAliasName;
@@ -453,7 +473,9 @@ class _SendScreenState extends State<SendScreen> {
if (resolved == null) {
setState(() {
_isLoading = false;
- _destinationAddressError = i18n.sendOpenAliasResolveError;
+ _destinationAddressError = _openAliasOff
+ ? i18n.sendOpenAliasDisabledError
+ : i18n.sendOpenAliasResolveError;
});
return;
}
@@ -485,6 +507,9 @@ class _SendScreenState extends State<SendScreen> {
destinationAddress: destinationAddress,
destinationOpenAlias: destinationOpenAlias,
destinationOpenAliasName: destinationOpenAliasName,
+ // The sheet shows the name only if the tx pays this address.
+ contactName: contact?.name,
+ contactAddress: contact?.addressFor('XMR'),
);
}
} catch (error) {
@@ -523,6 +548,8 @@ class _SendScreenState extends State<SendScreen> {
required String destinationAddress,
String? destinationOpenAlias,
String? destinationOpenAliasName,
+ String? contactName,
+ String? contactAddress,
}) async {
final i18n = AppLocalizations.of(context)!;
final quote = Provider.of<FiatRateModel>(context, listen: false).quoteFor('XMR');
@@ -556,7 +583,8 @@ class _SendScreenState extends State<SendScreen> {
address: destinationAddress,
openAlias: destinationOpenAlias,
openAliasName: destinationOpenAliasName,
- contactName: _selectedContact?.name,
+ contactName: contactName,
+ contactAddress: contactAddress,
showHighFeeWarning: showHighFeeWarning,
highFeeWarning: showHighFeeWarning ? i18n.confirmSendHighFeeWarning(_highFeeToken) : null,
highFeeToken: _highFeeToken,
@@ -704,6 +732,14 @@ class _SendScreenState extends State<SendScreen> {
}
Future<void> _onAddressChanged() async {
+ // Anything but the contact's own address in the field (Paste on desktop,
+ // where the pill stays beside the contact card) ends the contact: the card
+ // turns back into the address field, and no name reaches the confirm sheet.
+ final contact = _selectedContact;
+ if (contact != null && !contact.ownsAddress('XMR', _destinationAddressController.text)) {
+ setState(() => _selectedContact = null);
+ }
+
// Setting text also clears a stale inline error so a corrected address
// doesn't keep showing the old warning.
if (_destinationAddressError.isNotEmpty) {
@@ -809,7 +845,10 @@ class _SendScreenState extends State<SendScreen> {
return ListView(
padding: const EdgeInsets.fromLTRB(44, 30, 44, 36),
children: [
- DesktopBackLink(label: i18n.navigationBarWallet, onTap: () => Navigator.pop(context)),
+ DesktopBackLink(
+ label: _backLabel ?? i18n.navigationBarWallet,
+ onTap: () => Navigator.pop(context),
+ ),
const SizedBox(height: 16),
Text(i18n.sendTitle, style: desktopTitleStyle),
const SizedBox(height: 24),
### lib/screens/settings.dart
@@ -6,25 +6,30 @@ import 'package:provider/provider.dart';
import 'package:skylight_wallet/l10n/app_localizations.dart';
import 'package:skylight_wallet/models/app_wallet.dart';
+import 'package:skylight_wallet/models/contact_model.dart';
import 'package:skylight_wallet/models/fiat_rate_model.dart';
import 'package:skylight_wallet/widgets/connection_settings_form.dart';
-import 'package:skylight_wallet/widgets/fiat_api_settings_form.dart';
-import 'package:skylight_wallet/widgets/tor_settings_form.dart';
import 'package:skylight_wallet/models/language_model.dart';
import 'package:skylight_wallet/models/theme_model.dart';
import 'package:skylight_wallet/screens/lws_keys.dart';
import 'package:skylight_wallet/screens/secret_keys.dart';
import 'package:skylight_wallet/util/logging.dart';
import 'package:skylight_wallet/util/platform.dart';
import 'package:skylight_wallet/wallet_core_glue.dart';
-import 'package:skylight_wallet/periodic_tasks.dart';
+import 'package:wallet_backup_platform/backup_ui.dart' show BackupLocalizations;
+import 'package:wallet_fhse/security_keys_ui.dart'
+ show AppLockTile, DesktopAutoLockTile, FhseLocalizations, SecurityKeysState, securityKeysState;
+import 'package:wallet_domain/wallet_domain.dart' show OpenAliasMode;
+import 'package:wallet_fhse/wallet_fhse.dart' show SecurityKeyService;
+import 'package:wallet_infra/wallet_infra.dart' show SyncFrequency, loadSyncFrequency;
import 'package:skylight_wallet/services/notifications_service.dart';
import 'package:skylight_wallet/services/shared_preferences_service.dart';
import 'package:skylight_wallet/services/tor_settings_service.dart';
import 'package:skylight_wallet/widgets/language_sheet.dart';
+import 'package:skylight_wallet/widgets/privacy_settings_sheets.dart';
+import 'package:skylight_wallet/widgets/sync_frequency_sheet.dart';
import 'package:skylight_wallet/widgets/ui/ui.dart';
import 'package:skylight_wallet/widgets/wallet_navigation_bar.dart';
-import 'package:wallet_infra/wallet_infra.dart' show BiometricAuth, BiometricAuthResult;
/// Desktop: settings as a wide centered modal (opened from the sidebar); mobile
/// keeps the full-screen tab.
@@ -52,9 +57,11 @@ class SettingsScreen extends StatefulWidget {
class _SettingsScreenState extends State<SettingsScreen> {
var _newTxNotificationsEnabled = false;
- var _appLockEnabled = false;
- var _verboseLoggingEnabled = false;
+ var _syncFrequency = SyncFrequency.periodic;
+ var _loggingEnabled = false;
+ SecurityKeysState? _securityKeys;
FiatApiMode _fiatMode = FiatApiMode.torOnly;
+ OpenAliasMode _openAliasMode = OpenAliasMode.torOnly;
// Toggles animate only after the stored values have loaded, so they don't
// slide from off→on when the screen first appears.
var _animateToggles = false;
@@ -82,28 +89,30 @@ class _SettingsScreenState extends State<SettingsScreen> {
await SharedPreferencesService.get<bool>(SharedPreferencesKeys.notificationsEnabled) ??
false;
- final appLockEnabled =
- await SharedPreferencesService.get<bool>(SharedPreferencesKeys.appLockEnabled) ?? false;
-
- final verboseLoggingEnabled =
- await SharedPreferencesService.get<bool>(SharedPreferencesKeys.verboseLoggingEnabled) ??
- false;
+ final loggingEnabled =
+ await SharedPreferencesService.get<bool>(SharedPreferencesKeys.loggingEnabled) ?? false;
final fiatMode = await FiatRateModel.loadFiatApiMode();
+ final openAliasMode = await OpenAliasMode.load();
+ final syncFrequency = await loadSyncFrequency();
+ await _loadSecurityKeys();
if (!mounted) return;
setState(() {
_newTxNotificationsEnabled = newTxNotificationsEnabled;
- _appLockEnabled = appLockEnabled;
- _verboseLoggingEnabled = verboseLoggingEnabled;
+ _loggingEnabled = loggingEnabled;
_fiatMode = fiatMode;
+ _openAliasMode = openAliasMode;
+ _syncFrequency = syncFrequency;
});
// Enable animation a frame after the loaded values are painted.
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted) setState(() => _animateToggles = true);
});
}
+ /// Only whether a background run that finds a payment says so. Whether runs
+ /// happen at all is Sync Frequency's.
void _setTxNotificationsEnabled(bool value) async {
final wallet = appWalletOf(context);
@@ -119,42 +128,45 @@ class _SettingsScreenState extends State<SettingsScreen> {
// everything already received.
await wallet.markExistingTxsAsNotified();
await SharedPreferencesService.set<bool>(SharedPreferencesKeys.notificationsEnabled, true);
- await applyBackgroundTaskRegistration();
}
} else {
await SharedPreferencesService.set<bool>(SharedPreferencesKeys.notificationsEnabled, false);
- await applyBackgroundTaskRegistration();
}
}
- void _setAppLockEnabled(bool value) async {
- final i18n = AppLocalizations.of(context)!;
+ void _showSyncFrequency() async {
+ final frequency = await showSyncFrequencySettings(context);
+ if (frequency != null && mounted) setState(() => _syncFrequency = frequency);
+ }
- if (value) {
- final result = await BiometricAuth.authenticate(reason: i18n.settingsAppLockUnlockReason);
- // Enabling app-lock is an explicit opt-in, so decline and error both report.
- if (result != BiometricAuthResult.authenticated) {
- if (mounted) {
- showBrandToast(context, i18n.settingsAppLockUnableToAuthError);
- }
- return;
- }
+ Future<void> _loadSecurityKeys() async {
+ if (!SecurityKeyService.isSupportedPlatform) return;
+ try {
+ final state = await securityKeysState();
+ if (mounted) setState(() => _securityKeys = state);
+ } catch (_) {
+ // Advanced Security says what went wrong; the rest of Settings loads.
}
+ }
- if (!mounted) return;
- setState(() {
- _appLockEnabled = value;
- });
+ Future<void> _openAdvancedSecurity() async {
+ await Navigator.pushNamed(context, '/advanced_security');
+ await _loadSecurityKeys();
+ }
- await SharedPreferencesService.set<bool>(SharedPreferencesKeys.appLockEnabled, value);
+ String _securityKeysValue(FhseLocalizations i18n) {
+ final state = _securityKeys;
+ if (state == null || !state.engaged) return i18n.advancedSecurityOff;
+ if (state.unreadable) return i18n.advancedSecurityNeedsAttention;
+ return i18n.advancedSecurityKeyCount(state.keys.length);
}
- void _setVerboseLoggingEnabled(bool value) async {
+ void _setLoggingEnabled(bool value) async {
setState(() {
- _verboseLoggingEnabled = value;
+ _loggingEnabled = value;
});
- await SharedPreferencesService.set<bool>(SharedPreferencesKeys.verboseLoggingEnabled, value);
+ await SharedPreferencesService.set<bool>(SharedPreferencesKeys.loggingEnabled, value);
}
void _exportLogs() async {
@@ -205,6 +217,30 @@ class _SettingsScreenState extends State<SettingsScreen> {
);
}
+ void _showDeleteAddressBookDialog() {
+ final i18n = AppLocalizations.of(context)!;
+ showConfirmSheet(
+ context: context,
+ icon: Icons.delete_outline,
+ iconBg: BrandColors.errorBg,
+ iconColor: BrandColors.error,
+ title: i18n.settingsDeleteAddressBookButton,
+ body: i18n.settingsDeleteAddressBookDialogText,
+ confirmLabel: i18n.settingsDeleteAddressBookDialogDeleteButton,
+ cancelLabel: i18n.cancel,
+ onConfirm: _deleteAddressBook,
+ );
+ }
+
+ // Only the address book: deleting the wallet keeps it, and this keeps the
+ // wallet. A backup syncing to iCloud, Android backup or a sync folder records
+ // the deletions.
+ Future<void> _deleteAddressBook() async {
+ final i18n = AppLocalizations.of(context)!;
+ await Provider.of<ContactModel>(context, listen: false).deleteAll();
+ if (mounted) showBrandToast(context, i18n.settingsAddressBookDeleted);
+ }
+
Future<void> _showViewLwsKeysDialog() async {
final i18n = AppLocalizations.of(context)!;
final ok = await showConfirmSheet(
@@ -226,14 +262,11 @@ class _SettingsScreenState extends State<SettingsScreen> {
}
}
- /// Gate the seed behind a device auth even though the app is already
- /// unlocked. Reaching this screen hands over the seed and secret spend key,
- /// which is total, irreversible control of the funds; the warning sheet alone
- /// stops nobody holding the phone.
- ///
- /// Only when app lock is on, though -- turning it off is the user saying this
- /// app does not ask the device who is holding the phone, and a prompt that
- /// appears anyway reads as the setting being ignored.
+ /// The recovery phrase and secret spend key are total, irreversible control of
+ /// the funds, so the warning alone is not enough: the screen (or desktop
+ /// sheet) needs a passing App Lock, asked again even though the app is
+ /// already unlocked (`/secret_keys` is an AppLockGate route;
+ /// [showSecretKeysSheet] asks itself).
Future<void> _showViewSecretKeysDialog() async {
final i18n = AppLocalizations.of(context)!;
@@ -262,97 +295,14 @@ class _SettingsScreenState extends State<SettingsScreen> {
}
}
- double _sheetMaxHeight(BuildContext sheetContext) {
- final media = MediaQuery.of(sheetContext);
- return (media.size.height - media.viewInsets.bottom) * 0.86;
- }
-
- /// Settings popup chrome, matching Spice's sheets: a handle, an icon + title
- /// header, then the form scrolling below (the form carries its own save
- /// button and pops on success).
- Future<void> _showSettingsSheet({
- required IconData icon,
- required String title,
- required Widget form,
- }) {
- return showBrandSheet<void>(
- context: context,
- isScrollControlled: true,
- builder: (sheetContext) {
- // Desktop modal: the card owns the edge padding and drops the drag handle.
- final hpad = isDesktopModal ? 0.0 : 22.0;
- return SafeArea(
- top: false,
- child: ConstrainedBox(
- constraints: BoxConstraints(maxHeight: _sheetMaxHeight(sheetContext)),
- child: Padding(
- padding: EdgeInsets.only(top: isDesktopModal ? 0 : 10),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- const SheetHandle(),
- Padding(
- padding: EdgeInsets.fromLTRB(hpad, 0, hpad, 16),
- child: Row(
- children: [
- SheetIcon(
- icon: icon,
- bg: BrandColors.surfaceTinted,
- color: BrandColors.primaryDeep,
- ),
- const SizedBox(width: 11),
- Expanded(child: Text(title, style: BrandText.sheetTitle)),
- ],
- ),
- ),
- Flexible(
- child: SingleChildScrollView(
- padding: EdgeInsets.fromLTRB(hpad, 0, hpad, isDesktopModal ? 0 : 16),
- child: form,
- ),
- ),
- ],
- ),
- ),
- ),
- );
- },
- );
- }
-
- void _showTorSettings() async {
- final i18n = AppLocalizations.of(context)!;
-
- void onSaved() {
- appWalletOf(context).load();
- Provider.of<FiatRateModel>(context, listen: false).startService();
- Navigator.pop(context);
- }
-
- await _showSettingsSheet(
- icon: Icons.public,
- title: i18n.torSettingsTitle,
- form: TorSettingsForm(saveButtonLabel: i18n.torSettingsSaveButton, onSaved: onSaved),
- );
+ Future<void> _showTorSettings() async {
+ await showTorSettingsSheet(context);
// Disabling Tor can auto-disable a Tor-only fiat mode, so refresh both rows.
if (mounted) await _refreshFiatMode();
}
- void _showFiatApiSettings() async {
- final i18n = AppLocalizations.of(context)!;
-
- await _showSettingsSheet(
- icon: Icons.attach_money,
- title: i18n.settingsFiatApiSettingsLabel,
- form: FiatApiSettingsForm(
- saveButtonLabel: i18n.torSettingsSaveButton,
- onSaved: () async {
- await Provider.of<FiatRateModel>(context, listen: false).startService();
- if (mounted) Navigator.pop(context);
- },
- ),
- );
+ Future<void> _showFiatApiSettings() async {
+ await showFiatApiSettingsSheet(context);
if (mounted) await _refreshFiatMode();
}
@@ -366,7 +316,8 @@ class _SettingsScreenState extends State<SettingsScreen> {
Navigator.pop(context);
}
- await _showSettingsSheet(
+ await showSettingsFormSheet(
+ context,
icon: Icons.dns,
title: i18n.settingsConnectionSettingsLabel,
form: ConnectionSettingsForm(
@@ -380,6 +331,20 @@ class _SettingsScreenState extends State<SettingsScreen> {
if (mounted) setState(() {});
}
+ Future<void> _showOpenAliasSettings() async {
+ final changed = await showOpenAliasSheet(context);
+ if (changed == true) {
+ final mode = await OpenAliasMode.load();
+ if (mounted) setState(() => _openAliasMode = mode);
+ }
+ }
+
+ String _openAliasModeLabel(AppLocalizations i18n) => switch (_openAliasMode) {
+ OpenAliasMode.torOnly => i18n.fiatApiSettingsModeTorOnly,
+ OpenAliasMode.clearnet => i18n.fiatApiSettingsModeClearnet,
+ OpenAliasMode.disabled => i18n.fiatApiSettingsModeDisabled,
+ };
+
Future<void> _refreshFiatMode() async {
final mode = await FiatRateModel.loadFiatApiMode();
if (mounted) setState(() => _fiatMode = mode);
@@ -477,10 +442,10 @@ class _SettingsScreenState extends State<SettingsScreen> {
final i18n = AppLocalizations.of(context)!;
final language = context.watch<LanguageModel>();
final theme = context.watch<ThemeModel>();
- final isMobile = Platform.isAndroid || Platform.isIOS;
final wallet = appWalletOf(context, listen: true);
final fiatRate = context.watch<FiatRateModel>();
- final showNotifyToggle = Platform.isAndroid || (Platform.isIOS && !wallet.isNodeMode);
+ // Sync Frequency and the notifications it feeds: phones only.
+ final showNotifyToggle = Platform.isAndroid || Platform.isIOS;
final connectionSubtitle = _connectionSubtitle(wallet, i18n);
final fiatSubtitle = _fiatMode == FiatApiMode.disabled
? _fiatModeLabel(i18n)
@@ -500,65 +465,95 @@ class _SettingsScreenState extends State<SettingsScreen> {
value: languageNames[language.language]?.$1 ?? language.language.toUpperCase(),
onTap: () => showLanguageSheet(context),
),
- if (isMobile)
- SettingsToggleTile(
- title: i18n.settingsAppLockLabel,
- value: _appLockEnabled,
- onChanged: _setAppLockEnabled,
- animate: _animateToggles,
- ),
SettingsLinkTile(
title: i18n.settingsConnectionSettingsLabel,
subtitle: connectionSubtitle,
linkLabel: i18n.settingsLwsViewKeysButton,
onTap: _showConnectionSettings,
),
+ SettingsLinkTile(
+ title: i18n.settingsFiatApiSettingsLabel,
+ subtitle: fiatSubtitle,
+ linkLabel: i18n.settingsLwsViewKeysButton,
+ onTap: _showFiatApiSettings,
+ ),
+ ],
+ ),
+ SettingsGroup(
+ label: i18n.settingsSectionSecurityPrivacy,
+ tiles: [
+ // Always on: how long the app may be away before it asks again.
+ const AppLockTile(),
+ if (isDesktopOS) const DesktopAutoLockTile(),
+ if (SecurityKeyService.isSupportedPlatform)
+ SettingsNavTile(
+ title: FhseLocalizations.of(context).advancedSecurityLabel,
+ value: _securityKeysValue(FhseLocalizations.of(context)),
+ onTap: _openAdvancedSecurity,
+ ),
SettingsLinkTile(
title: i18n.settingsTorSettingsLabel,
subtitle: _torModeLabel(i18n),
linkLabel: i18n.settingsLwsViewKeysButton,
onTap: _showTorSettings,
),
SettingsLinkTile(
- title: i18n.settingsFiatApiSettingsLabel,
- subtitle: fiatSubtitle,
+ title: i18n.settingsOpenAliasSettingsLabel,
+ subtitle: _openAliasModeLabel(i18n),
linkLabel: i18n.settingsLwsViewKeysButton,
- onTap: _showFiatApiSettings,
+ onTap: _showOpenAliasSettings,
),
],
),
SettingsGroup(
- label: i18n.settingsSectionBehaviour,
+ label: i18n.settingsSectionData,
tiles: [
- if (showNotifyToggle)
- SettingsToggleTile(
- title: i18n.settingsNotifyNewTxsLabel,
- description: Platform.isIOS
- ? i18n.settingsNotifyNewTxsDescriptionIos
- : i18n.settingsNotifyNewTxsDescription,
- value: _newTxNotificationsEnabled,
- onChanged: _setTxNotificationsEnabled,
- animate: _animateToggles,
- ),
+ SettingsNavTile(
+ title: BackupLocalizations.of(context).backupTitle,
+ onTap: () => Navigator.pushNamed(context, '/metadata_backup'),
+ ),
SettingsToggleTile(
- title: i18n.settingsVerboseLoggingLabel,
+ title: i18n.settingsLoggingLabel,
description: Platform.isIOS
- ? i18n.settingsVerboseLoggingDescriptionIos
- : i18n.settingsVerboseLoggingDescription,
- value: _verboseLoggingEnabled,
- onChanged: _setVerboseLoggingEnabled,
+ ? i18n.settingsLoggingDescriptionIos
+ : i18n.settingsLoggingDescription,
+ value: _loggingEnabled,
+ onChanged: _setLoggingEnabled,
animate: _animateToggles,
),
// Only meaningful with logs to export, so hide it when
- // verbose logging is off rather than disabling it.
- if (Platform.isIOS && _verboseLoggingEnabled)
+ // logging is off rather than disabling it.
+ if (Platform.isIOS && _loggingEnabled)
SettingsLinkTile(
title: i18n.settingsExportLogsLabel,
linkLabel: i18n.settingsExportLogsButton,
onTap: _exportLogs,
),
+ SettingsLinkTile(
+ title: i18n.settingsDeleteAddressBookButton,
+ titleColor: BrandColors.error,
+ onTap: _showDeleteAddressBookDialog,
+ ),
],
),
+ if (showNotifyToggle)
+ SettingsGroup(
+ label: i18n.settingsSectionBehaviour,
+ tiles: [
+ SettingsNavTile(
+ title: i18n.settingsSyncFrequencyLabel,
+ value: syncFrequencyLabels(i18n).nameOf(_syncFrequency),
+ onTap: _showSyncFrequency,
+ ),
+ SettingsToggleTile(
+ title: i18n.settingsNotifyNewTxsLabel,
+ description: i18n.settingsNotifyNewTxsDescription,
+ value: _newTxNotificationsEnabled,
+ onChanged: _setTxNotificationsEnabled,
+ animate: _animateToggles,
+ ),
+ ],
+ ),
SettingsGroup(
label: i18n.settingsSectionWallet,
tiles: [
@@ -590,6 +585,14 @@ class _SettingsScreenState extends State<SettingsScreen> {
title: i18n.welcomePrivacyLink,
onTap: () => Navigator.pushNamed(context, '/privacy_policy', arguments: true),
),
+ SettingsNavTile(
+ title: i18n.settingsLicensesLabel,
+ onTap: () => showLicensePage(
+ context: context,
+ applicationName: 'Skylight Wallet',
+ applicationVersion: _appVersion,
+ ),
+ ),
],
),
];
@@ -611,7 +614,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
return Scaffold(
backgroundColor: BrandColors.paper,
- bottomNavigationBar: const WalletNavigationBar(selectedIndex: 2),
+ bottomNavigationBar: const WalletNavigationBar(selectedIndex: 3),
body: SafeArea(
bottom: false,
child: Center(
### lib/screens/unlock.dart
@@ -5,27 +5,46 @@ import 'package:local_auth/local_auth.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:skylight_wallet/l10n/app_localizations.dart';
-import 'package:skylight_wallet/wallet_core_glue.dart';
+import 'package:skylight_wallet/util/platform.dart' show typesWalletPassword;
import 'package:skylight_wallet/widgets/floating_bob.dart';
import 'package:skylight_wallet/widgets/ui/ui.dart';
-import 'package:wallet_infra/wallet_infra.dart' show BiometricAuth, BiometricAuthResult;
+import 'package:wallet_fhse/security_keys_ui.dart'
+ show
+ AppLockUnlock,
+ FhseLocalizations,
+ showAppLockRecoveryPhrase,
+ unlockAppLockWithDevice,
+ unlockAppLockWithPassword;
class UnlockScreen extends StatefulWidget {
- const UnlockScreen({super.key});
+ const UnlockScreen({super.key, this.onUnlocked, this.onKeyNeeded});
+
+ /// Set when this is App Lock's cover over the screens the user left
+ /// (`AppLockCover`), which has no route to pop: the app hides the cover.
+ final VoidCallback? onUnlocked;
+
+ /// The cover's way on when the wallet closed meanwhile and a security key
+ /// comes next: the app replaces its stack with the key screen.
+ final VoidCallback? onKeyNeeded;
@override
State<UnlockScreen> createState() => _UnlockScreenState();
}
class _UnlockScreenState extends State<UnlockScreen> {
- static bool get _isDesktop => Platform.isLinux || Platform.isWindows || Platform.isMacOS;
+ // The typed password at every launch (Linux, Windows); App Lock's device
+ // prompt elsewhere, macOS included (Touch ID or the Mac's password).
+ static bool get _isDesktop => typesWalletPassword;
final TextEditingController _passwordController = TextEditingController();
bool _obscure = true;
bool _isLoading = false;
String? _error;
String? _biometricLabel; // resolved per device on iOS (Face ID vs Touch ID)
bool _started = false;
+ // The device could not confirm its owner (a lockout, say): the recovery
+ // phrase is offered as the way in instead.
+ bool _offerRecoveryPhrase = false;
String _version = ''; // desktop footer status bar
@override
@@ -58,6 +77,8 @@ class _UnlockScreenState extends State<UnlockScreen> {
final i18n = AppLocalizations.of(context)!;
try {
final types = await LocalAuthentication().getAvailableBiometrics();
+ // A passcode alone keeps the generic "Unlock".
+ if (types.isEmpty) return;
final label = types.contains(BiometricType.face)
? i18n.unlockWithFaceId
: i18n.unlockWithTouchId;
@@ -75,17 +96,14 @@ class _UnlockScreenState extends State<UnlockScreen> {
Future<void> _promptUnlock() async {
final i18n = AppLocalizations.of(context)!;
- final result = await BiometricAuth.authenticate(reason: i18n.unlockReason);
+ final outcome = await unlockAppLockWithDevice(context, reason: i18n.unlockReason);
+ if (mounted) _show(outcome);
+ }
- // Auto-prompted with a password field right there: stay silent on a decline
- // (the user chose to type instead), report only a real error.
- if (result == BiometricAuthResult.authenticated) {
- if (mounted) Navigator.pushReplacementNamed(context, '/wallet_home');
- } else if (result == BiometricAuthResult.error) {
- if (mounted) {
- showBrandToast(context, i18n.unlockUnableToAuthError);
- }
- }
+ /// The device could not confirm its owner: the recovery phrase opens the
+ /// wallet instead (and stands in for a security key, when keys are on).
+ Future<void> _useRecoveryPhrase() async {
+ if (await showAppLockRecoveryPhrase(context) && mounted) _show(AppLockUnlock.unlocked);
}
Future<void> _unlockWithPassword() async {
@@ -98,19 +116,42 @@ class _UnlockScreenState extends State<UnlockScreen> {
_isLoading = true;
_error = null;
});
+ final outcome = await unlockAppLockWithPassword(context, _passwordController.text);
+ if (!mounted) return;
+ _passwordController.clear();
+ setState(() => _isLoading = false);
+ _show(outcome);
+ }
- try {
- await unlockWithPassword(context, _passwordController.text);
- if (mounted) {
- Navigator.pushNamedAndRemoveUntil(context, '/wallet_home', (route) => false);
- }
- } catch (_) {
- if (mounted) {
- setState(() {
- _error = i18n.unlockIncorrectPasswordError;
- _isLoading = false;
- });
- }
+ /// Shows what App Lock's unlock decided (wallet_fhse's [AppLockUnlock]):
+ /// where to go, or what to say.
+ void _show(AppLockUnlock outcome) {
+ final i18n = AppLocalizations.of(context)!;
+ switch (outcome) {
+ case AppLockUnlock.unlocked:
+ // A relock covers the screen the user left, and the app uncovers it.
+ // At a launch or after a full lock this is the base route: home next.
+ final onUnlocked = widget.onUnlocked;
+ if (onUnlocked != null) return onUnlocked();
+ Navigator.of(context).pushNamedAndRemoveUntil('/wallet_home', (route) => false);
+ case AppLockUnlock.needsKey:
+ final onKeyNeeded = widget.onKeyNeeded;
+ if (onKeyNeeded != null) return onKeyNeeded();
+ Navigator.of(context).pushNamedAndRemoveUntil('/security_key_unlock', (route) => false);
+ case AppLockUnlock.declined:
+ // Auto-prompted: stay quiet; the button asks again.
+ break;
+ case AppLockUnlock.failed:
+ if (typesWalletPassword) {
+ setState(() => _error = i18n.unlockUnableToAuthError);
+ return;
+ }
+ setState(() => _offerRecoveryPhrase = true);
+ showBrandToast(context, i18n.unlockUnableToAuthError);
+ case AppLockUnlock.wrongPassword:
+ setState(() => _error = i18n.unlockIncorrectPasswordError);
+ case AppLockUnlock.boundToAnotherPc:
+ setState(() => _error = FhseLocalizations.of(context).unlockBoundToAnotherPc);
}
}
@@ -135,6 +176,10 @@ class _UnlockScreenState extends State<UnlockScreen> {
biometricLabel: _biometricLabel,
onUnlockPassword: _unlockWithPassword,
onUnlockBiometric: _promptUnlock,
+ recoveryLabel: _offerRecoveryPhrase
+ ? FhseLocalizations.of(context).securityKeyUseRecoveryPhrase
+ : null,
+ onUseRecoveryPhrase: _useRecoveryPhrase,
);
}
}
### lib/screens/verify_seed.dart
@@ -0,0 +1,77 @@
+import 'package:flutter/material.dart';
+import 'package:wallet_fhse/security_keys_ui.dart' show lockWalletAction;
+
+import 'package:skylight_wallet/l10n/app_localizations.dart';
+import 'package:skylight_wallet/util/secure_screen.dart';
+import 'package:skylight_wallet/wallet_core_glue.dart';
+import 'package:skylight_wallet/widgets/ui/ui.dart';
+
+/// Desktop: the seed check as a centered modal over the home.
+Future<void> showVerifySeedSheet(BuildContext context) => showBrandSheet<void>(
+ context: context,
+ isScrollControlled: true,
+ builder: (_) => const VerifySeedScreen(embedded: true),
+);
+
+/// The seed check from the home's security checklist: three words of the seed
+/// phrase at random positions, never showing any.
+class VerifySeedScreen extends StatefulWidget {
+ /// Content only, for [showVerifySeedSheet].
+ final bool embedded;
+
+ const VerifySeedScreen({super.key, this.embedded = false});
+
+ @override
+ State<VerifySeedScreen> createState() => _VerifySeedScreenState();
+}
+
+class _VerifySeedScreenState extends State<VerifySeedScreen> with SecureScreenMixin {
+ late final SeedVerifier _verifier;
+
+ // Bound up front: the lock must still run if this page is closed during a
+ // check.
+ late final Future<void> Function() _lock;
+
+ @override
+ void initState() {
+ super.initState();
+ _lock = lockWalletAction(context);
+ final wallet = appWalletOf(context);
+ _verifier = SeedVerifier(
+ loadWords: () async {
+ // The words the user wrote down: the seed as created or restored
+ // (polyseed, BIP39 or 25 words). A wallet from before that was kept
+ // still has its polyseed; its 25 derived words are not asked for,
+ // since a BIP39 restore never showed them to the user.
+ final stored = await wallet.readStoredSeed();
+ var phrase = stored?.mnemonic ?? '';
+ if (phrase.isEmpty) phrase = await wallet.readPolyseed();
+ final words = phrase.trim().split(RegExp(r'\s+'));
+ return words.length > 1 ? words : null;
+ },
+ );
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final i18n = AppLocalizations.of(context)!;
+ return SeedVerifyView(
+ labels: SeedVerifyLabels(
+ title: i18n.verifySeedTitle,
+ subtitle: (p) => i18n.verifySeedSubtitle(p[0], p[1], p[2]),
+ verifyButton: i18n.verifySeedButton,
+ wrongTitle: i18n.verifySeedWrongTitle,
+ wrongBody: i18n.verifySeedWrongBody,
+ tryAgain: i18n.verifySeedTryAgain,
+ unavailable: i18n.verifySeedUnavailable,
+ ),
+ verifier: _verifier,
+ embedded: widget.embedded,
+ onVerified: () {
+ showBrandToast(context, i18n.verifySeedDone);
+ Navigator.pop(context);
+ },
+ onLocked: _lock,
+ );
+ }
+}
### lib/screens/wallet_home.dart
@@ -2,36 +2,27 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
-import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
-import 'package:skeletonizer/skeletonizer.dart';
import 'package:skylight_wallet/l10n/app_localizations.dart';
import 'package:skylight_wallet/models/app_wallet.dart';
import 'package:skylight_wallet/models/fiat_rate_model.dart';
+import 'package:skylight_wallet/periodic_tasks.dart' show applyBackgroundTaskRegistration;
import 'package:skylight_wallet/screens/desktop/home_shell.dart';
import 'package:skylight_wallet/services/tor_service.dart';
import 'package:skylight_wallet/util/platform.dart';
import 'package:skylight_wallet/wallet_core_glue.dart';
+import 'package:skylight_wallet/screens/verify_seed.dart';
+import 'package:skylight_wallet/widgets/home_labels.dart';
+import 'package:skylight_wallet/widgets/privacy_settings_sheets.dart';
import 'package:skylight_wallet/widgets/ui/ui.dart';
import 'package:skylight_wallet/widgets/wallet_navigation_bar.dart';
-import 'package:wallet_domain/wallet_domain.dart' show TxDetails;
+import 'package:wallet_monero/wallet_monero.dart' show LwsPendingApproval;
+import 'package:wallet_backup_platform/wallet_backup_platform.dart' show MetadataBackupSetup;
+import 'package:wallet_domain/wallet_domain.dart' show CryptoWallet, SeedStore;
+import 'package:wallet_fhse/security_keys_ui.dart' show securityKeysOn;
import 'package:wallet_infra/wallet_infra.dart' show StoreReview;
-/// The balance hero's big number style, mirroring Spice's `coin_home.dart`.
-TextStyle get _balanceStyle => TextStyle(
- fontFamily: 'Ubuntu Mono',
- fontSize: 33,
- height: 1,
- fontWeight: FontWeight.w700,
- letterSpacing: -0.66,
- color: BrandColors.ink,
- fontFeatures: const [FontFeature.tabularFigures()],
-);
-
-TextStyle get _balanceSubStyle =>
- TextStyle(fontFamily: 'Ubuntu Mono', fontSize: 13.5, height: 1, color: BrandColors.inkMuted);
-
/// Monero is decimal-12; cap the displayed coin amount for legibility.
String _amountText(double amount) => amount.toStringAsFixed(5);
@@ -43,7 +34,6 @@ enum StatusIconStatus { loading, complete, fail }
typedef _HomeValues = ({
double unlockedBalance,
double? unlockedBalanceFiat,
- double lockedBalance,
StatusIconStatus status,
bool disconnected,
});
@@ -53,7 +43,6 @@ _HomeValues _deriveHome(AppWallet wallet, FiatRateModel fiatRate) {
final unlockedBalanceFiat = fiatRate.rateFor('XMR') is double && wallet.unlockedBalance is double
? wallet.unlockedBalance! * fiatRate.rateFor('XMR')!
: null;
- final lockedBalance = (wallet.totalBalance ?? 0) - (wallet.unlockedBalance ?? 0);
var status = StatusIconStatus.fail;
if (wallet.isFullySynced) {
@@ -69,7 +58,6 @@ _HomeValues _deriveHome(AppWallet wallet, FiatRateModel fiatRate) {
return (
unlockedBalance: unlockedBalance,
unlockedBalanceFiat: unlockedBalanceFiat,
- lockedBalance: lockedBalance,
status: status,
disconnected: wallet.torRequirementBroken || status == StatusIconStatus.fail,
);
@@ -82,12 +70,38 @@ class WalletHomeScreen extends StatefulWidget {
State<WalletHomeScreen> createState() => _WalletHomeScreenState();
}
-class _WalletHomeScreenState extends State<WalletHomeScreen> {
+class _WalletHomeScreenState extends State<WalletHomeScreen> with WidgetsBindingObserver {
+ late final SecurityChecklist _checklist = SecurityChecklist(
+ autoBackupOn: MetadataBackupSetup.automaticBackupOn,
+ securityKeysOn: securityKeysOn,
+ canVerifySeed: _canVerifySeed,
+ );
+ bool? _seedAskable;
+
+ // The seed check asks for the words as kept since the wallet was made, or,
+ // for an older wallet, its polyseed. Worked out once per visit.
+ Future<bool> _canVerifySeed() async {
+ final known = _seedAskable;
+ if (known != null) return known;
+ var askable = await SeedStore.exists();
+ if (!askable && mounted) {
+ askable = (await appWalletOf(context).readPolyseed()).isNotEmpty;
+ }
+ return _seedAskable = askable;
+ }
+
@override
void initState() {
super.initState();
+ WidgetsBinding.instance.addObserver(this);
+ _checklist.addListener(_onChecklistChanged);
+ _checklist.refresh();
WidgetsBinding.instance.addPostFrameCallback((_) {
+ // Here a wallet exists and its connection is applied: the first time
+ // after onboarding, and after every unlock. Updates the tasks in place.
+ unawaited(applyBackgroundTaskRegistration());
+
final Map<String, dynamic>? args =
ModalRoute.of(context)?.settings.arguments as Map<String, dynamic>?;
@@ -101,208 +115,135 @@ class _WalletHomeScreenState extends State<WalletHomeScreen> {
});
}
+ @override
+ void dispose() {
+ WidgetsBinding.instance.removeObserver(this);
+ _checklist.removeListener(_onChecklistChanged);
+ _checklist.dispose();
+ super.dispose();
+ }
+
+ // A setting may have changed in the system settings (iCloud) meanwhile.
+ @override
+ void didChangeAppLifecycleState(AppLifecycleState state) {
+ if (state == AppLifecycleState.resumed) _checklist.refresh();
+ }
+
+ void _onChecklistChanged() {
+ if (mounted) setState(() {});
+ }
+
// Still the screen in front, with the app in the foreground: the review
// dialog must not land on a send or receive the user has already opened.
bool _stillOnHome() =>
mounted &&
(ModalRoute.of(context)?.isCurrent ?? false) &&
WidgetsBinding.instance.lifecycleState == AppLifecycleState.resumed;
- void _showTxDetails(TxDetails txDetails) {
- showTxDetailsDialog(context, txDetails);
- }
-
void _showTxSuccessToast() {
final i18n = AppLocalizations.of(context)!;
showBrandToast(context, i18n.sendTransactionSuccessfullySent);
}
+ Future<void> _openStep(SecurityStep step) => switch (step) {
+ SecurityStep.verifySeed =>
+ isDesktop ? showVerifySeedSheet(context) : Navigator.pushNamed(context, '/verify_seed'),
+ SecurityStep.autoBackup => Navigator.pushNamed(context, '/metadata_backup'),
+ SecurityStep.tor => showTorSettingsSheet(context),
+ SecurityStep.privateLookups => showPrivateLookupSheets(context),
+ SecurityStep.securityKeys => Navigator.pushNamed(context, '/advanced_security'),
+ };
+
@override
Widget build(BuildContext context) {
final i18n = AppLocalizations.of(context)!;
final wallet = appWalletOf(context, listen: true);
final fiatRate = context.watch<FiatRateModel>();
final v = _deriveHome(wallet, fiatRate);
- if (isDesktop) {
- return const DesktopShell(active: DesktopNav.home, child: DesktopHomeView());
- }
+ // The engine wallet, not the app adapter: the shared cards read its
+ // exact history and balances.
+ final cw = xmrWallet(context)!;
+ final coins = <HomeCoin>[(wallet: cw, tokens: const <CryptoWallet>[])];
+ final sections = HomeSections(activity: HomeActivity.shared, labels: homeLabels(i18n));
+ final configured = cw.connectionAddress.isNotEmpty;
+ Widget hero(Widget? footer) => HomeBalanceHero(
+ fiatRate: fiatRate,
+ fiatTotal: v.unlockedBalanceFiat,
+ coinText: '${_amountText(v.unlockedBalance)} XMR',
+ fiatErrorTooltip: i18n.homeFiatApiError,
+ footer: footer,
+ );
+ void receive() => Navigator.pushNamed(context, '/receive');
+ void send() => Navigator.pushNamed(context, '/send');
+ void swap() => showBrandToast(context, i18n.coinHomeSwapComingSoon);
+ final incoming = sections.incoming(coins);
+ final chart = sections.chart(coins);
+ // The server still waiting to approve this wallet, said where it matters.
+ final notice = switch (wallet.lwsPendingApproval) {
+ null => null,
+ LwsPendingApproval.account => WarningCallout(i18n.lwsAwaitingApprovalAccount),
+ LwsPendingApproval.restoreHeight => WarningCallout(i18n.lwsAwaitingApprovalRestoreHeight),
+ };
+ final checklist = securityChecklistCard(
+ checklist: _checklist,
+ labels: securityChecklistLabels(i18n),
+ onStep: _openStep,
+ );
- return Scaffold(
- backgroundColor: BrandColors.paper,
- bottomNavigationBar: WalletNavigationBar(selectedIndex: 0),
- body: SafeArea(
- child: Center(
- child: ConstrainedBox(
- constraints: const BoxConstraints(maxWidth: 520),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: [
- const _Header(),
- Expanded(
- child: CustomScrollView(
- slivers: [
- SliverToBoxAdapter(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- _BalanceHero(
- wallet: wallet,
- unlockedBalance: v.unlockedBalance,
- unlockedBalanceFiat: v.unlockedBalanceFiat,
- lockedBalance: v.lockedBalance,
- fiatRate: fiatRate,
- disconnected: v.disconnected,
- ),
- Padding(
- padding: const EdgeInsets.fromLTRB(16, 0, 16, 22),
- child: _ActionRow(
- onReceive: () => Navigator.pushNamed(context, '/receive'),
- onSend: () => Navigator.pushNamed(context, '/send'),
- ),
- ),
- Padding(
- padding: const EdgeInsets.fromLTRB(20, 0, 20, 10),
- child: SectionHeader(
- label: i18n.coinHomeActivityTitle,
- padding: EdgeInsets.zero,
- ),
- ),
- ],
- ),
- ),
- _ActivitySliver(
- wallet: wallet,
- i18n: i18n,
- fiatRate: fiatRate,
- onTapTx: _showTxDetails,
- ),
- const SliverToBoxAdapter(child: SizedBox(height: 24)),
- ],
- ),
- ),
- ],
- ),
+ if (isDesktop) {
+ return DesktopShell(
+ active: DesktopNav.home,
+ child: DesktopHomeLayout(
+ status: configured
+ ? _SyncStatusPill(status: v.status, blocksRemaining: wallet.syncBlocksRemaining)
+ : null,
+ balance: hero(configured ? ConnectionPills(wallet: cw) : null),
+ actions: DesktopHomeActions(
+ receiveLabel: i18n.homeReceive,
+ sendLabel: i18n.homeSend,
+ swapLabel: i18n.coinHomeSwap,
+ onReceive: receive,
+ onSend: send,
+ onSwap: swap,
),
+ wide: [?notice, ?incoming, chart],
+ side: checklist,
),
- ),
- );
- }
-}
-
-class _Header extends StatelessWidget {
- const _Header();
+ );
+ }
- @override
- Widget build(BuildContext context) {
- return Padding(
- padding: const EdgeInsets.only(left: 20, right: 20, top: 16, bottom: 2),
- child: Row(
- children: [
- ClipRRect(
- borderRadius: BorderRadius.circular(6),
- child: SvgPicture.asset('assets/logo.svg', width: 26, height: 26),
- ),
- const SizedBox(width: 9),
- Text(
- 'Skylight Wallet',
- style: TextStyle(
- fontWeight: FontWeight.w500,
- fontSize: 17,
- height: 1,
- color: BrandColors.ink,
- ),
- ),
- ],
+ return WalletHomeView(
+ header: HomeHeader(
+ logo: ClipRRect(
+ borderRadius: BorderRadius.circular(8),
+ child: SvgPicture.asset('assets/logo.svg', width: 30, height: 30),
+ ),
+ title: 'Skylight Wallet',
),
- );
- }
-}
-
-class _BalanceHero extends StatelessWidget {
- final AppWallet wallet;
- final double unlockedBalance;
- final double? unlockedBalanceFiat;
- final double lockedBalance;
- final FiatRateModel fiatRate;
- final bool disconnected;
-
- const _BalanceHero({
- required this.wallet,
- required this.unlockedBalance,
- required this.unlockedBalanceFiat,
- required this.lockedBalance,
- required this.fiatRate,
- required this.disconnected,
- });
-
- @override
- Widget build(BuildContext context) {
- final i18n = AppLocalizations.of(context)!;
- final showFiat = !fiatRate.isDisabled && unlockedBalanceFiat != null;
- final coinText = '${_amountText(unlockedBalance)} XMR';
-
- return Padding(
- padding: const EdgeInsets.fromLTRB(20, 30, 20, 24),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- // Fiat leads when available; otherwise the coin amount is the hero,
- // with a skeleton while the rate is still loading.
- Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Flexible(
- child: showFiat
- ? BalanceText.split(
- formatFiat(unlockedBalanceFiat!, fiatRate.fiatCurrency),
- style: _balanceStyle,
- )
- : (!fiatRate.isDisabled && !fiatRate.hasFailed)
- ? Skeletonizer(child: Text('0.0000', style: _balanceStyle))
- : (fiatRate.hasFailed && !fiatRate.isDisabled)
- ? Text('--', style: _balanceStyle)
- : Text(coinText, style: _balanceStyle),
- ),
- if (fiatRate.hasFailed && !fiatRate.isDisabled) ...[
- const SizedBox(width: 8),
- Padding(
- padding: const EdgeInsets.only(top: 6),
- child: Tooltip(
- message: i18n.homeFiatApiError,
- child: Icon(Icons.warning_rounded, size: 18, color: BrandColors.warning),
- ),
- ),
- ],
- ],
- ),
- const SizedBox(height: 10),
- // When the rate is unavailable the fiat hero is '--', so keep the coin
- // amount visible as the sub-line.
- if (showFiat || (fiatRate.hasFailed && !fiatRate.isDisabled))
- Text(coinText, style: _balanceSubStyle),
- // Funds that have arrived but aren't spendable yet — Monero locks a
- // receipt for ten blocks, so the unlocked balance above omits it.
- if (lockedBalance > 0)
- Padding(
- padding: const EdgeInsets.only(top: 6),
- child: Text(
- '${i18n.pending}: +${_amountText(lockedBalance)} XMR',
- style: _balanceSubStyle,
- ),
- ),
- _ConnectionRow(wallet: wallet, disconnected: disconnected),
- ],
+ notice: notice,
+ balance: hero(_ConnectionRow(wallet: wallet, disconnected: v.disconnected)),
+ actions: HomeActionRow(
+ receiveLabel: i18n.homeReceive,
+ sendLabel: i18n.homeSend,
+ swapLabel: i18n.coinHomeSwap,
+ onReceive: receive,
+ onSend: send,
+ onSwap: swap,
),
+ incoming: incoming,
+ chart: chart,
+ checklist: checklist,
+ bottomNavigationBar: WalletNavigationBar(selectedIndex: 0),
);
}
}
/// The connection info row: transport/kind pills. While syncing the pills
/// compact to icons with "x blocks left" beside them; when the connection has
-/// failed, the same slot shows "Disconnected" in red. Shared by the mobile
-/// balance hero and the desktop home.
+/// failed, the same slot shows "Disconnected" in red. Sits under the mobile
+/// home's balance.
class _ConnectionRow extends StatelessWidget {
final AppWallet wallet;
final bool disconnected;
@@ -316,261 +257,29 @@ class _ConnectionRow extends StatelessWidget {
if (cw == null || cw.connectionAddress.isEmpty) return const SizedBox.shrink();
final blocks = wallet.syncBlocksRemaining;
final trailing = blocks != null
- ? i18n.homeBlocksRemaining(NumberFormat.decimalPattern().format(blocks))
+ ? i18n.homeBlocksRemaining(blocks)
: disconnected
? i18n.homeDisconnected
: null;
- return Padding(
- padding: const EdgeInsets.only(top: 12),
- child: trailing == null
- ? ConnectionPills(wallet: cw)
- : Row(
- children: [
- ConnectionPills(wallet: cw, compact: true),
- const SizedBox(width: 10),
- Container(width: 1, height: 14, color: BrandColors.borderStrong),
- const SizedBox(width: 10),
- Flexible(
- child: Text(
- trailing,
- overflow: TextOverflow.ellipsis,
- style: TextStyle(
- fontFamily: 'Ubuntu Mono',
- fontSize: 13,
- height: 1,
- color: disconnected ? BrandColors.error : BrandColors.inkMuted,
- ),
- ),
- ),
- ],
- ),
- );
- }
-}
-
-class _ActionRow extends StatelessWidget {
- final VoidCallback onReceive;
- final VoidCallback onSend;
-
- const _ActionRow({required this.onReceive, required this.onSend});
-
- @override
- Widget build(BuildContext context) {
- final i18n = AppLocalizations.of(context)!;
+ if (trailing == null) return ConnectionPills(wallet: cw);
return Row(
children: [
- Expanded(
- child: ActionButton(
- icon: Icons.arrow_downward,
- label: i18n.homeReceive,
- onPressed: onReceive,
- ),
- ),
- const SizedBox(width: 8),
- Expanded(
- child: ActionButton(icon: Icons.arrow_upward, label: i18n.homeSend, onPressed: onSend),
- ),
- ],
- );
- }
-}
-
-class _ActivitySliver extends StatelessWidget {
- final AppWallet wallet;
- final AppLocalizations i18n;
- final FiatRateModel fiatRate;
- final double horizontalPadding;
- final void Function(TxDetails tx) onTapTx;
-
- const _ActivitySliver({
- required this.wallet,
- required this.i18n,
- required this.fiatRate,
- required this.onTapTx,
- this.horizontalPadding = 20,
- });
-
- @override
- Widget build(BuildContext context) {
- // The engine wallet supplies the exact-BigInt tx history the shared row
- // reads; the parent watches the neutral wallet (listen: true) so this
- // subtree rebuilds when the history changes.
- final asset = xmrWallet(context)!;
- final txs = asset.txHistory;
-
- if (txs.isEmpty) {
- return SliverToBoxAdapter(
- child: Padding(
- padding: EdgeInsets.symmetric(horizontal: horizontalPadding, vertical: 12),
+ ConnectionPills(wallet: cw, compact: true),
+ const SizedBox(width: 10),
+ Container(width: 1, height: 14, color: BrandColors.borderStrong),
+ const SizedBox(width: 10),
+ Flexible(
child: Text(
- i18n.homeNoTransactions,
- textAlign: TextAlign.center,
- style: BrandText.bodyMuted,
- ),
- ),
- );
- }
-
- final rows = withDayHeaders(txs, (tx) => tx.timestamp);
-
- return SliverPadding(
- padding: EdgeInsets.symmetric(horizontal: horizontalPadding),
- sliver: SliverList.builder(
- itemCount: rows.length,
- itemBuilder: (context, index) {
- final row = rows[index];
- if (row is String) {
- return Padding(
- padding: EdgeInsets.only(top: index == 0 ? 4 : 16, bottom: 4),
- child: SectionHeader(label: row, padding: EdgeInsets.zero),
- );
- }
- final tx = row as TxDetails;
- // No coin icon: Skylight is single-coin (Monero), so the leading badge
- // is a coin-agnostic direction circle. Divider only within a day group.
- final next = index + 1 < rows.length ? rows[index + 1] : null;
- return TxActivityRow(
- tx: tx,
- asset: asset,
- showCoinIcon: false,
- labels: TxActivityLabels(received: i18n.coinHomeReceived, sent: i18n.coinHomeSent),
- fiatRate: fiatRate,
- showDivider: next is TxDetails,
- onTap: () => onTapTx(tx),
- );
- },
- ),
- );
- }
-}
-
-/// Desktop main home body (rendered inside [DesktopShell]): the balance and
-/// Receive/Send on one row, then the full day-grouped activity. Mirrors the
-/// mobile [WalletHomeScreen] logic (shared via [_deriveHome]); only the layout
-/// is desktop-specific. Skylight is single-coin, so there is no coin grid.
-class DesktopHomeView extends StatelessWidget {
- const DesktopHomeView({super.key});
-
- // Getter, not const: BrandColors.ink is a runtime (palette/brightness) value.
- static TextStyle get _bigBalance => TextStyle(
- fontFamily: 'Ubuntu Mono',
- fontSize: 44,
- height: 1,
- fontWeight: FontWeight.w700,
- letterSpacing: -0.88,
- color: BrandColors.ink,
- fontFeatures: const [FontFeature.tabularFigures()],
- );
-
- @override
- Widget build(BuildContext context) {
- final i18n = AppLocalizations.of(context)!;
- final wallet = appWalletOf(context, listen: true);
- final fiatRate = context.watch<FiatRateModel>();
- final v = _deriveHome(wallet, fiatRate);
-
- final showFiat = !fiatRate.isDisabled && v.unlockedBalanceFiat != null;
- final coinText = '${_amountText(v.unlockedBalance)} XMR';
- final cw = xmrWallet(context);
- final configured = cw != null && cw.connectionAddress.isNotEmpty;
-
- return CustomScrollView(
- slivers: [
- SliverToBoxAdapter(
- child: Padding(
- padding: const EdgeInsets.fromLTRB(44, 40, 44, 0),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: [
- if (configured)
- Align(
- alignment: Alignment.centerRight,
- child: Padding(
- padding: const EdgeInsets.only(bottom: 18),
- child: _SyncStatusPill(
- status: v.status,
- blocksRemaining: wallet.syncBlocksRemaining,
- ),
- ),
- ),
- Row(
- crossAxisAlignment: CrossAxisAlignment.end,
- children: [
- Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Flexible(
- child: showFiat
- ? BalanceText.split(
- formatFiat(v.unlockedBalanceFiat!, fiatRate.fiatCurrency),
- style: _bigBalance,
- )
- : (!fiatRate.isDisabled && !fiatRate.hasFailed)
- ? Skeletonizer(child: Text('0.0000', style: _bigBalance))
- : (fiatRate.hasFailed && !fiatRate.isDisabled)
- ? Text('--', style: _bigBalance)
- : Text(coinText, style: _bigBalance),
- ),
- if (fiatRate.hasFailed && !fiatRate.isDisabled) ...[
- const SizedBox(width: 8),
- Padding(
- padding: const EdgeInsets.only(top: 6),
- child: Tooltip(
- message: i18n.homeFiatApiError,
- child: Icon(
- Icons.warning_rounded,
- size: 18,
- color: BrandColors.warning,
- ),
- ),
- ),
- ],
- ],
- ),
- const SizedBox(height: 12),
- if (showFiat || (fiatRate.hasFailed && !fiatRate.isDisabled))
- Text(coinText, style: _balanceSubStyle),
- if (v.lockedBalance > 0)
- Padding(
- padding: const EdgeInsets.only(top: 6),
- child: Text(
- '${i18n.pending}: +${_amountText(v.lockedBalance)} XMR',
- style: _balanceSubStyle,
- ),
- ),
- if (configured) ...[
- const SizedBox(height: 14),
- ConnectionPills(wallet: cw),
- ],
- ],
- ),
- ),
- const SizedBox(width: 24),
- _DesktopActions(
- onReceive: () => Navigator.pushNamed(context, '/receive'),
- onSend: () => Navigator.pushNamed(context, '/send'),
- ),
- ],
- ),
- const SizedBox(height: 34),
- SectionHeader(label: i18n.coinHomeActivityTitle, padding: EdgeInsets.zero),
- const SizedBox(height: 4),
- ],
+ trailing,
+ overflow: TextOverflow.ellipsis,
+ style: TextStyle(
+ fontFamily: 'Ubuntu Mono',
+ fontSize: 13,
+ height: 1,
+ color: disconnected ? BrandColors.error : BrandColors.inkMuted,
),
),
),
- _ActivitySliver(
- wallet: wallet,
- i18n: i18n,
- fiatRate: fiatRate,
- horizontalPadding: 44,
- onTapTx: (tx) => showTxDetailsDialog(context, tx),
- ),
- const SliverToBoxAdapter(child: SizedBox(height: 28)),
],
);
}
@@ -587,13 +296,12 @@ class _SyncStatusPill extends StatelessWidget {
@override
Widget build(BuildContext context) {
final i18n = AppLocalizations.of(context)!;
+ final blocks = blocksRemaining;
final (Color dot, String text) = switch (status) {
StatusIconStatus.complete => (BrandColors.success, i18n.homeSynced),
StatusIconStatus.loading => (
BrandColors.warning,
- blocksRemaining != null
- ? i18n.homeBlocksRemaining(NumberFormat.decimalPattern().format(blocksRemaining))
- : i18n.homeSyncing,
+ blocks != null ? i18n.homeBlocksRemaining(blocks) : i18n.homeSyncing,
),
StatusIconStatus.fail => (BrandColors.error, i18n.homeDisconnected),
};
@@ -627,33 +335,3 @@ class _SyncStatusPill extends StatelessWidget {
);
}
}
-
-class _DesktopActions extends StatelessWidget {
- final VoidCallback onReceive;
- final VoidCallback onSend;
-
- const _DesktopActions({required this.onReceive, required this.onSend});
-
- @override
- Widget build(BuildContext context) {
- final i18n = AppLocalizations.of(context)!;
- return Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- BrandButton.secondary(
- label: i18n.homeReceive,
- icon: Icons.south_west,
- expand: false,
- onPressed: onReceive,
- ),
- const SizedBox(width: 10),
- BrandButton.secondary(
- label: i18n.homeSend,
- icon: Icons.north_east,
- expand: false,
- onPressed: onSend,
- ),
- ],
- );
- }
-}
### lib/screens/welcome.dart
@@ -24,13 +24,11 @@ class _WelcomeScreenState extends State<WelcomeScreen> {
}
Future<void> _pushHomeIfWalletExists() async {
- if (await openExistingWallet(context) && mounted) {
- // A desktop OS opens nothing until the user types the password.
- Navigator.pushNamedAndRemoveUntil(
- context,
- isDesktopOS ? '/unlock' : '/wallet_home',
- (route) => false,
- );
+ // Through the same locks as a launch (App Lock, then security keys),
+ // never straight home.
+ final route = await existingWalletRoute(context);
+ if (route != null && mounted) {
+ Navigator.pushNamedAndRemoveUntil(context, route, (route) => false);
}
}
### lib/services/foreground_sync_service.dart
@@ -12,7 +12,9 @@ export 'package:wallet_background/wallet_background.dart'
startForegroundSyncIfEnabled,
restartForegroundSyncIfRunning,
isWalletFullySynced,
- stopSyncAndDeleteWallets;
+ stopSyncAndDeleteWallets,
+ applySyncFrequency,
+ ForegroundSyncLink;
/// Foreground-service isolate entry: bootstrap this isolate, then hand off to
/// the shared handler. Top-level `@pragma` so it survives tree-shaking.
### lib/services/shared_preferences_service.dart
@@ -15,11 +15,8 @@ class SharedPreferencesKeys {
static const String fiatRate = SettingsKeys.fiatRate;
static const String theme = SettingsKeys.theme;
static const String notificationsEnabled = SettingsKeys.notificationsEnabled;
- static const String backgroundSyncEnabled = SettingsKeys.backgroundSyncEnabled;
- static const String foregroundSyncEnabled = SettingsKeys.foregroundSyncEnabled;
static const String backgroundSyncIntervalMinutes = SettingsKeys.backgroundSyncIntervalMinutes;
- static const String appLockEnabled = SettingsKeys.appLockEnabled;
- static const String verboseLoggingEnabled = SettingsKeys.verboseLoggingEnabled;
+ static const String loggingEnabled = SettingsKeys.loggingEnabled;
static const String contacts = SettingsKeys.contacts;
static const String torMode = SettingsKeys.torMode;
static const String torSocksPort = SettingsKeys.torSocksPort;
### lib/services/tor_service.dart
@@ -1,11 +1,4 @@
-import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:wallet_infra/wallet_infra.dart';
-
// TorService lives in wallet-core (wallet_infra); kept under this path so call
// sites are unchanged. The copy that used to live here was the same logic with
// a duplicated log line and a non-null-asserted `_tor!` in `disable()`.
export 'package:wallet_infra/wallet_infra.dart' show TorService, TorConnectionStatus;
-
-/// Riverpod handle for the shared service. Stays app-side: wallet-core does not
-/// depend on riverpod, so apps wrap the singleton themselves.
-final pTorService = Provider((_) => TorService.sharedInstance);
### lib/util/logging.dart
@@ -1,5 +1,5 @@
// The whole logger lives in wallet-core (wallet_infra): the log() API +
-// formatter, the verbose gate, the file sink (FileLogSink), log rotation
+// formatter, the logging-on check, the file sink (FileLogSink), log rotation
// (cleanOldLogFiles), and file listing/export. The app only installs the sink
// (console + file) in wallet_core_glue.dart.
export 'package:wallet_infra/wallet_infra.dart'
### lib/util/platform.dart
@@ -1,18 +1,30 @@
import 'dart:io';
import 'package:wallet_ui/wallet_ui.dart' show isDesktopLayout;
+import 'package:wallet_infra/wallet_infra.dart' show WalletSecrets;
/// True when the app shows its desktop layout: on Linux/Windows/macOS, and for
/// the iOS build running on a Mac (see [isDesktopLayout]). Layout only.
bool get isDesktop => isDesktopLayout;
/// True when running natively on a desktop OS (Linux/Windows/macOS).
///
-/// What follows the OS rather than the layout keys off this: the wallet
-/// password typed at every launch, and announcing incoming transactions from
-/// the foreground. The iOS build on a Mac is not one of these. It keeps iOS's
-/// keystore-held password, App Lock and background sync.
+/// What follows the OS rather than the layout keys off this: announcing
+/// incoming transactions from the foreground (no background isolate), and
+/// "Lock after" a time without use. The iOS build on a Mac is not one of these.
+/// It keeps iOS's App Lock and background sync.
final bool isDesktopOS = Platform.isLinux || Platform.isWindows || Platform.isMacOS;
+/// True where the user types the wallet password at every launch: Linux and
+/// Windows. Elsewhere it is generated at onboarding and kept in the keystore.
+/// Read from wallet_infra's [WalletSecrets.holdsWalletPassword], the one
+/// platform switch, so the app and wallet-core cannot disagree.
+bool get typesWalletPassword => !WalletSecrets.holdsWalletPassword;
+
+/// True where App Lock (the device's own prompt: biometrics or the device
+/// passcode, Touch ID or the Mac's password on macOS) guards that generated
+/// password: Android, iOS and macOS.
+bool get usesDeviceLock => WalletSecrets.holdsWalletPassword;
+
/// True on the mobile platforms (Android/iOS), the iOS build on a Mac included.
final bool isMobile = Platform.isAndroid || Platform.isIOS;
### lib/wallet_core_glue.dart
@@ -2,13 +2,15 @@ import 'dart:async';
import 'dart:io';
import 'package:flutter/widgets.dart';
+import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:skylight_wallet/models/app_wallet.dart';
import 'package:skylight_wallet/models/fiat_rate_model.dart';
import 'package:skylight_wallet/models/monero_wallet_adapter.dart';
import 'package:skylight_wallet/widgets/tx_details.dart' show TxDetailsDialog;
-import 'package:skylight_wallet/periodic_tasks.dart' show backgroundDispatcher;
+import 'package:skylight_wallet/periodic_tasks.dart'
+ show applyBackgroundTaskRegistration, backgroundDispatcher;
import 'package:skylight_wallet/services/foreground_sync_service.dart'
show foregroundSyncCallback, stopSyncAndDeleteWallets, restartForegroundSyncIfRunning;
import 'package:skylight_wallet/services/notifications_service.dart';
@@ -28,7 +30,11 @@ import 'package:wallet_domain/wallet_domain.dart'
RestorePoint,
TxDetails,
baseUnitsToDecimalString;
-import 'package:wallet_monero/wallet_monero.dart' show MoneroWallet;
+import 'package:wallet_backup_platform/wallet_backup_platform.dart'
+ show MetadataBackupConfig, MetadataBackupSetup;
+import 'package:wallet_fhse/security_keys_ui.dart' show SecurityKeysUi, SecurityKeysUiConfig;
+import 'package:wallet_fhse/wallet_fhse.dart' show FhseNative, FhseWalletGuard;
+import 'package:wallet_monero/wallet_monero.dart' show MoneroWallet, closeOrphanedMoneroWallets;
import 'package:wallet_openalias/wallet_openalias.dart' show resolveOpenAlias;
const _moneroDecimals = 12;
@@ -46,6 +52,21 @@ void installWalletCore() {
WalletAppConfig.install(WalletAppConfig.skylight);
CryptoWallet.aliasResolver = resolveOpenAlias;
+ // Android: native Monero wallets an app isolate left open when it was
+ // destroyed (swiped away) are closed by whoever takes over.
+ WalletManager.closeOrphanedWallets = closeOrphanedMoneroWallets;
+
+ // Where the wallet password is generated (mobile and macOS) it is FHSE's
+ // root, derived from the seed, and security keys can later take it out of
+ // the keystore (Settings > Advanced Security). Installed in every isolate, so
+ // background runs know when the password is behind keys and check in with
+ // the view key instead. Where the user types it (Linux, Windows), a new
+ // wallet gets the same root and the typed password unlocks it, together with
+ // a key once keys are on; only where FHSE's library loads, so a computer
+ // without it keeps the typed password as the wallet password.
+ if (wcore.WalletSecrets.holdsWalletPassword || FhseNative.isAvailable) {
+ WalletManager.passwordGuard = const FhseWalletGuard();
+ }
wcore.NotificationService.windowsAppName = 'Skylight Wallet';
wcore.NotificationService.windowsAppUserModelId = 'org.magicgrants.skylight';
@@ -69,14 +90,13 @@ void installWalletCore() {
FiatRates.install(getTorProxy: TorSettingsService.sharedInstance.getProxy);
// The whole logger lives in wallet-core now: console + file sinks fan out
- // from one installed sink; the file sink is verbose-gated internally.
+ // from one installed sink; the file sink writes only with logging on.
wcore.WalletLog.sink = wcore.CompositeLogSink([
const wcore.DebugPrintLogSink(),
wcore.FileLogSink(),
]);
- wcore.WalletLog.isVerbose = () async =>
- await SharedPreferencesService.get<bool>(SharedPreferencesKeys.verboseLoggingEnabled) ??
- false;
+ wcore.WalletLog.isLoggingOn = () async =>
+ await SharedPreferencesService.get<bool>(SharedPreferencesKeys.loggingEnabled) ?? false;
CryptoWallet.incomingTxNotifier = (tx, _) {
final amount =
@@ -138,10 +158,11 @@ Future<bool> startupWalletManager(BuildContext context) =>
Future<bool> _loadExistingWalletManager(WalletManager manager) async {
if (await manager.hasAnyExistingWallet()) {
- if (_isMobile) {
- await manager.loadCachedDisplayState();
- manager.openWalletFilesAndSync();
- }
+ // App Lock is always on, so nothing is decrypted before the user gets past
+ // it: the unlock screen opens the wallet (wallet_fhse's
+ // unlockAppLockWithDevice). Linux and Windows wait for the typed password
+ // the same way (unlockAppLockWithPassword).
+ if (wcore.WalletSecrets.holdsWalletPassword) await manager.loadCachedDisplayState();
return true;
}
return false;
@@ -215,37 +236,18 @@ Future<int> commitGeneratedWallet(
required DateTime restoreDate,
}) async {
final manager = Provider.of<WalletManager>(context, listen: false);
- await manager.restoreAll(seed: seed, from: RestorePoint.date(restoreDate));
+ await manager.restoreAll(seed: seed, from: RestorePoint.date(restoreDate), freshSeed: true);
manager.syncInBackground();
return manager.getWallet('XMR')!.getRestoreHeight();
}
-/// Arms the app-lock re-lock when the app goes to the background; see
-/// [WalletManager.armAppLockRelock], which both apps share so the behaviour
-/// cannot drift. Wrapped here only because Skylight reaches wallet-core through
-/// this layer rather than from screens.
-Future<bool> armAppLockRelock(BuildContext context) =>
- Provider.of<WalletManager>(context, listen: false).armAppLockRelock();
-
-/// Opens an already-existing wallet (used by the welcome safety-net). Returns
-/// false when there is none. Opens only on mobile: on a desktop OS the wallet
-/// waits for the typed password, and the caller shows the unlock screen.
-Future<bool> openExistingWallet(BuildContext context) async {
- final manager = Provider.of<WalletManager>(context, listen: false);
- if (!await manager.hasAnyExistingWallet()) return false;
- if (_isMobile) manager.openWalletFilesAndSync();
- return true;
-}
-
-/// Opens the wallet with a desktop-entered password, then syncs. Throws on a
-/// wrong password (the unlock screen shows the error).
-Future<void> unlockWithPassword(BuildContext context, String password) async {
+/// Where the welcome safety-net sends an install that already has a wallet,
+/// or null when there is none: through the same locks as a launch, so the
+/// unlock screen (App Lock is always on; the typed password on Linux and
+/// Windows), and a security key after it when keys are on.
+Future<String?> existingWalletRoute(BuildContext context) async {
final manager = Provider.of<WalletManager>(context, listen: false);
- if (!await manager.unlockWithTypedPassword(password)) {
- throw Exception('Incorrect wallet password.');
- }
- await manager.openAll();
- manager.syncInBackground();
+ return await manager.hasAnyExistingWallet() ? '/unlock' : null;
}
/// Deletes the wallet and everything derived from it.
@@ -255,14 +257,56 @@ Future<void> unlockWithPassword(BuildContext context, String password) async {
/// own isolate, and deleting them while it runs leaves it syncing -- and
/// rewriting -- a wallet the user just deleted.
Future<void> deleteWallet(BuildContext context) async {
- // TODO(wallet-core): pass skylight's own pref keys (contacts, pending tx,
- // notification state) once the delete path is validated on device.
+ // The address book and the app's settings outlive the wallet; Settings >
+ // Data > Delete Address Book is the address book's own delete.
+ // TODO(wallet-core): pass skylight's own pref keys (pending tx, notification
+ // state) once the delete path is validated on device.
await stopSyncAndDeleteWallets(Provider.of<WalletManager>(context, listen: false));
}
/// Rebuilds the wallet if the server kind (LWS↔node) changed, then resyncs.
void applyConnectionChange(BuildContext context) {
final manager = Provider.of<WalletManager>(context, listen: false);
- // Restart the foreground service too, so its isolate re-reads the new server.
- unawaited(manager.applyConnectionChange('XMR').then((_) => restartForegroundSyncIfRunning()));
+ // Restart the foreground service too, so its isolate re-reads the new server,
+ // and re-register the background tasks, which depend on LWS or node and on
+ // Tor; both only once the wallet has been rebuilt for it.
+ unawaited(
+ manager
+ .applyConnectionChange('XMR')
+ .then((_) => restartForegroundSyncIfRunning())
+ .then((_) => applyBackgroundTaskRegistration()),
+ );
+}
+
+// ----- Security keys (FHSE) -----
+
+/// The shared security-key screens (wallet_fhse): Skylight's name, mark and
+/// home route, and where they find the wallet manager. UI isolate only.
+void installSecurityKeysUi() {
+ SecurityKeysUi.install(
+ SecurityKeysUiConfig(
+ appName: 'Skylight',
+ walletManagerOf: (context) => Provider.of<WalletManager>(context, listen: false),
+ homeRoute: '/wallet_home',
+ logo: (_) => SvgPicture.asset('assets/logo_nobg.svg', width: 44, height: 44),
+ ),
+ );
+}
+
+// ----- Metadata backup -----
+
+/// The metadata backup (wallet_backup): who each payment went to, its
+/// transaction key, and the address book, encrypted with the seed. Off until the
+/// user turns it on in Settings > Backup; then saved on this device, and to
+/// iCloud (iOS) or Android's Auto Backup (Android) only if the user turns that
+/// on too. UI isolate only, so a background run never writes a backup file.
+/// 25-word seeds have none.
+void installMetadataBackup() {
+ MetadataBackupSetup.install(
+ const MetadataBackupConfig(
+ appName: 'Skylight',
+ iCloudContainer: 'iCloud.org.magicgrants.skylightwallet',
+ exportFileStem: 'skylight-backup',
+ ),
+ );
}
### lib/widgets/connection_settings_form.dart
@@ -1,14 +1,11 @@
import 'dart:async';
import 'dart:io';
+
import 'package:flutter/material.dart';
-import 'package:skylight_wallet/periodic_tasks.dart';
-import 'package:skylight_wallet/services/foreground_sync_service.dart';
-import 'package:skylight_wallet/services/shared_preferences_service.dart';
import 'package:skylight_wallet/services/tor_settings_service.dart';
import 'package:skylight_wallet/util/logging.dart';
import 'package:skylight_wallet/l10n/app_localizations.dart';
-import 'package:skylight_wallet/models/app_wallet.dart';
import 'package:skylight_wallet/wallet_core_glue.dart';
import 'package:skylight_wallet/services/tor_service.dart';
import 'package:skylight_wallet/widgets/ui/ui.dart';
@@ -70,80 +67,15 @@ class _ConnectionSettingsFormState extends State<ConnectionSettingsForm> {
bool _connectionTestIsLoading = false;
bool _connectionSuccess = false;
String? _errorMessage;
- bool _backgroundSyncEnabled = false;
- bool _foregroundSyncEnabled = false;
TorConnectionStatus _torStatus = TorService.sharedInstance.status;
Timer? _torStatusTimer;
bool _testCancelled = false;
int? _latencyMs;
- // The as-loaded values, so save can tell what the user actually changed:
- // enabling sync or editing the connection needs a working test; disabling
- // sync alone does not.
- String _initialAddress = '';
- String _initialProxyPort = '';
- bool _initialUseTor = false;
- String _initialConnectionType = 'lws';
- bool _initialBackgroundSync = false;
- bool _initialForegroundSync = false;
-
// The saved connection's raw Tor flag (before masking by the global Tor mode).
// Used to warn when a Tor connection was silently turned off by disabling Tor.
bool _savedConnectionUsedTor = false;
- bool get _isNode => _connectionType == 'node';
-
- /// Background/continuous sync only helps a full-node connection (the slow
- /// on-device scan); LWS syncs server-side. Android-only.
- bool get _showSyncOptions => Platform.isAndroid && _isNode;
-
- Future<void> _loadSyncPrefs() async {
- final bg =
- await SharedPreferencesService.get<bool>(SharedPreferencesKeys.backgroundSyncEnabled) ??
- false;
- final fg =
- await SharedPreferencesService.get<bool>(SharedPreferencesKeys.foregroundSyncEnabled) ??
- false;
- if (mounted) {
- setState(() {
- _backgroundSyncEnabled = bg;
- _foregroundSyncEnabled = fg;
- _initialBackgroundSync = bg;
- _initialForegroundSync = fg;
- });
- }
- }
-
- // Toggles are pending: they stage the choice and are applied by _saveConnection
- // (enabling requires saving over a working connection; disabling does not).
- void _setBackgroundSyncEnabled(bool value) => setState(() => _backgroundSyncEnabled = value);
-
- void _setForegroundSyncEnabled(bool value) => setState(() => _foregroundSyncEnabled = value);
-
- /// Persists the pending sync selection and starts/stops the services. LWS
- /// can't sync on-device, so both are forced off when the saved connection
- /// isn't an Android node.
- Future<void> _applySyncSelection() async {
- final bg = _showSyncOptions && _backgroundSyncEnabled;
- final fg = _showSyncOptions && _foregroundSyncEnabled;
- // Captured before the await so the notification starts from the live status.
- final synced = fg && appWalletOf(context).isFullySynced;
- await SharedPreferencesService.set<bool>(SharedPreferencesKeys.backgroundSyncEnabled, bg);
- await SharedPreferencesService.set<bool>(SharedPreferencesKeys.foregroundSyncEnabled, fg);
- if (fg) {
- await startForegroundSync(synced: synced);
- } else {
- await stopForegroundSync();
- }
- await applyBackgroundTaskRegistration();
- if (mounted) {
- setState(() {
- _backgroundSyncEnabled = bg;
- _foregroundSyncEnabled = fg;
- });
- }
- }
-
@override
void initState() {
super.initState();
@@ -173,41 +105,23 @@ class _ConnectionSettingsFormState extends State<ConnectionSettingsForm> {
_useTor = useTor;
_savedConnectionUsedTor = conn.useTor;
_connectionType = type;
- _initialAddress = cleanConnectionAddress(conn.address);
- _initialProxyPort = conn.proxyPort;
- _initialUseTor = useTor;
- _initialConnectionType = type;
});
if (conn.useTor && TorSettingsService.sharedInstance.torMode == TorMode.builtIn) {
_pollTorStatus();
}
-
- if (_showSyncOptions) _loadSyncPrefs();
}
Future<void> _scanQrCode() async {
- final i18n = AppLocalizations.of(context)!;
-
final result = await Navigator.pushNamed(context, '/scan_qr');
if (!mounted) return;
+ // Filled in exactly as if typed: the address rules run at Test and Save,
+ // for a scanned address and a typed one alike.
if (result != null && result is String) {
final scannedAddress = cleanConnectionAddress(result);
- if (isValidConnectionAddress(scannedAddress)) {
- _addressController.text = scannedAddress;
- _onAddressChange(scannedAddress);
- } else {
- if (mounted) {
- if (widget.isInDialog) {
- setState(() {
- _errorMessage = i18n.lwsSetupInvalidQrCode;
- });
- } else {
- showBrandToast(context, i18n.lwsSetupInvalidQrCode);
- }
- }
- }
+ _addressController.text = scannedAddress;
+ _onAddressChange(scannedAddress);
}
}
@@ -286,7 +200,6 @@ class _ConnectionSettingsFormState extends State<ConnectionSettingsForm> {
_hasTested = false;
_errorMessage = null;
});
- if (value == 'node' && Platform.isAndroid) _loadSyncPrefs();
_loadConnectionForType(value);
}
@@ -298,8 +211,7 @@ class _ConnectionSettingsFormState extends State<ConnectionSettingsForm> {
/// the node the private view key.
///
/// A mode with nothing saved clears the field rather than inheriting the other
- /// one's address. `_initial*` is deliberately not updated: switching mode is a
- /// change, so Save stays gated on a passing test.
+ /// one's address. Switching mode clears the test, so Save waits for a new one.
Future<void> _loadConnectionForType(String type) async {
final wallet = appWalletOf(context);
final conn = await wallet.getPersistedConnectionForType(type);
@@ -325,6 +237,7 @@ class _ConnectionSettingsFormState extends State<ConnectionSettingsForm> {
String _connectionAddressErrorMessage(AppLocalizations i18n, ConnectionAddressError error) =>
switch (error) {
ConnectionAddressError.remoteIp => i18n.connectionRemoteIpNotAllowed,
+ ConnectionAddressError.pathNotSupported => i18n.connectionPathNotSupported,
ConnectionAddressError.localOverTor => i18n.connectionLocalOverTorNotAllowed,
ConnectionAddressError.onionNeedsTor => i18n.connectionOnionNeedsTor,
};
@@ -341,6 +254,10 @@ class _ConnectionSettingsFormState extends State<ConnectionSettingsForm> {
return custom.isEmpty ? null : custom;
}
+ /// Whether this connection may carry a path after host:port (a server behind
+ /// a reverse proxy at `/wallet`). The wallet decides: a node's client drops it.
+ bool get _allowsPath => appWalletOf(context).connectionAllowsPath(_connectionType);
+
Future _testConnection() async {
final i18n = AppLocalizations.of(context)!;
final wallet = appWalletOf(context);
@@ -358,6 +275,7 @@ class _ConnectionSettingsFormState extends State<ConnectionSettingsForm> {
address: daemonAddress,
useTor: _useTor,
hasProxy: _customProxyPortController.text.trim().isNotEmpty,
+ allowPath: _allowsPath,
);
if (addrError != null) {
setState(() {
@@ -430,6 +348,7 @@ class _ConnectionSettingsFormState extends State<ConnectionSettingsForm> {
address: daemonAddress,
useTor: _useTor,
hasProxy: proxyAddress.trim().isNotEmpty,
+ allowPath: _allowsPath,
);
if (addrError != null) {
setState(() => _errorMessage = _connectionAddressErrorMessage(i18n, addrError));
@@ -447,11 +366,6 @@ class _ConnectionSettingsFormState extends State<ConnectionSettingsForm> {
await wallet.persistCurrentConnection();
- // Apply the pending sync selection over the connection just saved (also
- // rebuilds the background schedule, which on iOS depends on whether the
- // saved connection is LWS and whether it uses Tor).
- await _applySyncSelection();
-
await widget.onBeforeSave?.call();
widget.onSaved();
@@ -483,21 +397,7 @@ class _ConnectionSettingsFormState extends State<ConnectionSettingsForm> {
final addressHint = appWalletOf(context).connectionAddressExampleForType(_connectionType);
final hasWorkingConnection = _hasTested && _connectionSuccess && !_connectionTestIsLoading;
- final connectionChanged =
- cleanConnectionAddress(_addressController.text) != _initialAddress ||
- _useTor != _initialUseTor ||
- _customProxyPortController.text != _initialProxyPort ||
- _connectionType != _initialConnectionType;
- final enablingSync =
- (_backgroundSyncEnabled && !_initialBackgroundSync) ||
- (_foregroundSyncEnabled && !_initialForegroundSync);
- final syncChanged =
- _backgroundSyncEnabled != _initialBackgroundSync ||
- _foregroundSyncEnabled != _initialForegroundSync;
- // Disabling sync alone needs no working connection; enabling it or editing
- // the connection does.
- final disablingSyncOnly = syncChanged && !enablingSync && !connectionChanged;
- final canSave = !_connectionTestIsLoading && (hasWorkingConnection || disablingSyncOnly);
+ final canSave = !_connectionTestIsLoading && hasWorkingConnection;
// Publish save state for an external Continue button (embedded mode).
final controller = widget.controller;
@@ -543,22 +443,6 @@ class _ConnectionSettingsFormState extends State<ConnectionSettingsForm> {
onToggleTor: () => _setUseTor(!_useTor),
pillProxyPort: _customProxyPortController.text,
pillAddress: cleanConnectionAddress(_addressController.text),
- syncRows: _showSyncOptions
- ? [
- ConnectionSyncRow(
- label: i18n.settingsBackgroundSyncLabel,
- help: i18n.settingsBackgroundSyncDescription,
- checked: _backgroundSyncEnabled,
- onToggle: _setBackgroundSyncEnabled,
- ),
- ConnectionSyncRow(
- label: i18n.settingsForegroundSyncLabel,
- help: i18n.settingsForegroundSyncDescription,
- checked: _foregroundSyncEnabled,
- onToggle: _setForegroundSyncEnabled,
- ),
- ]
- : const [],
testState: _testState(torMode),
onTest: _testConnection,
onStopTest: _stopTest,
### lib/widgets/home_labels.dart
@@ -0,0 +1,26 @@
+import 'package:skylight_wallet/l10n/app_localizations.dart';
+import 'package:skylight_wallet/widgets/ui/ui.dart';
+
+/// The home cards' strings.
+HomeLabels homeLabels(AppLocalizations i18n) => HomeLabels(
+ incomingTitle: i18n.homeIncomingTitle,
+ incomingMore: i18n.homeIncomingTitleMore,
+ unlocksIn: i18n.homeIncomingUnlocksIn,
+ confirmations: i18n.homeIncomingConfirmations,
+ chartTitle: i18n.homeChartTitle,
+ chartToday: i18n.homeChartToday,
+ chartEachCoin: i18n.homeChartEachCoin,
+ chartNew: i18n.homeChartNew,
+ chartEmpty: i18n.homeChartEmpty,
+);
+
+/// The security checklist's strings.
+SecurityChecklistLabels securityChecklistLabels(AppLocalizations i18n) => SecurityChecklistLabels(
+ title: i18n.homeChecklistTitle,
+ progress: i18n.homeChecklistProgress,
+ verifySeed: i18n.homeChecklistVerifySeed,
+ autoBackup: i18n.homeChecklistAutoBackup,
+ tor: i18n.homeChecklistTor,
+ privateLookups: i18n.homeChecklistPrivateLookups,
+ securityKeys: i18n.homeChecklistSecurityKeys,
+);
### lib/widgets/privacy_settings_sheets.dart
@@ -0,0 +1,147 @@
+import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
+import 'package:wallet_domain/wallet_domain.dart' show OpenAliasMode;
+
+import 'package:skylight_wallet/l10n/app_localizations.dart';
+import 'package:skylight_wallet/wallet_core_glue.dart';
+import 'package:skylight_wallet/models/fiat_rate_model.dart';
+import 'package:skylight_wallet/widgets/fiat_api_settings_form.dart';
+import 'package:skylight_wallet/widgets/tor_settings_form.dart';
+import 'package:skylight_wallet/widgets/ui/ui.dart';
+
+// The privacy settings sheets, shared by Settings and the home's security
+// checklist so both open the same thing.
+
+double _sheetMaxHeight(BuildContext sheetContext) {
+ final media = MediaQuery.of(sheetContext);
+ return (media.size.height - media.viewInsets.bottom) * 0.86;
+}
+
+/// Settings popup chrome, matching Spice's sheets: a handle, an icon + title
+/// header, then the form scrolling below (the form carries its own save
+/// button and pops on success).
+Future<void> showSettingsFormSheet(
+ BuildContext context, {
+ required IconData icon,
+ required String title,
+ required Widget form,
+}) {
+ return showBrandSheet<void>(
+ context: context,
+ isScrollControlled: true,
+ builder: (sheetContext) {
+ // Desktop modal: the card owns the edge padding and drops the drag handle.
+ final hpad = isDesktopModal ? 0.0 : 22.0;
+ return SafeArea(
+ top: false,
+ child: ConstrainedBox(
+ constraints: BoxConstraints(maxHeight: _sheetMaxHeight(sheetContext)),
+ child: Padding(
+ padding: EdgeInsets.only(top: isDesktopModal ? 0 : 10),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const SheetHandle(),
+ Padding(
+ padding: EdgeInsets.fromLTRB(hpad, 0, hpad, 16),
+ child: Row(
+ children: [
+ SheetIcon(
+ icon: icon,
+ bg: BrandColors.surfaceTinted,
+ color: BrandColors.primaryDeep,
+ ),
+ const SizedBox(width: 11),
+ Expanded(child: Text(title, style: BrandText.sheetTitle)),
+ ],
+ ),
+ ),
+ Flexible(
+ child: SingleChildScrollView(
+ padding: EdgeInsets.fromLTRB(hpad, 0, hpad, isDesktopModal ? 0 : 16),
+ child: form,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ },
+ );
+}
+
+/// Tor: built in, external or off. Saving reconnects the wallet and restarts
+/// the price feed, which follows the Tor choice.
+Future<void> showTorSettingsSheet(BuildContext context) {
+ final i18n = AppLocalizations.of(context)!;
+ return showSettingsFormSheet(
+ context,
+ icon: Icons.public,
+ title: i18n.torSettingsTitle,
+ form: Builder(
+ builder: (formContext) => TorSettingsForm(
+ saveButtonLabel: i18n.torSettingsSaveButton,
+ onSaved: () {
+ appWalletOf(formContext).load();
+ Provider.of<FiatRateModel>(formContext, listen: false).startService();
+ Navigator.pop(formContext);
+ },
+ ),
+ ),
+ );
+}
+
+/// The price source: Tor-only, clearnet or off.
+Future<void> showFiatApiSettingsSheet(BuildContext context) {
+ final i18n = AppLocalizations.of(context)!;
+ return showSettingsFormSheet(
+ context,
+ icon: Icons.attach_money,
+ title: i18n.settingsFiatApiSettingsLabel,
+ form: Builder(
+ builder: (formContext) => FiatApiSettingsForm(
+ saveButtonLabel: i18n.torSettingsSaveButton,
+ onSaved: () async {
+ await Provider.of<FiatRateModel>(formContext, listen: false).startService();
+ if (formContext.mounted) Navigator.pop(formContext);
+ },
+ ),
+ ),
+ );
+}
+
+/// OpenAlias lookups: Tor-only, clearnet or off. True when the user saved.
+Future<bool?> showOpenAliasSheet(BuildContext context) {
+ final i18n = AppLocalizations.of(context)!;
+ return showOpenAliasSettingsSheet(
+ context,
+ labels: OpenAliasSettingsLabels(
+ title: i18n.settingsOpenAliasSettingsLabel,
+ subtitle: i18n.openAliasSettingsSheetSubtitle,
+ modeLabel: i18n.fiatApiSettingsModeLabel,
+ torOnly: i18n.fiatApiSettingsModeTorOnly,
+ torOnlyDesc: i18n.openAliasModeTorOnlyDesc,
+ clearnet: i18n.fiatApiSettingsModeClearnet,
+ clearnetDesc: i18n.openAliasModeClearnetDesc,
+ disabled: i18n.fiatApiSettingsModeDisabled,
+ disabledDesc: i18n.openAliasModeDisabledDesc,
+ save: i18n.torSettingsSaveButton,
+ cancel: i18n.cancel,
+ ),
+ );
+}
+
+/// Opens whichever of the price source and OpenAlias still goes over
+/// clearnet, one after the other: the checklist step that covers both.
+Future<void> showPrivateLookupSheets(BuildContext context) async {
+ if (await FiatRateModel.loadFiatApiMode() == FiatApiMode.clearnet) {
+ if (!context.mounted) return;
+ await showFiatApiSettingsSheet(context);
+ }
+ if (await OpenAliasMode.load() == OpenAliasMode.clearnet) {
+ if (!context.mounted) return;
+ await showOpenAliasSheet(context);
+ }
+}
### lib/widgets/sync_frequency_sheet.dart
@@ -0,0 +1,37 @@
+import 'dart:io';
+
+import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
+import 'package:wallet_domain/wallet_domain.dart' show WalletManager;
+import 'package:wallet_infra/wallet_infra.dart' show SyncFrequency;
+
+import 'package:skylight_wallet/l10n/app_localizations.dart';
+import 'package:skylight_wallet/services/foreground_sync_service.dart';
+import 'package:skylight_wallet/widgets/ui/ui.dart';
+
+/// The Sync Frequency sheet's strings. Periodic names the Monero node's limits,
+/// which differ by platform: iOS can only wait for a charger, not for WiFi.
+SyncFrequencyLabels syncFrequencyLabels(AppLocalizations i18n) => SyncFrequencyLabels(
+ title: i18n.settingsSyncFrequencyLabel,
+ subtitle: i18n.syncFrequencySheetSubtitle,
+ modeLabel: i18n.syncFrequencyModeLabel,
+ continuous: i18n.syncFrequencyContinuous,
+ continuousDesc: i18n.syncFrequencyContinuousDesc,
+ periodic: i18n.syncFrequencyPeriodic,
+ periodicDesc: Platform.isIOS ? i18n.syncFrequencyPeriodicDescIos : i18n.syncFrequencyPeriodicDesc,
+ off: i18n.syncFrequencyOff,
+ offDesc: i18n.syncFrequencyOffDesc,
+ save: i18n.torSettingsSaveButton,
+ cancel: i18n.cancel,
+);
+
+/// Opens Sync Frequency and applies a saved choice: the view-only material, the
+/// Continuous Sync service and the background tasks (`applySyncFrequency`).
+/// Resolves to the saved choice, or null when the user cancelled.
+Future<SyncFrequency?> showSyncFrequencySettings(BuildContext context) async {
+ final labels = syncFrequencyLabels(AppLocalizations.of(context)!);
+ final manager = Provider.of<WalletManager>(context, listen: false);
+ final frequency = await showSyncFrequencySheet(context, labels: labels);
+ if (frequency != null) await applySyncFrequency(manager, frequency);
+ return frequency;
+}
### lib/widgets/wallet_navigation_bar.dart
@@ -5,13 +5,13 @@ import 'package:skylight_wallet/widgets/ui/ui.dart';
/// Brand bottom nav — flat icon+label tabs on the paper ground with a hairline
/// top border (copied from Spice's design). Skylight's destinations:
-/// Wallet / Contacts / Settings.
+/// Wallet / History / Contacts / Settings.
class WalletNavigationBar extends StatelessWidget {
final int selectedIndex;
const WalletNavigationBar({super.key, required this.selectedIndex});
- static const _routes = ['/wallet_home', '/address_book', '/settings'];
+ static const _routes = ['/wallet_home', '/history', '/address_book', '/settings'];
void _select(BuildContext context, int index) {
if (index == selectedIndex) return;
@@ -23,6 +23,7 @@ class WalletNavigationBar extends StatelessWidget {
final i18n = AppLocalizations.of(context)!;
final items = [
(Icons.account_balance_wallet_outlined, i18n.navigationBarWallet),
+ (Icons.history, i18n.navigationBarHistory),
(Icons.people_outline, i18n.addressBookTitle),
(Icons.tune, i18n.navigationBarSettings),
];
### linux/CMakeLists.txt
@@ -34,6 +34,37 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
"Debug" "Profile" "Release")
endif()
+# Memory hardening for the runner and for the plugins built with
+# APPLY_STANDARD_SETTINGS: zeroed stack variables, stack canaries, stack clash
+# probes, and hardware control-flow protection (CET on x86-64, BTI and PAC on
+# arm64). Each flag only where the compiler accepts it, checked with -Werror
+# as the build uses it: a flag the compiler takes but ignores for this target
+# only warns, and would then fail the build.
+include(CheckCXXCompilerFlag)
+set(HARDENING_FLAGS "")
+set(CMAKE_REQUIRED_FLAGS "-Werror")
+foreach(flag
+ -ftrivial-auto-var-init=zero
+ -fstack-protector-strong
+ -fstack-clash-protection
+ -fcf-protection=full
+ -mbranch-protection=standard)
+ string(MAKE_C_IDENTIFIER "HAVE${flag}" have_flag)
+ check_cxx_compiler_flag(${flag} ${have_flag})
+ if(${have_flag})
+ list(APPEND HARDENING_FLAGS ${flag})
+ endif()
+endforeach()
+unset(CMAKE_REQUIRED_FLAGS)
+
+# A position-independent executable, so ASLR moves the runner too.
+if(POLICY CMP0083)
+ cmake_policy(SET CMP0083 NEW)
+ include(CheckPIESupported)
+ check_pie_supported()
+endif()
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
# Compilation settings that should be applied to most targets.
#
# Be cautious about adding new options here, as plugins use this function by
@@ -45,6 +76,22 @@ function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
target_compile_options(${TARGET} PRIVATE -Wno-deprecated)
+ # The hardening above; glibc's bounds-checked string and memory functions
+ # (FORTIFY, which needs optimisation, so not in debug builds), replacing
+ # any level the distribution's compiler sets; libstdc++'s bounds checks;
+ # and at link time, a read-only GOT and no executable stack. FORTIFY also
+ # marks functions such as write() warn-unused-result; that stays a warning,
+ # so a plugin that ignores one still builds.
+ if(HARDENING_FLAGS)
+ target_compile_options(${TARGET} PRIVATE ${HARDENING_FLAGS})
+ endif()
+ target_compile_options(${TARGET} PRIVATE
+ "$<$<NOT:$<CONFIG:Debug>>:-U_FORTIFY_SOURCE>"
+ "$<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=3>"
+ "$<$<NOT:$<CONFIG:Debug>>:-Wno-error=unused-result>")
+ target_compile_definitions(${TARGET} PRIVATE _GLIBCXX_ASSERTIONS)
+ target_link_options(${TARGET} PRIVATE
+ "-Wl,-z,relro" "-Wl,-z,now" "-Wl,-z,noexecstack")
endfunction()
# Flutter library and tool build rules.
### linux/flutter/generated_plugins.cmake
@@ -10,8 +10,8 @@ list(APPEND FLUTTER_PLUGIN_LIST
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
+ fhse_native
flutter_zxing
- tor_ffi_plugin
wallet_openalias
)
### linux/runner/main.cc
@@ -1,6 +1,19 @@
+#include <sys/prctl.h>
+#include <sys/resource.h>
+
#include "my_application.h"
int main(int argc, char** argv) {
+#ifdef NDEBUG
+ // Other processes of the same user can no longer attach to the wallet or
+ // read its memory through /proc/<pid>/mem, and a crash leaves no core dump
+ // holding keys. ssh-agent does the same. Release and profile builds only,
+ // so a debugger still attaches to debug builds.
+ prctl(PR_SET_DUMPABLE, 0, 0, 0, 0);
+ struct rlimit no_core = {0, 0};
+ setrlimit(RLIMIT_CORE, &no_core);
+#endif
+
g_autoptr(MyApplication) app = my_application_new();
return g_application_run(G_APPLICATION(app), argc, argv);
}
### macos/Flutter/GeneratedPluginRegistrant.swift
@@ -14,6 +14,7 @@ import path_provider_foundation
import screen_brightness_macos
import share_plus
import shared_preferences_foundation
+import wallet_backup_platform
import webcrypto
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
@@ -26,5 +27,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
ScreenBrightnessMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenBrightnessMacosPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
+ WalletBackupPlatformPlugin.register(with: registry.registrar(forPlugin: "WalletBackupPlatformPlugin"))
WebcryptoPlugin.register(with: registry.registrar(forPlugin: "WebcryptoPlugin"))
}
### macos/Podfile
@@ -1,4 +1,4 @@
-platform :osx, '10.15'
+platform :osx, '13.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@@ -38,5 +38,27 @@ end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_macos_build_settings(target)
+ # Xcode 27 refuses macOS deployment targets below 12.0, and several plugin
+ # podspecs still ask for 10.13 to 10.15. Raise them to the app's own minimum
+ # (13.0, for YubiKit).
+ #
+ # The memory hardening Enhanced Security turns on, for the C and C++ the
+ # pods compile (fhse_native's libsodium and libcbor, BoringSSL): zeroed
+ # stack variables, the typed allocator that hardened-heap (the Runner
+ # entitlements) builds on, and libc++'s fast bounds checks in release
+ # builds (debug builds already get its debug mode). Not
+ # ENABLE_ENHANCED_SECURITY itself, which would build for arm64e.
+ target.build_configurations.each do |config|
+ current = config.build_settings['MACOSX_DEPLOYMENT_TARGET']
+ if current && Gem::Version.new(current) < Gem::Version.new('13.0')
+ config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '13.0'
+ end
+ config.build_settings['CLANG_ENABLE_STACK_ZERO_INIT'] = 'YES'
+ config.build_settings['CLANG_ENABLE_C_TYPED_ALLOCATOR_SUPPORT'] = 'YES'
+ config.build_settings['CLANG_ENABLE_CPLUSPLUS_TYPED_ALLOCATOR_SUPPORT'] = 'YES'
+ unless config.name == 'Debug'
+ config.build_settings['CLANG_CXX_STANDARD_LIBRARY_HARDENING'] = 'fast'
+ end
+ end
end
end
### macos/Podfile.lock
@@ -0,0 +1,103 @@
+PODS:
+ - fhse_native (0.1.0):
+ - FlutterMacOS
+ - file_selector_macos (0.0.1):
+ - FlutterMacOS
+ - flutter_local_notifications (0.0.1):
+ - FlutterMacOS
+ - flutter_secure_storage_macos (6.1.3):
+ - FlutterMacOS
+ - flutter_zxing (0.0.1):
+ - FlutterMacOS
+ - FlutterMacOS (1.0.0)
+ - local_auth_darwin (0.0.1):
+ - Flutter
+ - FlutterMacOS
+ - package_info_plus (0.0.1):
+ - FlutterMacOS
+ - path_provider_foundation (0.0.1):
+ - Flutter
+ - FlutterMacOS
+ - screen_brightness_macos (0.1.0):
+ - FlutterMacOS
+ - share_plus (0.0.1):
+ - FlutterMacOS
+ - shared_preferences_foundation (0.0.1):
+ - Flutter
+ - FlutterMacOS
+ - wallet_fhse (0.1.0):
+ - FlutterMacOS
+ - wallet_openalias (0.0.1)
+ - webcrypto (0.1.1):
+ - Flutter
+ - FlutterMacOS
+
+DEPENDENCIES:
+ - fhse_native (from `Flutter/ephemeral/.symlinks/plugins/fhse_native/macos`)
+ - file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`)
+ - flutter_local_notifications (from `Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos`)
+ - flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
+ - flutter_zxing (from `Flutter/ephemeral/.symlinks/plugins/flutter_zxing/macos`)
+ - FlutterMacOS (from `Flutter/ephemeral`)
+ - local_auth_darwin (from `Flutter/ephemeral/.symlinks/plugins/local_auth_darwin/darwin`)
+ - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
+ - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
+ - screen_brightness_macos (from `Flutter/ephemeral/.symlinks/plugins/screen_brightness_macos/macos`)
+ - share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`)
+ - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
+ - wallet_fhse (from `Flutter/ephemeral/.symlinks/plugins/wallet_fhse/macos`)
+ - wallet_openalias (from `Flutter/ephemeral/.symlinks/plugins/wallet_openalias/macos`)
+ - webcrypto (from `Flutter/ephemeral/.symlinks/plugins/webcrypto/darwin`)
+
+EXTERNAL SOURCES:
+ fhse_native:
+ :path: Flutter/ephemeral/.symlinks/plugins/fhse_native/macos
+ file_selector_macos:
+ :path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos
+ flutter_local_notifications:
+ :path: Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos
+ flutter_secure_storage_macos:
+ :path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos
+ flutter_zxing:
+ :path: Flutter/ephemeral/.symlinks/plugins/flutter_zxing/macos
+ FlutterMacOS:
+ :path: Flutter/ephemeral
+ local_auth_darwin:
+ :path: Flutter/ephemeral/.symlinks/plugins/local_auth_darwin/darwin
+ package_info_plus:
+ :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
+ path_provider_foundation:
+ :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
+ screen_brightness_macos:
+ :path: Flutter/ephemeral/.symlinks/plugins/screen_brightness_macos/macos
+ share_plus:
+ :path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos
+ shared_preferences_foundation:
+ :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
+ wallet_fhse:
+ :path: Flutter/ephemeral/.symlinks/plugins/wallet_fhse/macos
+ wallet_openalias:
+ :path: Flutter/ephemeral/.symlinks/plugins/wallet_openalias/macos
+ webcrypto:
+ :path: Flutter/ephemeral/.symlinks/plugins/webcrypto/darwin
+
+SPEC CHECKSUMS:
+ fhse_native: 00a7384c5fdeeab6d848d23bd3d1b3d9aa1f61bb
+ file_selector_macos: 3e56eaea051180007b900eacb006686fd54da150
+ flutter_local_notifications: 4ccab5b7a22835214a6672e3f9c5e8ae207dab36
+ flutter_secure_storage_macos: c2754d3483d20bb207bb9e5a14f1b8e771abcdb9
+ flutter_zxing: 99d4c62c06f609ccb5347c71f388cebd7d5705ef
+ FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1
+ local_auth_darwin: 63c73d6d28cc3e239be2b6aa460ea6e317cd5100
+ package_info_plus: 12f1c5c2cfe8727ca46cbd0b26677728972d9a5b
+ path_provider_foundation: 0b743cbb62d8e47eab856f09262bb8c1ddcfe6ba
+ screen_brightness_macos: 2d6d3af2165592d9a55ffcd95b7550970e41ebda
+ share_plus: 1fa619de8392a4398bfaf176d441853922614e89
+ shared_preferences_foundation: 5086985c1d43c5ba4d5e69a4e8083a389e2909e6
+ wallet_fhse: 5b8237b85fd9043eb1a8c6d1e91351510b537da6
+ wallet_openalias: 7526f78902d0692e377d89af41d17894bb0ad5e0
+ webcrypto: aa788ff6b0a956e5d6e613b35b99c13e220ca2d0
+
+PODFILE CHECKSUM: 78456d71febeed8e455200ad252d9b61666547a0
+
+COCOAPODS: 1.17.0
### macos/Runner.xcodeproj/project.pbxproj
@@ -21,12 +21,18 @@
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
+ 9A1B2C3D4E5F6071829304B2 /* monero_libwallet2_api_c.dylib in Bundle Framework */ = {isa = PBXBuildFile; fileRef = 9A1B2C3D4E5F6071829304B1 /* monero_libwallet2_api_c.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; };
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
+ 98D19850CDE966923BF75991 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 885BB32EF4DE9407933D50FD /* Pods_Runner.framework */; };
+ A1F3C2D4E5B60718293A4B5C /* SecurityKeyOperations.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4E6F5071829A3B4526D7E8F /* SecurityKeyOperations.swift */; };
+ B2E4D3C5F6A70819304B5C6D /* SecurityKeyChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5F70618293AB4C5637E8F90 /* SecurityKeyChannel.swift */; };
+ C3D5E4F607B8192A415C6D7E /* YubiKit in Frameworks */ = {isa = PBXBuildFile; productRef = F608172930AB4C5D748F90A1 /* YubiKit */; };
+ F71372956EE4A9B7113F18D6 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AEEDAB4AD80BFB98B031073 /* Pods_RunnerTests.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -53,18 +59,23 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
+ 9A1B2C3D4E5F6071829304B2 /* monero_libwallet2_api_c.dylib in Bundle Framework */,
);
name = "Bundle Framework";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ 9A1B2C3D4E5F6071829304B1 /* monero_libwallet2_api_c.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = monero_libwallet2_api_c.dylib; path = Frameworks/monero_libwallet2_api_c.dylib; sourceTree = "<group>"; };
+ 1A7B0C9B1627946F0BC1C26A /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
+ 2AEEDAB4AD80BFB98B031073 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
- 33CC10ED2044A3C60003C045 /* skylight_wallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "skylight_wallet.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 33A150061B229F2E68DDAF34 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
+ 33CC10ED2044A3C60003C045 /* skylight_wallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = skylight_wallet.app; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
@@ -76,22 +87,32 @@
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
+ 47E7A4D069E5CE4EF14D8F7A /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
+ 67799E18F52DE14E4B978BB6 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
+ 8741BAB022871AF957248DC9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
+ 885BB32EF4DE9407933D50FD /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
+ D4E6F5071829A3B4526D7E8F /* SecurityKeyOperations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SecurityKeyOperations.swift; path = "Flutter/ephemeral/.symlinks/plugins/wallet_fhse/apple/SecurityKeyOperations.swift"; sourceTree = SOURCE_ROOT; };
+ E5F70618293AB4C5637E8F90 /* SecurityKeyChannel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SecurityKeyChannel.swift; path = "Flutter/ephemeral/.symlinks/plugins/wallet_fhse/apple/SecurityKeyChannel.swift"; sourceTree = SOURCE_ROOT; };
+ EFA29E21B8FD908BF8BED000 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
331C80D2294CF70F00263BE5 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ F71372956EE4A9B7113F18D6 /* Pods_RunnerTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
33CC10EA2044A3C60003C045 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ C3D5E4F607B8192A415C6D7E /* YubiKit in Frameworks */,
+ 98D19850CDE966923BF75991 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -125,6 +146,7 @@
331C80D6294CF71000263BE5 /* RunnerTests */,
33CC10EE2044A3C60003C045 /* Products */,
D73912EC22F37F3D000D13A0 /* Frameworks */,
+ 8061D9331C4AFC73B0B5CE1D /* Pods */,
);
sourceTree = "<group>";
};
@@ -164,6 +186,8 @@
children = (
33CC10F02044A3C60003C045 /* AppDelegate.swift */,
33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
+ E5F70618293AB4C5637E8F90 /* SecurityKeyChannel.swift */,
+ D4E6F5071829A3B4526D7E8F /* SecurityKeyOperations.swift */,
33E51913231747F40026EE4D /* DebugProfile.entitlements */,
33E51914231749380026EE4D /* Release.entitlements */,
33CC11242044D66E0003C045 /* Resources */,
@@ -172,9 +196,26 @@
path = Runner;
sourceTree = "<group>";
};
+ 8061D9331C4AFC73B0B5CE1D /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ 1A7B0C9B1627946F0BC1C26A /* Pods-Runner.debug.xcconfig */,
+ 8741BAB022871AF957248DC9 /* Pods-Runner.release.xcconfig */,
+ EFA29E21B8FD908BF8BED000 /* Pods-Runner.profile.xcconfig */,
+ 67799E18F52DE14E4B978BB6 /* Pods-RunnerTests.debug.xcconfig */,
+ 33A150061B229F2E68DDAF34 /* Pods-RunnerTests.release.xcconfig */,
+ 47E7A4D069E5CE4EF14D8F7A /* Pods-RunnerTests.profile.xcconfig */,
+ );
+ name = Pods;
+ path = Pods;
+ sourceTree = "<group>";
+ };
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 9A1B2C3D4E5F6071829304B1 /* monero_libwallet2_api_c.dylib */,
+ 885BB32EF4DE9407933D50FD /* Pods_Runner.framework */,
+ 2AEEDAB4AD80BFB98B031073 /* Pods_RunnerTests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -186,6 +227,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
+ 0D248FED70260B47CBC28E2A /* [CP] Check Pods Manifest.lock */,
331C80D1294CF70F00263BE5 /* Sources */,
331C80D2294CF70F00263BE5 /* Frameworks */,
331C80D3294CF70F00263BE5 /* Resources */,
@@ -204,18 +246,23 @@
isa = PBXNativeTarget;
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
+ 3A3941C6F93506A6EC406544 /* [CP] Check Pods Manifest.lock */,
33CC10E92044A3C60003C045 /* Sources */,
33CC10EA2044A3C60003C045 /* Frameworks */,
33CC10EB2044A3C60003C045 /* Resources */,
33CC110E2044A8840003C045 /* Bundle Framework */,
3399D490228B24CF009A79C7 /* ShellScript */,
+ 8C5B5D5BF65EBA50355E7729 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
33CC11202044C79F0003C045 /* PBXTargetDependency */,
);
name = Runner;
+ packageProductDependencies = (
+ F608172930AB4C5D748F90A1 /* YubiKit */,
+ );
productName = Runner;
productReference = 33CC10ED2044A3C60003C045 /* skylight_wallet.app */;
productType = "com.apple.product-type.application";
@@ -260,6 +307,9 @@
Base,
);
mainGroup = 33CC10E42044A3C60003C045;
+ packageReferences = (
+ 0718293A4BC5D6E85990A1B2 /* XCRemoteSwiftPackageReference "yubikit-swift" */,
+ );
productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
projectDirPath = "";
projectRoot = "";
@@ -291,6 +341,28 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
+ 0D248FED70260B47CBC28E2A /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
3399D490228B24CF009A79C7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
@@ -329,6 +401,45 @@
shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
};
+ 3A3941C6F93506A6EC406544 /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 8C5B5D5BF65EBA50355E7729 /* [CP] Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
+ );
+ name = "[CP] Embed Pods Frameworks";
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -346,6 +457,8 @@
files = (
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
+ B2E4D3C5F6A70819304B5C6D /* SecurityKeyChannel.swift in Sources */,
+ A1F3C2D4E5B60718293A4B5C /* SecurityKeyOperations.swift in Sources */,
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -380,6 +493,7 @@
/* Begin XCBuildConfiguration section */
331C80DB294CF71000263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = 67799E18F52DE14E4B978BB6 /* Pods-RunnerTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
@@ -394,6 +508,7 @@
};
331C80DC294CF71000263BE5 /* Release */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = 33A150061B229F2E68DDAF34 /* Pods-RunnerTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
@@ -408,6 +523,7 @@
};
331C80DD294CF71000263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = 47E7A4D069E5CE4EF14D8F7A /* Pods-RunnerTests.profile.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
@@ -454,14 +570,15 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ EXCLUDED_ARCHS = x86_64;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.14;
+ MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
@@ -474,10 +591,15 @@
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_CPLUSPLUS_TYPED_ALLOCATOR_SUPPORT = YES;
+ CLANG_ENABLE_C_TYPED_ALLOCATOR_SUPPORT = YES;
CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_STACK_ZERO_INIT = YES;
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
+ ENABLE_HARDENED_RUNTIME = YES;
+ ENABLE_SECURITY_COMPILER_WARNINGS = YES;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -530,6 +652,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ EXCLUDED_ARCHS = x86_64;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
@@ -543,7 +666,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.14;
+ MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
@@ -586,14 +709,15 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ EXCLUDED_ARCHS = x86_64;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.14;
+ MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
@@ -606,10 +730,15 @@
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_CPLUSPLUS_TYPED_ALLOCATOR_SUPPORT = YES;
+ CLANG_ENABLE_C_TYPED_ALLOCATOR_SUPPORT = YES;
CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_STACK_ZERO_INIT = YES;
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
+ ENABLE_HARDENED_RUNTIME = YES;
+ ENABLE_SECURITY_COMPILER_WARNINGS = YES;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -626,10 +755,15 @@
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_CPLUSPLUS_TYPED_ALLOCATOR_SUPPORT = YES;
+ CLANG_ENABLE_C_TYPED_ALLOCATOR_SUPPORT = YES;
CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_STACK_ZERO_INIT = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
+ ENABLE_HARDENED_RUNTIME = YES;
+ ENABLE_SECURITY_COMPILER_WARNINGS = YES;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -700,6 +834,25 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
+
+/* Begin XCRemoteSwiftPackageReference section */
+ 0718293A4BC5D6E85990A1B2 /* XCRemoteSwiftPackageReference "yubikit-swift" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/Yubico/yubikit-swift";
+ requirement = {
+ kind = exactVersion;
+ version = 1.4.0;
+ };
+ };
+/* End XCRemoteSwiftPackageReference section */
+
+/* Begin XCSwiftPackageProductDependency section */
+ F608172930AB4C5D748F90A1 /* YubiKit */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = 0718293A4BC5D6E85990A1B2 /* XCRemoteSwiftPackageReference "yubikit-swift" */;
+ productName = YubiKit;
+ };
+/* End XCSwiftPackageProductDependency section */
};
rootObject = 33CC10E52044A3C60003C045 /* Project object */;
}
### macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -0,0 +1,24 @@
+{
+ "originHash" : "27c93eff4dfb0ee36f0f5d536b891dbb7ac5a65ff544f77bdd05550fd667147f",
+ "pins" : [
+ {
+ "identity" : "swift-log",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-log",
+ "state" : {
+ "revision" : "4038b6a4f74a1426f47eb1dd5b4bb5628a15d597",
+ "version" : "1.16.1"
+ }
+ },
+ {
+ "identity" : "yubikit-swift",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/Yubico/yubikit-swift",
+ "state" : {
+ "revision" : "e19212f2efbca9af280e57542e669885de5acdc1",
+ "version" : "1.4.0"
+ }
+ }
+ ],
+ "version" : 3
+}
### macos/Runner.xcworkspace/contents.xcworkspacedata
@@ -4,4 +4,7 @@
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
+ <FileRef
+ location = "group:Pods/Pods.xcodeproj">
+ </FileRef>
</Workspace>
### macos/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -0,0 +1,24 @@
+{
+ "originHash" : "27c93eff4dfb0ee36f0f5d536b891dbb7ac5a65ff544f77bdd05550fd667147f",
+ "pins" : [
+ {
+ "identity" : "swift-log",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-log",
+ "state" : {
+ "revision" : "4038b6a4f74a1426f47eb1dd5b4bb5628a15d597",
+ "version" : "1.16.1"
+ }
+ },
+ {
+ "identity" : "yubikit-swift",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/Yubico/yubikit-swift",
+ "state" : {
+ "revision" : "e19212f2efbca9af280e57542e669885de5acdc1",
+ "version" : "1.4.0"
+ }
+ }
+ ],
+ "version" : 3
+}
### macos/Runner/DebugProfile.entitlements
@@ -4,9 +4,49 @@
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
+ <!-- Outgoing connections: nodes, LWS, Tor, price and fiat APIs. -->
+ <key>com.apple.security.network.client</key>
+ <true/>
+ <!-- FIDO2 security keys over USB HID (YubiKit), for FHSE. -->
+ <key>com.apple.security.device.usb</key>
+ <true/>
+ <key>com.apple.security.files.user-selected.read-write</key>
+ <true/>
+ <key>com.apple.security.files.bookmarks.app-scope</key>
+ <true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
+ <!-- Debug and profile builds only. Local builds are signed ad hoc, with no
+ Team ID, and the hardened runtime's library validation refuses to
+ load their frameworks. Release builds keep library validation, so
+ they need a Team ID: sign them with an Apple Development or
+ Developer ID certificate. -->
+ <key>com.apple.security.cs.disable-library-validation</key>
+ <true/>
+ <!-- Enhanced Security (macOS 26 and later; earlier versions ignore these),
+ as on iOS: all of it except pointer authentication, which needs
+ every binary in the process built for arm64e, and Flutter's engine
+ is arm64 only. Version 2 also turns on guard objects around freed
+ memory. checked-allocations is Memory Integrity Enforcement (hardware
+ memory tagging, M5 and later), enforced rather than in soft mode,
+ and enable-pure-data extends tagging to allocations without
+ pointers, where key material lives. hardened-heap pairs with the
+ typed allocators set in the Runner target and the Podfile. -->
+ <key>com.apple.security.hardened-process</key>
+ <true/>
+ <key>com.apple.security.hardened-process.enhanced-security-version-string</key>
+ <string>2</string>
+ <key>com.apple.security.hardened-process.platform-restrictions-string</key>
+ <string>2</string>
+ <key>com.apple.security.hardened-process.dyld-ro</key>
+ <true/>
+ <key>com.apple.security.hardened-process.hardened-heap</key>
+ <true/>
+ <key>com.apple.security.hardened-process.checked-allocations</key>
+ <true/>
+ <key>com.apple.security.hardened-process.checked-allocations.enable-pure-data</key>
+ <true/>
</dict>
</plist>
### macos/Runner/MainFlutterWindow.swift
@@ -2,6 +2,9 @@ import Cocoa
import FlutterMacOS
class MainFlutterWindow: NSWindow {
+ // FIDO2 security keys (YubiKit over USB HID) for FHSE wallet-file encryption.
+ private var securityKeyChannel: SecurityKeyChannel?
+
override func awakeFromNib() {
let flutterViewController = FlutterViewController()
let windowFrame = self.frame
@@ -12,6 +15,7 @@ class MainFlutterWindow: NSWindow {
self.minSize = NSSize(width: 900, height: 640)
RegisterGeneratedPlugins(registry: flutterViewController)
+ securityKeyChannel = SecurityKeyChannel(messenger: flutterViewController.engine.binaryMessenger)
super.awakeFromNib()
}
### macos/Runner/Release.entitlements
@@ -4,5 +4,38 @@
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
+ <!-- Outgoing connections: nodes, LWS, Tor, price and fiat APIs. -->
+ <key>com.apple.security.network.client</key>
+ <true/>
+ <!-- FIDO2 security keys over USB HID (YubiKit), for FHSE. -->
+ <key>com.apple.security.device.usb</key>
+ <true/>
+ <key>com.apple.security.files.user-selected.read-write</key>
+ <true/>
+ <key>com.apple.security.files.bookmarks.app-scope</key>
+ <true/>
+ <!-- Enhanced Security (macOS 26 and later; earlier versions ignore these),
+ as on iOS: all of it except pointer authentication, which needs
+ every binary in the process built for arm64e, and Flutter's engine
+ is arm64 only. Version 2 also turns on guard objects around freed
+ memory. checked-allocations is Memory Integrity Enforcement (hardware
+ memory tagging, M5 and later), enforced rather than in soft mode,
+ and enable-pure-data extends tagging to allocations without
+ pointers, where key material lives. hardened-heap pairs with the
+ typed allocators set in the Runner target and the Podfile. -->
+ <key>com.apple.security.hardened-process</key>
+ <true/>
+ <key>com.apple.security.hardened-process.enhanced-security-version-string</key>
+ <string>2</string>
+ <key>com.apple.security.hardened-process.platform-restrictions-string</key>
+ <string>2</string>
+ <key>com.apple.security.hardened-process.dyld-ro</key>
+ <true/>
+ <key>com.apple.security.hardened-process.hardened-heap</key>
+ <true/>
+ <key>com.apple.security.hardened-process.checked-allocations</key>
+ <true/>
+ <key>com.apple.security.hardened-process.checked-allocations.enable-pure-data</key>
+ <true/>
</dict>
</plist>
### monero_c
@@ -1 +1 @@
-Subproject commit 0f01328816eb671ff9e4f79a3c0c15990006fb12
+Subproject commit c210839a278a16382e1e23bef7f23b915569e2a8
### pubspec.lock
@@ -130,6 +130,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.2"
+ code_assets:
+ dependency: transitive
+ description:
+ name: code_assets
+ sha256: bf394f466ba9205f1812a0433b392d6af280f155f56651eda7c18cc32ed493b8
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.1"
collection:
dependency: transitive
description:
@@ -162,22 +170,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.7"
- cupertino_icons:
- dependency: "direct main"
- description:
- name: cupertino_icons
- sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
- url: "https://pub.dev"
- source: hosted
- version: "1.0.8"
- dart_date:
- dependency: "direct main"
- description:
- name: dart_date
- sha256: "629ba0a6e10ac48f57104c17a49228ba185253e4ab9f752c32fafc5e06281678"
- url: "https://pub.dev"
- source: hosted
- version: "1.5.3"
dbus:
dependency: transitive
description:
@@ -202,6 +194,15 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
+ fhse_native:
+ dependency: transitive
+ description:
+ path: "."
+ ref: "7aad37cb20b9cc7a545e0e3d044d18664a99d636"
+ resolved-ref: "7aad37cb20b9cc7a545e0e3d044d18664a99d636"
+ url: "https://github.com/MAGICGrants/fhse_native"
+ source: git
+ version: "0.1.0"
file:
dependency: transitive
description:
@@ -210,6 +211,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "7.0.1"
+ file_selector:
+ dependency: transitive
+ description:
+ name: file_selector
+ sha256: bd15e43e9268db636b53eeaca9f56324d1622af30e5c34d6e267649758c84d9a
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.0"
+ file_selector_android:
+ dependency: transitive
+ description:
+ name: file_selector_android
+ sha256: "89243030ea4b3463fb402b44d5eeacc4ccb1c46a88870cb2a5080d693200c1ed"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.2+6"
+ file_selector_ios:
+ dependency: transitive
+ description:
+ name: file_selector_ios
+ sha256: "97269e5307a0ab813b1fa2430bada0a96e0afb74848417f8676f64ba5de0051c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.3+6"
file_selector_linux:
dependency: transitive
description:
@@ -234,6 +259,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.7.0"
+ file_selector_web:
+ dependency: transitive
+ description:
+ name: file_selector_web
+ sha256: "73181fbc5257776d8ecaa6a94ab3c8e920ad143b9132a6d984a9271dfc6928d3"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.9.5"
file_selector_windows:
dependency: transitive
description:
@@ -321,14 +354,6 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
- flutter_math_fork:
- dependency: transitive
- description:
- name: flutter_math_fork
- sha256: "6d5f2f1aa57ae539ffb0a04bb39d2da67af74601d685a161aff7ce5bda5fa407"
- url: "https://pub.dev"
- source: hosted
- version: "0.7.4"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
@@ -337,14 +362,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.33"
- flutter_riverpod:
- dependency: "direct main"
- description:
- name: flutter_riverpod
- sha256: "9532ee6db4a943a1ed8383072a2e3eeda041db5657cdf6d2acecf3c21ecbe7e1"
- url: "https://pub.dev"
- source: hosted
- version: "2.6.1"
flutter_secure_storage:
dependency: "direct main"
description:
@@ -424,14 +441,6 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
- gpt_markdown:
- dependency: "direct main"
- description:
- name: gpt_markdown
- sha256: "8174983f2ed7d8576d25810913e3afe3f8ffdaa3172c0c823b7cfc289b67f380"
- url: "https://pub.dev"
- source: hosted
- version: "1.1.4"
hashlib:
dependency: "direct overridden"
description:
@@ -456,6 +465,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.2.0"
+ hooks:
+ dependency: transitive
+ description:
+ name: hooks
+ sha256: eaac480a35ec0814146c2c48d96aaa829e0e44a7662c88ae84c9edf4bc35651f
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.0"
http:
dependency: "direct main"
description:
@@ -553,10 +570,10 @@ packages:
dependency: "direct main"
description:
name: intl
- sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5"
+ sha256: "1ca20c894b1717686a2319b8548763d812bc0aabdac580420a44c5178c57a867"
url: "https://pub.dev"
source: hosted
- version: "0.20.2"
+ version: "0.20.3"
js:
dependency: transitive
description:
@@ -645,14 +662,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.11"
+ logging:
+ dependency: transitive
+ description:
+ name: logging
+ sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.0"
matcher:
dependency: transitive
description:
name: matcher
- sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
+ sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
url: "https://pub.dev"
source: hosted
- version: "0.12.19"
+ version: "0.12.20"
material_color_utilities:
dependency: transitive
description:
@@ -665,10 +690,10 @@ packages:
dependency: transitive
description:
name: meta
- sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
+ sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9"
url: "https://pub.dev"
source: hosted
- version: "1.17.0"
+ version: "1.19.0"
mime:
dependency: transitive
description:
@@ -681,11 +706,19 @@ packages:
dependency: "direct main"
description:
path: "impls/monero.dart"
- ref: "0f01328816eb671ff9e4f79a3c0c15990006fb12"
- resolved-ref: "0f01328816eb671ff9e4f79a3c0c15990006fb12"
+ ref: c210839a278a16382e1e23bef7f23b915569e2a8
+ resolved-ref: c210839a278a16382e1e23bef7f23b915569e2a8
url: "https://github.com/magicgrants/monero_c"
source: git
version: "0.0.0"
+ native_toolchain_rust:
+ dependency: transitive
+ description:
+ name: native_toolchain_rust
+ sha256: "8469a0e32a47a5c84b7fd300de9fd0e8082aac76c37922986324f5082a58350d"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.6"
nested:
dependency: transitive
description:
@@ -774,54 +807,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.0"
- permission_handler:
- dependency: "direct main"
- description:
- name: permission_handler
- sha256: bc917da36261b00137bbc8896bf1482169cd76f866282368948f032c8c1caae1
- url: "https://pub.dev"
- source: hosted
- version: "12.0.1"
- permission_handler_android:
- dependency: transitive
- description:
- name: permission_handler_android
- sha256: "1e3bc410ca1bf84662104b100eb126e066cb55791b7451307f9708d4007350e6"
- url: "https://pub.dev"
- source: hosted
- version: "13.0.1"
- permission_handler_apple:
- dependency: transitive
- description:
- name: permission_handler_apple
- sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023
- url: "https://pub.dev"
- source: hosted
- version: "9.4.7"
- permission_handler_html:
- dependency: transitive
- description:
- name: permission_handler_html
- sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24"
- url: "https://pub.dev"
- source: hosted
- version: "0.1.3+5"
- permission_handler_platform_interface:
- dependency: transitive
- description:
- name: permission_handler_platform_interface
- sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878
- url: "https://pub.dev"
- source: hosted
- version: "4.3.0"
- permission_handler_windows:
- dependency: transitive
- description:
- name: permission_handler_windows
- sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
- url: "https://pub.dev"
- source: hosted
- version: "0.2.1"
petitparser:
dependency: transitive
description:
@@ -886,6 +871,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.1.5+1"
+ pub_semver:
+ dependency: transitive
+ description:
+ name: pub_semver
+ sha256: "261236774e8b1d69cfc6b9eabbc96c40f25e7a2d6b171f3385d4f65d5734fb24"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.1"
qr:
dependency: transitive
description:
@@ -902,14 +895,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.1.0"
- riverpod:
+ record_use:
dependency: transitive
description:
- name: riverpod
- sha256: "59062512288d3056b2321804332a13ffdd1bf16df70dcc8e506e411280a72959"
+ name: record_use
+ sha256: "1cb8564af8d43b464294411db9217f5ec04891c6f22ee2c32d73ae05e88a6bd2"
url: "https://pub.dev"
source: hosted
- version: "2.6.1"
+ version: "1.1.1"
screen_brightness:
dependency: "direct main"
description:
@@ -966,14 +959,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.0"
- screen_protector:
- dependency: "direct main"
- description:
- name: screen_protector
- sha256: "0b526fd945c2e9e405288a124bdca3012589d31c30f19bc15247e8826d6ff094"
- url: "https://pub.dev"
- source: hosted
- version: "1.5.2"
share_plus:
dependency: "direct main"
description:
@@ -1046,14 +1031,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.4.1"
- skeletonizer:
- dependency: "direct main"
- description:
- name: skeletonizer
- sha256: "5d2d44120916cc749ede54c236cef60c2478742806df0b1f065212f00721b185"
- url: "https://pub.dev"
- source: hosted
- version: "2.1.1"
sky_engine:
dependency: transitive
description: flutter
@@ -1075,14 +1052,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.12.1"
- state_notifier:
- dependency: transitive
- description:
- name: state_notifier
- sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb
- url: "https://pub.dev"
- source: hosted
- version: "1.0.0"
stream_channel:
dependency: transitive
description:
@@ -1127,18 +1096,10 @@ packages:
dependency: transitive
description:
name: test_api
- sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a"
+ sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11"
url: "https://pub.dev"
source: hosted
- version: "0.7.10"
- timeago:
- dependency: "direct main"
- description:
- name: timeago
- sha256: b05159406a97e1cbb2b9ee4faa9fb096fe0e2dfcd8b08fcd2a00553450d3422e
- url: "https://pub.dev"
- source: hosted
- version: "3.7.1"
+ version: "0.7.12"
timezone:
dependency: transitive
description:
@@ -1147,23 +1108,23 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.10.1"
+ toml:
+ dependency: transitive
+ description:
+ name: toml
+ sha256: "35a35f782228656a2af31e8c73d1353cc4ef3d683fd68af1111b44631879c05e"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.18.0"
tor_ffi_plugin:
dependency: "direct main"
description:
path: "."
- ref: c2706eeb66174273a4a98113d7a8cd910ba124e6
- resolved-ref: c2706eeb66174273a4a98113d7a8cd910ba124e6
- url: "https://github.com/cypherstack/tor"
+ ref: "72e455ffe1faecd5884bea7ec1da666f757a8f0e"
+ resolved-ref: "72e455ffe1faecd5884bea7ec1da666f757a8f0e"
+ url: "https://github.com/MAGICGrants/tor"
source: git
- version: "0.0.1"
- tuple:
- dependency: transitive
- description:
- name: tuple
- sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151
- url: "https://pub.dev"
- source: hosted
- version: "2.0.2"
+ version: "0.2.0"
typed_data:
dependency: transitive
description:
@@ -1248,10 +1209,10 @@ packages:
dependency: transitive
description:
name: vector_math
- sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
+ sha256: "92b9910f66ed1057fd4da7b040ae7c74cafacf885bdc81be496928d5049b032d"
url: "https://pub.dev"
source: hosted
- version: "2.2.0"
+ version: "2.4.3"
vm_service:
dependency: transitive
description:
@@ -1264,62 +1225,89 @@ packages:
dependency: "direct main"
description:
path: "packages/wallet_background"
- ref: "2c2c8a3cbd33e5c28b958c25c0d002158e3a1185"
- resolved-ref: "2c2c8a3cbd33e5c28b958c25c0d002158e3a1185"
+ ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
+ resolved-ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
+ url: "https://github.com/MAGICGrants/wallet-core"
+ source: git
+ version: "0.1.0"
+ wallet_backup:
+ dependency: "direct main"
+ description:
+ path: "packages/wallet_backup"
+ ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
+ resolved-ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
+ url: "https://github.com/MAGICGrants/wallet-core"
+ source: git
+ version: "0.1.0"
+ wallet_backup_platform:
+ dependency: "direct main"
+ description:
+ path: "packages/wallet_backup_platform"
+ ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
+ resolved-ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
url: "https://github.com/MAGICGrants/wallet-core"
source: git
version: "0.1.0"
wallet_domain:
dependency: "direct main"
description:
path: "packages/wallet_domain"
- ref: "2c2c8a3cbd33e5c28b958c25c0d002158e3a1185"
- resolved-ref: "2c2c8a3cbd33e5c28b958c25c0d002158e3a1185"
+ ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
+ resolved-ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
+ url: "https://github.com/MAGICGrants/wallet-core"
+ source: git
+ version: "0.1.0"
+ wallet_fhse:
+ dependency: "direct main"
+ description:
+ path: "packages/wallet_fhse"
+ ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
+ resolved-ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
url: "https://github.com/MAGICGrants/wallet-core"
source: git
version: "0.1.0"
wallet_fiat:
dependency: "direct main"
description:
path: "packages/wallet_fiat"
- ref: "2c2c8a3cbd33e5c28b958c25c0d002158e3a1185"
- resolved-ref: "2c2c8a3cbd33e5c28b958c25c0d002158e3a1185"
+ ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
+ resolved-ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
url: "https://github.com/MAGICGrants/wallet-core"
source: git
version: "0.1.0"
wallet_infra:
dependency: "direct main"
description:
path: "packages/wallet_infra"
- ref: "2c2c8a3cbd33e5c28b958c25c0d002158e3a1185"
- resolved-ref: "2c2c8a3cbd33e5c28b958c25c0d002158e3a1185"
+ ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
+ resolved-ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
url: "https://github.com/MAGICGrants/wallet-core"
source: git
version: "0.1.0"
wallet_monero:
dependency: "direct main"
description:
path: "packages/wallet_monero"
- ref: "2c2c8a3cbd33e5c28b958c25c0d002158e3a1185"
- resolved-ref: "2c2c8a3cbd33e5c28b958c25c0d002158e3a1185"
+ ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
+ resolved-ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
url: "https://github.com/MAGICGrants/wallet-core"
source: git
version: "0.1.0"
wallet_openalias:
dependency: "direct main"
description:
path: "packages/wallet_openalias"
- ref: "2c2c8a3cbd33e5c28b958c25c0d002158e3a1185"
- resolved-ref: "2c2c8a3cbd33e5c28b958c25c0d002158e3a1185"
+ ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
+ resolved-ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
url: "https://github.com/MAGICGrants/wallet-core"
source: git
version: "0.1.0"
wallet_ui:
dependency: "direct main"
description:
path: "packages/wallet_ui"
- ref: "2c2c8a3cbd33e5c28b958c25c0d002158e3a1185"
- resolved-ref: "2c2c8a3cbd33e5c28b958c25c0d002158e3a1185"
+ ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
+ resolved-ref: "583935b80f0ea28baf6cc4f6fea2635e485f8820"
url: "https://github.com/MAGICGrants/wallet-core"
source: git
version: "0.1.0"
@@ -1412,5 +1400,5 @@ packages:
source: hosted
version: "3.1.3"
sdks:
- dart: "3.11.5"
- flutter: "3.41.7"
+ dart: "3.13.5"
+ flutter: "3.47.7"
### pubspec.yaml
@@ -16,11 +16,11 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
-version: 2.1.0+413
+version: 2.2.0+414
environment:
- sdk: 3.11.5
- flutter: 3.41.7
+ sdk: 3.13.5
+ flutter: 3.47.7
flutter_launcher_icons:
android: true
@@ -48,89 +48,98 @@ dependencies:
tor_ffi_plugin:
git:
- url: https://github.com/cypherstack/tor
- ref: c2706eeb66174273a4a98113d7a8cd910ba124e6
+ url: https://github.com/MAGICGrants/tor
+ ref: 72e455ffe1faecd5884bea7ec1da666f757a8f0e
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
monero:
git:
url: https://github.com/magicgrants/monero_c
- ref: 0f01328816eb671ff9e4f79a3c0c15990006fb12
+ ref: c210839a278a16382e1e23bef7f23b915569e2a8
path: impls/monero.dart
# wallet-core packages; SHA-pinned for release, redirected to the local sibling
# clone by the gitignored pubspec_overrides.yaml for dev.
wallet_infra:
git:
url: https://github.com/MAGICGrants/wallet-core
- ref: 2c2c8a3cbd33e5c28b958c25c0d002158e3a1185
+ ref: 583935b80f0ea28baf6cc4f6fea2635e485f8820
path: packages/wallet_infra
wallet_domain:
git:
url: https://github.com/MAGICGrants/wallet-core
- ref: 2c2c8a3cbd33e5c28b958c25c0d002158e3a1185
+ ref: 583935b80f0ea28baf6cc4f6fea2635e485f8820
path: packages/wallet_domain
wallet_monero:
git:
url: https://github.com/MAGICGrants/wallet-core
- ref: 2c2c8a3cbd33e5c28b958c25c0d002158e3a1185
+ ref: 583935b80f0ea28baf6cc4f6fea2635e485f8820
path: packages/wallet_monero
wallet_openalias:
git:
url: https://github.com/MAGICGrants/wallet-core
- ref: 2c2c8a3cbd33e5c28b958c25c0d002158e3a1185
+ ref: 583935b80f0ea28baf6cc4f6fea2635e485f8820
path: packages/wallet_openalias
+ # FHSE: security keys guarding the wallet password.
+ wallet_fhse:
+ git:
+ url: https://github.com/MAGICGrants/wallet-core
+ ref: 583935b80f0ea28baf6cc4f6fea2635e485f8820
+ path: packages/wallet_fhse
+ # Metadata backup: payment destinations, tx keys and the address book.
+ wallet_backup:
+ git:
+ url: https://github.com/MAGICGrants/wallet-core
+ ref: 583935b80f0ea28baf6cc4f6fea2635e485f8820
+ path: packages/wallet_backup
+ wallet_backup_platform:
+ git:
+ url: https://github.com/MAGICGrants/wallet-core
+ ref: 583935b80f0ea28baf6cc4f6fea2635e485f8820
+ path: packages/wallet_backup_platform
wallet_background:
git:
url: https://github.com/MAGICGrants/wallet-core
- ref: 2c2c8a3cbd33e5c28b958c25c0d002158e3a1185
+ ref: 583935b80f0ea28baf6cc4f6fea2635e485f8820
path: packages/wallet_background
wallet_fiat:
git:
url: https://github.com/MAGICGrants/wallet-core
- ref: 2c2c8a3cbd33e5c28b958c25c0d002158e3a1185
+ ref: 583935b80f0ea28baf6cc4f6fea2635e485f8820
path: packages/wallet_fiat
wallet_ui:
git:
url: https://github.com/MAGICGrants/wallet-core
- ref: 2c2c8a3cbd33e5c28b958c25c0d002158e3a1185
+ ref: 583935b80f0ea28baf6cc4f6fea2635e485f8820
path: packages/wallet_ui
bip39:
git:
url: https://github.com/cypherstack/stack-bip39
ref: 0cd6d54e2860bea68fc50c801cb9db2a760192fb
- cupertino_icons: 1.0.8
path: 1.9.1
provider: 6.1.5+1
path_provider: 2.1.5
- dart_date: 1.5.3
qr_flutter: 4.1.0
share_plus: 11.1.0
- intl: 0.20.2
+ intl: 0.20.3
shared_preferences: 2.5.3
http: 1.6.0
workmanager: 0.9.0+3
flutter_foreground_task: 8.17.0
flutter_local_notifications: 19.5.0
- timeago: 3.7.1
- flutter_riverpod: 2.6.1
screen_brightness: 2.1.7
flutter_zxing: 2.3.0
camera: 0.12.0
- permission_handler: 12.0.1
flutter_svg: 2.2.3
- skeletonizer: 2.1.1
flutter_secure_storage: 9.2.4
local_auth: 2.3.0
flutter_launcher_icons: 0.14.4
- gpt_markdown: 1.1.4
polyseed: 0.0.7
bip32: 2.0.0
package_info_plus: 8.3.0
- screen_protector: 1.5.2
dependency_overrides:
hashlib: 1.19.2
### scripts/build-moneroc.sh
@@ -1,14 +1,22 @@
#!/usr/bin/env bash
#
-# Build monero_c's wallet2_api_c library for one target, at the FIXED
-# path /tmp/monero_c.
+# Build monero_c's wallet2_api_c library for one target, at a FIXED path:
+# /tmp/monero_c, or ~/Library/Caches/monero_c on macOS. Not /tmp there: CMake
+# always rewrites /private/tmp (the real path) to /tmp, so depends' staging
+# paths stop matching and the first package fails to install.
#
# Args:
-# $1 target (e.g. aarch64-linux-android, x86_64-linux-gnu, x86_64-w64-mingw32)
+# $1 target (e.g. aarch64-linux-android, x86_64-linux-gnu, x86_64-w64-mingw32,
+# aarch64-apple-darwin)
# $2 clone source (default: the local ./monero_c submodule; CI passes the remote URL)
#
# Run from the app repo root (needs pubspec.lock + scripts/reproducible.patch).
-# Output: /tmp/monero_c/monero_libwallet2_api_c/build/<target>/libwallet2_api_c.{so,dll}
+# Output: <path>/monero_libwallet2_api_c/build/<target>/libwallet2_api_c.{so,dll,dylib}
+#
+# macOS (on a Mac with Xcode, plus autoconf, automake, libtool, pkg-config and
+# xz): the app loads it from macos/Frameworks/monero_libwallet2_api_c.dylib,
+# copied there with `install_name_tool -id @rpath/monero_libwallet2_api_c.dylib`.
+# Apple silicon only; the macOS apps exclude x86_64.
#
set -euo pipefail
@@ -24,18 +32,26 @@ git config --global --add safe.directory '*'
git config --global user.name 'MAGIC Grants'
git config --global user.email 'info@magicgrants.org'
-rm -rf /tmp/monero_c
-git clone "$SRC" /tmp/monero_c
-git -C /tmp/monero_c checkout "$COMMIT"
+if [ "$(uname)" = Darwin ]; then
+ BUILD_DIR="$HOME/Library/Caches/monero_c"
+ JOBS="$(sysctl -n hw.logicalcpu)"
+else
+ BUILD_DIR=/tmp/monero_c
+ JOBS="$(nproc)"
+fi
+
+rm -rf "$BUILD_DIR"
+git clone "$SRC" "$BUILD_DIR"
+git -C "$BUILD_DIR" checkout "$COMMIT"
# Only the submodules a Monero build uses; the others are for other coins,
# and fetching them fails the build whenever one of their hosts is down.
-git -C /tmp/monero_c submodule update --init --recursive --force -- monero lwsf
+git -C "$BUILD_DIR" submodule update --init --recursive --force -- monero lwsf
-cd /tmp/monero_c
+cd "$BUILD_DIR"
# Pin the git-am committer date (baked into Monero's version string) + __DATE__/__TIME__.
export SOURCE_DATE_EPOCH="$(git log -1 --format=%ct)"
export GIT_COMMITTER_DATE="@$SOURCE_DATE_EPOCH"
./apply_patches.sh monero
patch -p1 < "$REPO/scripts/reproducible.patch"
unset MAKEFLAGS # use make's classic pipe jobserver (from reproducible.patch), not the fifo one
-./build_single.sh monero "$TARGET" -j"$(nproc)"
+./build_single.sh monero "$TARGET" -j"$JOBS"
### scripts/fdroid-build.sh
@@ -62,6 +62,10 @@ export PUB_CACHE=/tmp/skylight/.pub-cache
export CARGO_HOME=/tmp/skylight-cargo
# cargokit requires an NDK package.xml (absent in unzipped NDKs)
[ -f "$ANDROID_HOME/ndk/$NDK/package.xml" ] || touch "$ANDROID_HOME/ndk/$NDK/package.xml"
+# Flutter's build hooks (Tor) take the NDK from ANDROID_NDK_HOME, else the
+# newest one installed, and Tor's OpenSSL records its path; fdroidserver sets
+# it from the recipe's ndk:, and release.yml sets the same NDK and path.
+export ANDROID_NDK_HOME="$ANDROID_HOME/ndk/$NDK"
"$FLUTTER/bin/flutter" pub get --offline --enforce-lockfile
bash scripts/pin-rust-toolchain.sh
"$FLUTTER/bin/flutter" build apk --dart-define=DEMO_MODE=true --release --split-per-abi --target-platform="$PLATFORM"
### scripts/pin-rust-toolchain.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Pin cargokit's Rust toolchain for reproducible Rust-plugin builds (tor + openalias).
+# Pin cargokit's Rust toolchain for reproducible Rust-plugin builds (openalias).
#
# cargokit hardcodes the toolchain to "stable" and runs `rustup run stable cargo ...`
# — a MOVING channel, so the plugin would be built with whatever stable is latest at
@@ -9,9 +9,12 @@
# cargokit's config only allows the channel enum (stable/beta/nightly), not an exact
# version — so we patch the default in the package instead.
#
-# Both Rust plugins — tor_ffi_plugin and wallet_openalias — are git/pub
-# dependencies now, so their cargokit copies live in PUB_CACHE. We still scan the
-# in-repo plugins/ dir for any local path plugin, though there are none today.
+# wallet_openalias is a git dependency, so its cargokit copy lives in PUB_CACHE.
+# We still scan the in-repo plugins/ dir for any local path plugin, though there
+# are none today. tor_ffi_plugin no longer uses cargokit (since cypherstack/tor
+# native-0.2.0): its native-assets build hook builds with the toolchain pinned in
+# the package's own rust/rust-toolchain.toml and `cargo --locked`, and rustup
+# downloads that toolchain on first use.
#
# Run AFTER `flutter pub get` (so both packages are in PUB_CACHE) and BEFORE the
# flutter build. Idempotent; safe if the string is already pinned.
### scripts/repro/apk-repro-check.sh
@@ -91,7 +91,7 @@ docker run --rm \
export PUB_CACHE="$app/.pub-cache"
echo "==> [$app] flutter pub get..."
flutter pub get --enforce-lockfile
- echo "==> [$app] pinning cargokit toolchain (tor + openalias)..."
+ echo "==> [$app] pinning cargokit toolchain (openalias)..."
bash scripts/pin-rust-toolchain.sh
echo "==> [$app] flutter build apk (Rust + Dart AOT; slow, limited output)..."
flutter build apk --dart-define=DEMO_MODE=true --release --split-per-abi --target-platform="$PLATFORM"
### scripts/repro/check-tor-paths.sh
@@ -0,0 +1,59 @@
+#!/usr/bin/env bash
+#
+# Release tripwire for the Tor library (libtor_ffi_plugin.so).
+#
+# Tor's OpenSSL compiles in the absolute path of the NDK's clang ("compiler:")
+# and the Flutter build hook's directory (ENGINESDIR, MODULESDIR), whose name
+# is a hash of the hook's config, NDK paths included. F-Droid's rebuild can
+# only match the release when both name the same NDK and the same app path, so
+# this fails unless every APK's library names exactly those, no other absolute
+# path, and no wall-clock build time.
+#
+# Usage: scripts/repro/check-tor-paths.sh <app-dir> <ndk-dir> <apk>...
+# <app-dir> the fixed build path the release and fdroid-build.sh share
+# <ndk-dir> the NDK the build hooks were given (ANDROID_NDK_HOME)
+set -euo pipefail
+export LC_ALL=C
+usage='usage: scripts/repro/check-tor-paths.sh <app-dir> <ndk-dir> <apk>...'
+app=${1:?$usage}
+ndk=${2:?$usage}
+shift 2
+[ $# -gt 0 ] || { echo "$usage" >&2; exit 2; }
+hook_dir="$app/.dart_tool/hooks_runner/shared/tor_ffi_plugin/build/"
+# OpenSSL writes the build time as Perl's gmtime does: "Tue Oct 6 19:39:06 2026 UTC".
+today=$(LC_ALL=C date -u '+%a %b %e')
+lib=$(mktemp)
+trap 'rm -f "$lib"' EXIT
+
+status=0
+fail() { echo "$where: $1" >&2; status=1; }
+for apk in "$@"; do
+ entries=$(unzip -Z1 "$apk" 'lib/*/libtor_ffi_plugin.so' 2>/dev/null || true)
+ [ -n "$entries" ] || { where=$apk fail "no libtor_ffi_plugin.so"; continue; }
+ for entry in $entries; do
+ where="$(basename "$apk") $entry"
+ unzip -p "$apk" "$entry" > "$lib"
+
+ grep -a -q -F "compiler: $ndk/toolchains/" "$lib" ||
+ fail "OpenSSL was not compiled with the NDK at $ndk"
+
+ dirs=$(grep -a -o -E '(ENGINESDIR|MODULESDIR): "[^"]*"' "$lib" || true)
+ [ -n "$dirs" ] || fail "no ENGINESDIR or MODULESDIR found"
+ outside=$(printf '%s\n' "$dirs" | grep -v -F "\"$hook_dir" || true)
+ [ -z "$outside" ] || fail "OpenSSL's module directories are outside $hook_dir: $outside"
+
+ # Any other path from the build machine: a home directory (an unmapped
+ # cargo home), the SDK, a temporary or second build directory. The
+ # library's own constants (certificate and temp-file search paths such as
+ # /etc/ssl or /var/tmp) are not of these forms.
+ stray=$( (grep -a -o -E '/(root|home|Users|Volumes|tmp|opt/android-sdk|opt/cargo|private/var|private/tmp)/[!-~]{1,100}' "$lib"
+ grep -a -o -E '[!-~]{0,40}\.cargo/registry/[!-~]{1,40}' "$lib") |
+ grep -v -F -e "$ndk/toolchains/" -e "$hook_dir" | sort -u || true)
+ [ -z "$stray" ] || fail "names other build-machine paths: $(printf '%s\n' "$stray" | head -n 5)"
+
+ ! grep -a -q -F "built on: $today " "$lib" ||
+ fail "OpenSSL recorded today's date as its build time"
+ done
+done
+[ $status -eq 0 ] && echo "Tor library names only $ndk and $hook_dir in: $*"
+exit $status
### test/history_address_filter_test.dart
@@ -0,0 +1,71 @@
+import 'package:flutter_test/flutter_test.dart';
+import 'package:skylight_wallet/screens/history.dart';
+import 'package:wallet_domain/wallet_domain.dart';
+
+/// The history screen's address filter.
+///
+/// `recipients` is one list serving both directions (the wallet's own
+/// addresses on an incoming transaction, who was paid on an outgoing one), so
+/// the filter needs no direction branch. What is worth pinning is the two
+/// deliberate calls: change is matched, and nothing else is.
+TxDetails _tx({required List<TxRecipient> recipients, int direction = 0}) => TxDetails(
+ index: 0,
+ direction: direction,
+ hash: 'h',
+ amountBaseUnits: BigInt.one,
+ feeBaseUnits: BigInt.zero,
+ recipients: recipients,
+ accountIndex: 0,
+ subaddrIndexList: const [],
+ timestamp: 0,
+ height: 1,
+ confirmations: 1,
+ key: '',
+);
+
+void main() {
+ const alice = '8Alice';
+ const bob = '4Bob';
+
+ test('an incoming transaction received at the address matches', () {
+ final tx = _tx(recipients: [TxRecipient(alice, BigInt.one)]);
+ expect(txInvolvesAddress(tx, alice), isTrue);
+ });
+
+ test('an outgoing transaction that paid the address matches', () {
+ final tx = _tx(recipients: [TxRecipient(bob, BigInt.one)], direction: 1);
+ expect(txInvolvesAddress(tx, bob), isTrue);
+ });
+
+ test('change returned to the address matches', () {
+ // Deliberate: a spend that sent change back to this address involved it.
+ final tx = _tx(
+ recipients: [TxRecipient(bob, BigInt.one), TxRecipient(alice, BigInt.two, isChange: true)],
+ direction: 1,
+ );
+ expect(txInvolvesAddress(tx, alice), isTrue);
+ });
+
+ test('an unrelated transaction, or one with no recipients, does not match', () {
+ expect(txInvolvesAddress(_tx(recipients: [TxRecipient(bob, BigInt.one)]), alice), isFalse);
+ expect(txInvolvesAddress(_tx(recipients: const []), alice), isFalse);
+ });
+
+ test('matching is exact: no prefix, and base58 stays case-significant', () {
+ expect(
+ txInvolvesAddress(_tx(recipients: [TxRecipient('${alice}Extra', BigInt.one)]), alice),
+ isFalse,
+ );
+ expect(
+ txInvolvesAddress(_tx(recipients: [TxRecipient('4AbCd', BigInt.one)]), '4abcd'),
+ isFalse,
+ );
+ });
+
+ test('surrounding whitespace from a paste does not stop a match', () {
+ expect(
+ txInvolvesAddress(_tx(recipients: [TxRecipient(alice, BigInt.one)]), ' $alice\n'),
+ isTrue,
+ );
+ });
+}
### test/openalias_mode_test.dart
@@ -0,0 +1,77 @@
+import 'dart:io';
+
+import 'package:flutter_test/flutter_test.dart';
+import 'package:wallet_domain/wallet_domain.dart';
+import 'package:wallet_infra/testing.dart';
+import 'package:wallet_infra/wallet_infra.dart';
+import 'package:wallet_monero/wallet_monero.dart';
+import 'package:skylight_wallet/models/monero_wallet_adapter.dart';
+
+/// Skylight's send screen resolves names through this adapter, so the
+/// OpenAlias setting (Settings > Security and privacy) must reach it the same
+/// way it does in Spice: Clearnet-Only resolves with Tor off.
+void main() {
+ late Directory tmp;
+ late MoneroWalletAdapter adapter;
+ late List<int?> ports;
+
+ final address = '4${'a' * 94}';
+
+ setUpAll(() => WalletFileCrypto.kdf = const FastTestPbkdf2());
+ tearDownAll(() => WalletFileCrypto.kdf = const WebCryptoPbkdf2());
+
+ setUp(() async {
+ tmp = Directory.systemTemp.createTempSync('openalias_mode');
+ SharedPreferencesService.store = MemoryPreferenceStore();
+ WalletSecrets.store = MemorySecretStore();
+ WalletAppConfig.install(WalletAppConfig.skylight, directories: FixedDirectories(tmp));
+ useTestCaBundle();
+ WalletLog.sink = MemoryLogSink();
+ final backend = FakeMoneroBackend()..addressValidator = (a, _) => a == address;
+ final wallet = MoneroWallet(backend: backend);
+ backend.existingWalletPaths.add(await wallet.walletPathForType('lws'));
+ await wallet.openExisting(password: 'pw');
+ adapter = MoneroWalletAdapter(wallet, readStoredSeed: () async => null);
+
+ ports = [];
+ CryptoWallet.aliasResolver =
+ ({
+ required String alias,
+ required String network,
+ required String asset,
+ required int? socksPort,
+ String? nativeAsset,
+ }) async {
+ ports.add(socksPort);
+ return ResolvedAlias(address: address);
+ };
+ await TorSettingsService.sharedInstance.save(torMode: TorMode.disabled);
+ });
+
+ tearDown(() {
+ CryptoWallet.resetInjectablesForTesting();
+ TorSettingsService.sharedInstance.resetForTesting();
+ WalletAppConfig.resetForTesting();
+ CaBundle.resetForTesting();
+ SharedPreferencesService.resetForTesting();
+ tmp.deleteSync(recursive: true);
+ });
+
+ test('Clearnet-Only resolves with Tor off, without a proxy', () async {
+ await OpenAliasMode.clearnet.save();
+ final resolved = await adapter.resolveOpenAlias('donate.example.org');
+ expect(resolved?.address, address);
+ expect(ports, [null]);
+ });
+
+ test('Tor-Only with Tor off resolves nothing, and never asks', () async {
+ expect(await adapter.resolveOpenAlias('donate.example.org'), isNull);
+ expect(ports, isEmpty);
+ });
+
+ test('Disabled resolves nothing, and never asks', () async {
+ await OpenAliasMode.disabled.save();
+ expect(await adapter.resolveOpenAlias('donate.example.org'), isNull);
+ expect(ports, isEmpty);
+ });
+}
### test/route_policy_test.dart
@@ -0,0 +1,56 @@
+import 'package:flutter_test/flutter_test.dart';
+import 'package:skylight_wallet/main.dart' show appRouteNames;
+import 'package:skylight_wallet/route_policy.dart';
+import 'package:wallet_ui/wallet_ui.dart' show RouteAccess;
+
+/// The route policy (lib/route_policy.dart) is deny by default, so it must name
+/// every route, and the public ones are pinned here: making a screen reachable
+/// before the unlock should be a decision, not an accident.
+void main() {
+ test('every route says who may open it, and nothing else is listed', () {
+ final c = routePolicy.check(appRouteNames);
+ expect(c.unlisted, isEmpty, reason: 'add these to lib/route_policy.dart');
+ expect(c.stale, isEmpty, reason: 'remove these from lib/route_policy.dart');
+ });
+
+ test('only onboarding, the lock screens and the legal pages are public', () {
+ final public = {
+ for (final e in routePolicy.access.entries)
+ if (e.value == RouteAccess.public) e.key,
+ };
+ expect(public, {
+ '/welcome',
+ '/tor_settings',
+ '/fiat_api_setup',
+ '/connection_setup',
+ '/create_wallet',
+ '/create_wallet_password',
+ '/generate_seed',
+ '/restore_wallet',
+ '/scan_qr',
+ '/unlock',
+ '/security_key_unlock',
+ '/terms_of_service',
+ '/privacy_policy',
+ });
+ });
+
+ test('every wallet screen waits for the unlock', () {
+ for (final name in [
+ '/wallet_home',
+ '/send',
+ '/receive',
+ '/address_book',
+ '/history',
+ '/settings',
+ '/lws_details',
+ '/lws_keys',
+ '/secret_keys',
+ '/advanced_security',
+ '/metadata_backup',
+ ]) {
+ expect(routePolicy.requiresUnlock(name), isTrue, reason: name);
+ expect(routePolicy.allows(name, unlocked: false), isFalse, reason: name);
+ }
+ });
+}
### test/send_contact_paste_test.dart
@@ -0,0 +1,243 @@
+// Desktop Send keeps a contact's name on that contact's own address only (MAGIC
+// Grants AI audit 2026-10-20, M-03). The desktop form keeps Paste beside the
+// contact card, and pressing it used to leave the contact's name over the
+// clipboard's address, through to the confirm sheet, while the tx paid the
+// clipboard's address.
+//
+// Runs where the desktop form does: a Linux, macOS or Windows host
+// (`isDesktopLayout`). Nothing leaves the machine: the Monero wallet is
+// wallet-core's FakeMoneroBackend and the clipboard is a mocked platform call.
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_localizations/flutter_localizations.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:provider/provider.dart';
+import 'package:wallet_domain/wallet_domain.dart';
+import 'package:wallet_infra/testing.dart';
+import 'package:wallet_infra/wallet_infra.dart';
+import 'package:wallet_monero/wallet_monero.dart';
+
+import 'package:skylight_wallet/l10n/app_localizations.dart';
+import 'package:skylight_wallet/models/fiat_rate_model.dart';
+import 'package:skylight_wallet/screens/send.dart';
+import 'package:skylight_wallet/widgets/ui/ui.dart'
+ show BrandButton, ConfirmSendView, SendAmountCard;
+
+void main() {
+ late Directory tmp;
+ late FakeMoneroBackend backend;
+ late WalletManager manager;
+ late ContactModel contacts;
+
+ // Stand-ins for Monero addresses (this backend's validator accepts any 95
+ // characters starting with '4').
+ final alice = '4${'A' * 94}';
+ final pasted = '4${'Z' * 94}';
+ final aliceContact = Contact(id: 'c1', name: 'Alice', addresses: {'XMR': alice});
+
+ final onDesktop = Platform.isLinux || Platform.isMacOS || Platform.isWindows;
+
+ setUpAll(() => WalletFileCrypto.kdf = const FastTestPbkdf2());
+ tearDownAll(() => WalletFileCrypto.kdf = const WebCryptoPbkdf2());
+
+ setUp(() async {
+ tmp = Directory.systemTemp.createTempSync('send_contact_paste');
+ SharedPreferencesService.store = MemoryPreferenceStore();
+ WalletSecrets.store = MemorySecretStore();
+ WalletAppConfig.install(WalletAppConfig.skylight, directories: FixedDirectories(tmp));
+ useTestCaBundle();
+ WalletLog.sink = MemoryLogSink();
+ backend = FakeMoneroBackend()
+ ..addressValidator = ((a, _) => a.length == 95 && a.startsWith('4'));
+ final wallet = MoneroWallet(backend: backend);
+ backend.existingWalletPaths.add(await wallet.walletPathForType('lws'));
+ await wallet.openExisting(password: 'pw');
+ // 10 XMR spendable, so the form can be submitted.
+ // ignore: invalid_use_of_protected_member
+ wallet.setUnlockedBalanceBaseUnits(BigInt.from(10) * BigInt.from(10).pow(12));
+ backend.pendingAmount = BigInt.from(10).pow(12);
+ backend.pendingFee = BigInt.from(30000000);
+ manager = WalletManager(coins: () => [wallet]);
+ contacts = ContactModel(
+ read: () async => [json.encode(aliceContact.toJson())],
+ write: (_) async {},
+ );
+ await contacts.load();
+ });
+
+ tearDown(() {
+ WalletAppConfig.resetForTesting();
+ CaBundle.resetForTesting();
+ SharedPreferencesService.resetForTesting();
+ tmp.deleteSync(recursive: true);
+ });
+
+ String short(String a) => '${a.substring(0, 10)}…${a.substring(a.length - 12)}';
+
+ Future<void> settle(WidgetTester tester) async {
+ for (var i = 0; i < 20; i++) {
+ await tester.pump(const Duration(milliseconds: 100));
+ }
+ }
+
+ /// Opens Send; with [args], as the address book's Send opens it.
+ Future<void> openSend(WidgetTester tester, {SendScreenArgs? args}) async {
+ // The clipboard holds an address the user did not mean (or a clipboard
+ // hijacker put there).
+ tester.binding.defaultBinaryMessenger.setMockMethodCallHandler(SystemChannels.platform, (
+ call,
+ ) async {
+ if (call.method == 'Clipboard.getData') return <String, dynamic>{'text': pasted};
+ return null;
+ });
+
+ // The test font (Ahem) is wider than the app's, so the fixed-width desktop
+ // sidebar overflows; that layout warning is not what these tests are about.
+ final previousOnError = FlutterError.onError;
+ FlutterError.onError = (details) {
+ if (details.exceptionAsString().contains('A RenderFlex overflowed')) return;
+ previousOnError?.call(details);
+ };
+ addTearDown(() => FlutterError.onError = previousOnError);
+
+ await tester.binding.setSurfaceSize(const Size(1400, 1000));
+ addTearDown(() => tester.binding.setSurfaceSize(null));
+ await tester.pumpWidget(
+ MultiProvider(
+ providers: [
+ ChangeNotifierProvider<WalletManager>.value(value: manager),
+ ChangeNotifierProvider<ContactModel>.value(value: contacts),
+ ChangeNotifierProvider<FiatRateModel>(create: (_) => FiatRateModel()),
+ ],
+ child: MaterialApp(
+ localizationsDelegates: const [
+ AppLocalizations.delegate,
+ GlobalMaterialLocalizations.delegate,
+ GlobalWidgetsLocalizations.delegate,
+ GlobalCupertinoLocalizations.delegate,
+ ],
+ supportedLocales: AppLocalizations.supportedLocales,
+ onGenerateRoute: (settings) => MaterialPageRoute(
+ settings: RouteSettings(name: '/send', arguments: args),
+ builder: (_) => const SendScreen(),
+ ),
+ ),
+ ),
+ );
+ await tester.pump(const Duration(milliseconds: 100));
+ }
+
+ AppLocalizations l10n(WidgetTester tester) =>
+ AppLocalizations.of(tester.element(find.byType(SendScreen)))!;
+
+ /// Picks Alice in Send's own contact picker.
+ Future<void> pickAlice(WidgetTester tester) async {
+ await tester.tap(find.text(l10n(tester).sendContactsButton));
+ await settle(tester);
+ await tester.tap(find.text('Alice'));
+ await settle(tester);
+ }
+
+ /// Enters 1 XMR and presses Send, which opens the confirm sheet.
+ Future<void> sendOneXmr(WidgetTester tester) async {
+ await tester.enterText(
+ find.descendant(of: find.byType(SendAmountCard), matching: find.byType(TextField)),
+ '1',
+ );
+ await settle(tester);
+ final sendButton = find.widgetWithText(BrandButton, l10n(tester).sendSendButton);
+ expect(sendButton, findsOneWidget);
+ await tester.tap(sendButton);
+ await settle(tester);
+ expect(find.byType(ConfirmSendView), findsOneWidget);
+ }
+
+ Finder onConfirmSheet(Finder finder) =>
+ find.descendant(of: find.byType(ConfirmSendView), matching: finder);
+
+ Future<void> tearDownScreen(WidgetTester tester) async {
+ await tester.pumpWidget(const SizedBox());
+ await tester.pump(const Duration(seconds: 5));
+ }
+
+ for (final viaPicker in [false, true]) {
+ final how = viaPicker ? "Send's contact picker" : "the address book's Send";
+ testWidgets('Paste after a contact from $how replaces the contact', (tester) async {
+ await openSend(
+ tester,
+ args: viaPicker ? null : SendScreenArgs(destinationAddress: alice, contact: aliceContact),
+ );
+ if (viaPicker) await pickAlice(tester);
+
+ // Before: the contact card names Alice over her address, with Paste beside it.
+ expect(find.text('Alice'), findsOneWidget);
+ expect(find.text(short(alice)), findsOneWidget);
+ final paste = find.text(l10n(tester).sendPasteButton);
+ expect(paste, findsOneWidget);
+
+ await tester.tap(paste);
+ await tester.pump(const Duration(milliseconds: 100));
+
+ // After: the contact is gone and the card is the address field again,
+ // holding the clipboard's address.
+ expect(find.text('Alice'), findsNothing);
+ expect(find.text(short(alice)), findsNothing);
+ final addressField = find
+ .byType(TextField)
+ .evaluate()
+ .map((e) => e.widget as TextField)
+ .where((f) => f.controller?.text == pasted);
+ expect(addressField, hasLength(1));
+
+ await sendOneXmr(tester);
+
+ // The tx pays the clipboard's address, and the confirm sheet shows that
+ // address without the contact's name.
+ expect(backend.createTransactionRequests.last.destinations, [pasted]);
+ expect(onConfirmSheet(find.text(pasted, findRichText: true)), findsOneWidget);
+ expect(onConfirmSheet(find.textContaining('Alice')), findsNothing);
+ expect(find.text('(Alice)'), findsNothing);
+
+ await tearDownScreen(tester);
+ }, skip: !onDesktop);
+ }
+
+ testWidgets('a contact with nothing pasted still names its address on the confirm sheet', (
+ tester,
+ ) async {
+ await openSend(
+ tester,
+ args: SendScreenArgs(destinationAddress: alice, contact: aliceContact),
+ );
+ expect(find.text('Alice'), findsOneWidget);
+
+ await sendOneXmr(tester);
+
+ expect(backend.createTransactionRequests.last.destinations, [alice]);
+ expect(onConfirmSheet(find.text(alice, findRichText: true)), findsOneWidget);
+ expect(onConfirmSheet(find.text('(Alice)')), findsOneWidget);
+
+ await tearDownScreen(tester);
+ }, skip: !onDesktop);
+
+ testWidgets('a contact handed in with an address that is not theirs is not shown', (
+ tester,
+ ) async {
+ // The contact arrives after the text, so the field's listener never sees it.
+ await openSend(
+ tester,
+ args: SendScreenArgs(destinationAddress: pasted, contact: aliceContact),
+ );
+ expect(find.text('Alice'), findsNothing);
+
+ await sendOneXmr(tester);
+
+ expect(backend.createTransactionRequests.last.destinations, [pasted]);
+ expect(find.text('(Alice)'), findsNothing);
+
+ await tearDownScreen(tester);
+ }, skip: !onDesktop);
+}
### windows/CMakeLists.txt
@@ -45,6 +45,11 @@ 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>")
+ # Control Flow Guard, for the runner and the plugins built with these
+ # settings: an indirect call may only reach a real function entry point.
+ # Not /CETCOMPAT; see HardenProcess in runner/main.cpp.
+ target_compile_options(${TARGET} PRIVATE /guard:cf)
+ target_link_options(${TARGET} PRIVATE /guard:cf)
endfunction()
# Flutter library and tool build rules.
### windows/flutter/generated_plugin_registrant.cc
@@ -9,7 +9,6 @@
#include <file_selector_windows/file_selector_windows.h>
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
#include <local_auth_windows/local_auth_plugin.h>
-#include <permission_handler_windows/permission_handler_windows_plugin.h>
#include <screen_brightness_windows/screen_brightness_windows_plugin.h>
#include <share_plus/share_plus_windows_plugin_c_api.h>
#include <url_launcher_windows/url_launcher_windows.h>
@@ -22,8 +21,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
LocalAuthPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("LocalAuthPlugin"));
- PermissionHandlerWindowsPluginRegisterWithRegistrar(
- registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
ScreenBrightnessWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ScreenBrightnessWindowsPlugin"));
SharePlusWindowsPluginCApiRegisterWithRegistrar(
### windows/flutter/generated_plugins.cmake
@@ -6,17 +6,16 @@ list(APPEND FLUTTER_PLUGIN_LIST
file_selector_windows
flutter_secure_storage_windows
local_auth_windows
- permission_handler_windows
screen_brightness_windows
share_plus
url_launcher_windows
webcrypto
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
+ fhse_native
flutter_local_notifications_windows
flutter_zxing
- tor_ffi_plugin
wallet_openalias
)
### windows/runner/main.cpp
@@ -5,8 +5,40 @@
#include "flutter_window.h"
#include "utils.h"
+namespace {
+
+// Process-wide mitigations, applied before any other code runs.
+//
+// DLLs load only from the application directory and System32, not from the
+// working directory or PATH, so a DLL planted there is never picked up. None
+// may come from a network share or a low-integrity file, and System32's copy
+// wins over a same-named DLL dropped next to the app. The app opens its own
+// DLLs by bare name from its directory, and Windows' by System32 path, so
+// neither is affected.
+//
+// Not hardware shadow stacks (/CETCOMPAT): the Dart VM unwinds to an
+// exception handler by resetting the stack pointer, which a shadow stack
+// rejects.
+void HardenProcess() {
+ ::SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
+
+ PROCESS_MITIGATION_IMAGE_LOAD_POLICY image_load = {};
+ image_load.NoRemoteImages = 1;
+ image_load.NoLowMandatoryLabelImages = 1;
+ image_load.PreferSystem32Images = 1;
+ ::SetProcessMitigationPolicy(ProcessImageLoadPolicy, &image_load,
+ sizeof(image_load));
+
+ // End the process on heap corruption rather than carry on.
+ ::HeapSetInformation(nullptr, HeapEnableTerminationOnCorruption, nullptr, 0);
+}
+
+} // namespace
+
int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
_In_ wchar_t *command_line, _In_ int show_command) {
+ HardenProcess();
+
// Attach to console when present (e.g., 'flutter run') or create a
// new console when running with a debugger.
if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {Why this scored 33/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.