Network endpoint overrides in the wallet config - #3
Open
n13 wants to merge 1 commit into
Open
Conversation
Wallets can now be moved to another network from remote config. The wallet payload gains an optional `endpoints` object with `rpc`, `graphQl`, `explorer` and `senoti` URLs; absent keys keep the wallet's built-in defaults. Flags stay opaque, but a malformed endpoints block would strand every wallet on an unreachable network, so its shape is validated when the file is loaded: startup fails on a bad file and hot reload keeps the last known good one. Documented in the README and example config.
Author
|
Hmm not sure about this it kinda introduces another attack point... |
Author
|
I guess in terms of intercepting network, attackers can already do this with the existing, this would just introduce another weak spot in the quersi server itself, but i think it might be fine as no keys are anyway ever leaked ... |
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.
Summary
Adds the remote-config side of RPC/indexer overrides for the mobile wallet (companion to Quantus-Network/quantus-apps#632).
endpointsobject:rpc(list),graphQl(list),explorer,senoti. Absent keys keep the wallet's built-in defaults, so the current file keeps working unchanged.endpointsblock is validated on load (URL shape and scheme, non-empty lists). A bad file fails startup; a bad hot reload keeps the last known good file and logs a warning. Without this, a typo in an RPC URL would strand every wallet on an unreachable network.wallet_config.example.jsoncarries the current Planck values.No new dependencies (
reqwest::Urlis used for parsing).Test plan
cargo fmt --all -- --check,cargo clippy --all-targets --all-features -- -D warningscargo test: 51 passed, including new cases for accepted overrides, each malformed shape, and last-known-good on a bad reload.