Block imported Monero wallets from using the Edge LWS backend#6053
Open
peachbits wants to merge 1 commit into
Open
Block imported Monero wallets from using the Edge LWS backend#6053peachbits wants to merge 1 commit into
peachbits wants to merge 1 commit into
Conversation
Imported Monero wallets were created on the Edge LWS backend despite the
business rule that imported wallets must use a full node (or a user-configured
custom LWS) -- each watched wallet has an ongoing server-side scanning cost.
The GUI seeded the backend wallet setting from the first option ('lws') on the
edit-name scene, which then rode through to wallet creation.
Centralize the rule as SpecialCurrencyInfo.checkImportedWalletSettings so the
import flow and the Wallet Settings modal stay in sync:
- tapping "Import Wallets" on the edit-name scene validates the chosen backend;
when an override is required it shows a modal offering to continue with a full
node or to open the asset's currency settings to configure a custom LWS server
- the Wallet Settings modal rejects the same combination via the shared helper
- a custom (non-Edge) LWS server is still allowed
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Description
Asana: https://app.asana.com/0/1213880789473005/1215859683644063
Imported Monero wallets were silently created on the Edge LWS backend even though imported wallets are not permitted to use Edge's own LWS server (each watched wallet has an ongoing server-side scanning cost). The edit-name scene seeded the backend wallet setting from its first option (
lws), which then flowed through to wallet creation.This centralizes the rule as
SpecialCurrencyInfo.checkImportedWalletSettings(settings, userSettings)so the import flow and the Wallet Settings modal stay in sync:Added unit tests (
src/__tests__/moneroImportSettings.test.ts) covering every branch of the rule; existing snapshot/scene tests pass.Device-testing note: the affected logic is covered by unit + snapshot tests. Live on-device verification of this iteration was blocked by an unrelated environment issue (the app would not get past the splash screen against Edge's servers); an earlier, behavior-equivalent version of the override was verified on the iOS simulator (imported wallet → Full Node).
Note
Medium Risk
Changes wallet import and settings behavior for Monero backends; logic is covered by new unit tests but affects a user-facing wallet-creation path.
Overview
Imported Monero wallets could still be created on Edge’s LWS because the edit-name flow defaulted the backend to
lws. This PR centralizes the rule inSpecialCurrencyInfo.checkImportedWalletSettings(withisMoneroEdgeLwsinsrc/util/monero.ts) so import and wallet settings stay aligned.On Import Wallets, if Edge LWS would be used, a modal explains full node vs custom LWS, links to currency settings, and only Continue applies a monerod override before the import scene. The Wallet Settings modal uses the same helper to reject invalid backend picks instead of duplicated Monero logic. Custom non-Edge LWS remains allowed.
Adds unit tests for
isMoneroEdgeLwsand Monero’scheckImportedWalletSettings, plus new copy and a CHANGELOG entry.Reviewed by Cursor Bugbot for commit 2d07ca9. Bugbot is set up for automated code reviews on this repo. Configure here.