Skip to content

Enhance Wallet Security and User Experience with New Features#197

Open
Punitkumar756 wants to merge 12 commits intoergoplatform:developfrom
Punitkumar756:#issue173
Open

Enhance Wallet Security and User Experience with New Features#197
Punitkumar756 wants to merge 12 commits intoergoplatform:developfrom
Punitkumar756:#issue173

Conversation

@Punitkumar756
Copy link

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.

Copilot AI review requested due to automatic review settings December 14, 2025 01:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +176 to +177
val addressList = walletAddresses.map { it.publicAddress }
val changeAddress = addressList.first() // Use first address as change address
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
- ✅ 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.
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
None identified. Gradle 8.5 is stable and well-tested with Java 21.

Copilot uses AI. Check for mistakes.
Comment on lines +276 to +289
## 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.
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
## 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/)

Copilot uses AI. Check for mistakes.

Expected output:
```
Gradle 8.5
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
Gradle 8.5
Gradle 8.11.1

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incomplete sentence on line 181: "Both" is left dangling without completing the thought. This should either be completed or removed.

Suggested change
Both

Copilot uses AI. Check for mistakes.
```powershell
# Check Java version
java -version
11.1 on first run)
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
11.1 on first run)
# Gradle 8.11.1 will be downloaded on first run

Copilot uses AI. Check for mistakes.
Comment on lines +256 to +269
```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
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +52 to +63
### 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
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +47 to +50
### 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`
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
## Related Issues
Fixes #181 - ergo-appkit dependency issue

## Additional Noteses
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling error: "Noteses" should be "Notes"

Suggested change
## Additional Noteses
## Additional Notes

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants