frontend: add optional onion block explorer URLs#4192
Conversation
Add an expert setting to use mempool's .onion address for BTC/TBTC explorer links, whitelist the URLs in SystemOpen, and route existing explorer link call sites through a shared BlockExplorerLink component.
Use the same direct-open behavior as desktop.
When .onion explorer URLs are enabled, Android opens a dual-intent chooser so users can pick Tor Browser or a clearnet browser.
| } | ||
| } | ||
|
|
||
| public static void systemOpenExplorerChooser(Application application, String onionUrl, String clearnetUrl) throws Exception { |
There was a problem hiding this comment.
Why not always give the choice when Tor proxy is enabled?
Does Android make the URL visible in the chooser? Can one pick the browser too app too? Screenshots would be nice :)
There was a problem hiding this comment.
onion explorer URLs are separate from tor proxy because the proxy only affects in-app traffic, not the external browser. i supposed that maybe some users want to open the mempool onion address even if they do not have the tor proxy enabled.
posting android screenshots asap :)
There was a problem hiding this comment.
after some testing, I can say the Android chooser does not appear reliably: once a default browser is set, it is not shown, even when multiple browsers are installed (including Tor).
i still want to try on a physical device, since Tor Browser keeps crashing on the emulator, and that may be affecting the behavior.
if the chooser does not appear as soon as a default browser is selected though, I don’t think it makes sense to keep this option. we should probably open the onion URL directly when the setting is enabled instead, as per other operating systems :)
| darkmode?: boolean; | ||
| expertFee?: boolean; | ||
| coinControl?: boolean; | ||
| useOnionExplorerUrls?: boolean; |
There was a problem hiding this comment.
If it is a setting, why is there a chooser? If toggled on, shouldn't it do the onion url?
There was a problem hiding this comment.
yes in theory, and i was considering it actually. but my thinking was that on mobile, i suppose not many users to have tor browser as default, so having to chose on mobile seemed reasonable.
i am not 100% sure yet though, that's why i left the pr on draft 😁
wdyt? would you think that opening the onion url right away also on mobile could be better?
Add an expert setting to use mempool's .onion address for BTC/TBTC explorer links, whitelist the URLs in SystemOpen, and route existing explorer link call sites through a shared BlockExplorerLink component.
Before asking for reviews, here is a check list of the most common things you might need to consider: