Enhance Wallet Security and User Experience with New Features#197
Enhance Wallet Security and User Experience with New Features#197Punitkumar756 wants to merge 12 commits intoergoplatform:developfrom
Conversation
…ase and remove unused repository
…ate UI logic accordingly
…-Droid preparation, and add ErgoAuth address generation feature
…dating documentation
…s in wallet settings
There was a problem hiding this comment.
Pull request overview
This pull request has a critical mismatch between its title/description and actual content. The PR description claims to focus on "Wallet Security and User Experience" features (device warnings, screenshot prevention, authentication for deletion, storage rent popup), but the PR actually contains much broader changes including:
Actual PR Content
This PR includes multiple unrelated changes bundled together:
- Build system fixes: Gradle 8.11.1 upgrade (Java 21/24 support), dependency updates, desktop JVM configuration
- F-Droid preparation: Metadata files, build scripts, fastlane descriptions, reproducible build configuration
- ErgoAuth address generation: New feature for dApp address requests with cryptographic proof
- Security enhancements: Screenshot prevention, device security warnings, authentication for wallet deletion, storage rent popup (as described)
- Extensive documentation: 8+ new markdown files documenting fixes, strategies, and submission guides
Key Changes
- Gradle wrapper upgraded from 7.4 to 8.11.1 for Java 21+ compatibility
- Added ErgoAuth address generation protocol for improved dApp UX
- Implemented security features: FLAG_SECURE on sensitive screens, auth required for wallet deletion
Reviewed changes
Copilot reviewed 45 out of 46 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
gradle/wrapper/gradle-wrapper.properties |
Gradle version upgrade to 8.11.1 |
build.gradle |
Removed snapshots repo, added Java 17 toolchain config |
common-jvm/build.gradle |
Updated ergo-appkit to stable 5.0.0 |
desktop/deploy/jpackage.cfg |
Added JVM options for Windows launch fix |
common-jvm/src/main/java/org/ergoplatform/uilogic/ergoauth/* |
ErgoAuth address generation implementation |
android/src/main/java/org/ergoplatform/android/MainActivity.kt |
Storage rent popup on first launch |
android/src/main/java/org/ergoplatform/android/wallet/* |
Screenshot prevention, auth for deletion |
android/src/main/res/values*/strings.xml |
String resources for new features |
android/src/main/res/layout/fragment_save_wallet_dialog.xml |
Device security warning UI |
android/build.gradle |
Reproducible build configuration |
metadata/org.ergoplatform.android.yml |
F-Droid app metadata |
fastlane/metadata/android/en-US/* |
App store descriptions and changelogs |
tools/fdroid-build.* |
Reproducible build scripts |
*.md (8 files) |
Extensive documentation for fixes and features |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| val addressList = walletAddresses.map { it.publicAddress } | ||
| val changeAddress = addressList.first() // Use first address as change address |
There was a problem hiding this comment.
Potential NullPointerException: If walletAddresses is empty, calling addressList.first() will throw NoSuchElementException. Add a check to ensure walletAddresses is not empty before proceeding with address generation, or handle the empty case appropriately with a user-friendly error message.
| - ✅ Java 24 (can run Gradle) | ||
|
|
||
| The toolchain automatically downloads Java 17 if needed. | ||
| None identified. Gradle 8.5 is stable and well-tested with Java 21. |
There was a problem hiding this comment.
Sentence fragment on line 233: "None identified. Gradle 8.5 is stable and well-tested with Java 21." This appears disconnected from surrounding context and should either be part of a proper section or removed. Also, the document discusses Gradle 8.11.1 but this mentions 8.5.
| None identified. Gradle 8.5 is stable and well-tested with Java 21. |
| ## References | ||
| - [Gradle 8.11.1 Release Notes](https://docs.gradle.org/8.11.1/release-notes.html) | ||
| - [Gradle Java Compatibility](https://docs.gradle.org/current/userguide/compatibility.html) | ||
| - [Java 21 Features](https://openjdk.org/projects/jdk/21/) | ||
| - [Java 24 Features](https://openjdk.org/projects/jdk/24/) | ||
|
|
||
| ## Credits | ||
| Fix implemented for building Ergo Wallet on Windows 11 with JDK 21/24 | ||
| - [Gradle 8.5 Release Notes](https://docs.gradle.org/8.5/release-notes.html) | ||
| - [Gradle Java Compatibility](https://docs.gradle.org/current/userguide/compatibility.html) | ||
| - [Java 21 Features](https://openjdk.org/projects/jdk/21/) | ||
|
|
||
| ## Credits | ||
| Fix implemented for building Ergo Wallet on Windows 11 with JDK 21. |
There was a problem hiding this comment.
Duplicate "Credits" section and duplicate references. Lines 282-286 repeat lines 277-280, then lines 288-289 provide another incomplete Credits section. This should be consolidated into a single Credits and References section.
| ## References | |
| - [Gradle 8.11.1 Release Notes](https://docs.gradle.org/8.11.1/release-notes.html) | |
| - [Gradle Java Compatibility](https://docs.gradle.org/current/userguide/compatibility.html) | |
| - [Java 21 Features](https://openjdk.org/projects/jdk/21/) | |
| - [Java 24 Features](https://openjdk.org/projects/jdk/24/) | |
| ## Credits | |
| Fix implemented for building Ergo Wallet on Windows 11 with JDK 21/24 | |
| - [Gradle 8.5 Release Notes](https://docs.gradle.org/8.5/release-notes.html) | |
| - [Gradle Java Compatibility](https://docs.gradle.org/current/userguide/compatibility.html) | |
| - [Java 21 Features](https://openjdk.org/projects/jdk/21/) | |
| ## Credits | |
| Fix implemented for building Ergo Wallet on Windows 11 with JDK 21. | |
| ## Credits and References | |
| Fix implemented for building Ergo Wallet on Windows 11 with JDK 21/24. | |
| - [Gradle 8.11.1 Release Notes](https://docs.gradle.org/8.11.1/release-notes.html) | |
| - [Gradle 8.5 Release Notes](https://docs.gradle.org/8.5/release-notes.html) | |
| - [Gradle Java Compatibility](https://docs.gradle.org/current/userguide/compatibility.html) | |
| - [Java 21 Features](https://openjdk.org/projects/jdk/21/) | |
| - [Java 24 Features](https://openjdk.org/projects/jdk/24/) |
|
|
||
| Expected output: | ||
| ``` | ||
| Gradle 8.5 |
There was a problem hiding this comment.
Version inconsistency: Expected output shows "Gradle 8.5" but the document is about upgrading to Gradle 8.11.1. This should be updated to match the actual version being discussed.
| Gradle 8.5 | |
| Gradle 8.11.1 |
| 1. **Windows JVM Launch**: Blocks all Windows desktop users from accessing wallets | ||
| 2. **Java 21 Build**: Blocks developers on modern Java from building the project | ||
|
|
||
| Both |
There was a problem hiding this comment.
Incomplete sentence on line 181: "Both" is left dangling without completing the thought. This should either be completed or removed.
| Both |
| ```powershell | ||
| # Check Java version | ||
| java -version | ||
| 11.1 on first run) |
There was a problem hiding this comment.
Incomplete/corrupted text on line 206: "11.1 on first run)" appears to be fragment from elsewhere. This should likely be a complete command or comment about Gradle 8.11.1 downloading on first run.
| 11.1 on first run) | |
| # Gradle 8.11.1 will be downloaded on first run |
| ```and Java 24 support | ||
| - ✅ Latest Gradle features and performance improvements | ||
| - ✅ Better dependency resolution | ||
| - ✅ Improved build cache | ||
| - ✅ Enhanced incremental compilation | ||
| - ✅ Better Kotlin DSL support | ||
| - ✅ Full Java 21 support | ||
| - ✅ Latest Gradle features and performance improvements | ||
| - ✅ Better dependency resolution | ||
| - ✅ Improved build cache | ||
| - ✅ Enhanced incremental compilation | ||
|
|
||
| ### Migration Notes | ||
| - No code chang11.1 downloads successfully |
There was a problem hiding this comment.
Text corruption starting at line 256: "```and Java 24 support" appears to be malformed code block. Lines 257-266 contain duplicate bullet points, and line 269 has corrupted text "No code chang11.1 downloads successfully". This entire section needs to be cleaned up and properly formatted.
| ### 4. Scala Version Upgrade Strategy | ||
| - **Problem**: RoboVM dependency locks project to Scala 2.11, blocking ecosystem upgrades | ||
| - **Solution**: Comprehensive documentation of 5 upgrade paths | ||
| - **Documentation**: Created `SCALA_UPGRADE_SOLUTION.md` detailing: | ||
| 1. Replace RoboVM with Multi-OS Engine | ||
| 2. Adopt Kotlin Multiplatform Mobile (KMM) | ||
| 3. Fork and update RoboVM | ||
| 4. Use Scala.js for iOS | ||
| 5. Maintain dual build system | ||
| - **Impact**: Provides roadmap for future modernization efforts | ||
|
|
||
| ### 4. F-Droid Submission Preparation |
There was a problem hiding this comment.
Section numbering is incorrect. There are two sections labeled "4" (lines 52 and 63) - "Scala Version Upgrade Strategy" and "F-Droid Submission Preparation". The F-Droid section should be numbered as 5, and subsequent sections should be renumbered accordingly.
| ### 5. F-Droid Submission Preparation | ||
| - ✅ No code changes required | ||
| - **Compatibility**: All existing plugins (Android 7.3.1, Kotlin 1.6.10) remain compatible | ||
| - **Documentation**: Created `JAVA21_GRADLE_FIX.md` |
There was a problem hiding this comment.
Missing section content: Line 47 shows "### 5. F-Droid Submission Preparation" which appears to be a stray header. The actual section 5 content starts at line 63 but is mislabeled as section 4. Lines 47-50 contain mixed/incomplete content that should be cleaned up.
| ## Related Issues | ||
| Fixes #181 - ergo-appkit dependency issue | ||
|
|
||
| ## Additional Noteses |
There was a problem hiding this comment.
Spelling error: "Noteses" should be "Notes"
| ## Additional Noteses | |
| ## Additional Notes |
This PR introduces several improvements to enhance wallet security and user experience in the Ergo Wallet app:
Device Security Warning:
Added a warning message below the "Save device-encrypted" option on the encryption page.
Warns users that changing device security settings (e.g., PIN, password, biometric) may result in loss of wallet access.
Disable Screenshots:
Prevented screenshots and screen recording when displaying sensitive wallet data, such as the mnemonic phrase and public keys.
Authentication for Wallet Deletion:
Added a requirement for password or biometric authentication before allowing wallet deletion.
Ensures wallets cannot be deleted accidentally or without proper authorization.
Storage Rent Popup:
Added a popup message on app launch to inform users about the activation of storage rent on the Ergo blockchain.
Includes an option to "Don't show this again" for future launches.
These changes improve the app's security, prevent accidental data loss, and provide better transparency to users about blockchain features.