[GUI][DB] Allow Custom Explorers#20
Open
Liquid369 wants to merge 4 commits into
Open
Conversation
9b2d787 to
158474c
Compare
Introduce an EXPLORER_SERVERS table with add/edit/remove/get helpers and seed the default explorers: explorer.duddino.com, testnet.duddino.com and zkbitcoin.com as a mainnet fallback. Defaults are seeded by URL so an upgrade never collides with the ids of explorers a user added previously, and NULL network metadata left behind by an older schema is backfilled. Remember the selected explorer per network (keyed by URL) in the settings cache so switching networks never remaps to an unrelated server.
BlockBookClient now resolves its URL from the active explorer selection. When the primary explorer fails, the request is retried against the other explorers configured for the active network (e.g. zkbitcoin) before the error propagates. ApiClient exposes updateExplorerUrl() to switch the active explorer at runtime.
Add an Explorer dropdown to the header, filtered to the active network, and an 'Explorer Servers config...' dialog to add, edit and remove custom explorers, mirroring the RPC servers UI. The selection is remembered per network and applied to the API client, and the dropdown refreshes when the RPC network changes.
Cover the explorer fallback retry, per-network selection persistence, network filtering of the dropdown, and the database seeding and upgrade migration. Ignore __pycache__ directories anywhere in the tree.
e6f2e30 to
b8a7b54
Compare
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.
This pull requests adds to the GUI a dropdown menu for explorer selection and allows for custom URL's.
We have updated the two hardcoded ones with https://explorer.duddino.com and https://testnet.duddino.com starters and it should retry zkbitcoin if the main one fails.
I have set this up so that we can save these in the DB like the RPC Servers so a user can therefore not rely on single sources for their PET4L or Ledger.
Update Screenshot:

Rockdev instances are done for now.