Resolves#4178. Before v13.1.0 the Tor path always trusted self-signed
certificates because the old react-native-tor library defaulted
trustSSL=true. react-native-nitro-tor 0.5.3 had no such knob — TLS was
strict, so users connecting to their own LND/CLN node over a hidden
service (the default LND REST + self-signed cert setup) regressed on
upgrade.
This PR plumbs a trust_invalid_certs field through doTorRequest and
hardcodes it to true on the Tor branch in backends/LND.ts and
backends/CLNRest.ts. The certVerification setting is intentionally
ignored over Tor: the .onion address authenticates the endpoint at the
Tor protocol layer, and the upstream daemon's self-signed cert can
never match an .onion hostname, so TLS validation here is a category
error. The wallet config UI already hides the certVerification toggle
when Tor is enabled, so this matches the user-visible model.
The other doTorRequest callers (utils/handleAnything.ts,
stores/SettingsStore.ts, components/LayerBalances/LightningSwipeableRow.tsx)
keep the strict default — they talk to public third-party services
(lnurl resolution, Olympus, Zeus servers), not user-owned nodes.
Schema/Rust support landed upstream in:
- niteshbalusu11/tor-rust-sdk#4
- niteshbalusu11/react-native-nitro-tor#10
Picks up the matching react-native-nitro-tor 0.6.0 release.