Skip to content

Network endpoint overrides in the wallet config - #3

Open
n13 wants to merge 1 commit into
mainfrom
n13/wallet-config-endpoints
Open

Network endpoint overrides in the wallet config#3
n13 wants to merge 1 commit into
mainfrom
n13/wallet-config-endpoints

Conversation

@n13

@n13 n13 commented Sep 4, 2026

Copy link
Copy Markdown

Summary

Adds the remote-config side of RPC/indexer overrides for the mobile wallet (companion to Quantus-Network/quantus-apps#632).

  • The wallet payload gains an optional endpoints object: rpc (list), graphQl (list), explorer, senoti. Absent keys keep the wallet's built-in defaults, so the current file keeps working unchanged.
  • Flags remain opaque JSON, but the endpoints block 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.
  • README documents the block and the validation; wallet_config.example.json carries the current Planck values.

No new dependencies (reqwest::Url is used for parsing).

Test plan

  • cargo fmt --all -- --check, cargo clippy --all-targets --all-features -- -D warnings
  • cargo test: 51 passed, including new cases for accepted overrides, each malformed shape, and last-known-good on a bad reload.

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.
@n13

n13 commented Sep 4, 2026

Copy link
Copy Markdown
Author

Hmm not sure about this it kinda introduces another attack point...

@n13

n13 commented Sep 4, 2026

Copy link
Copy Markdown
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 ...

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.

1 participant