walletEffectiveServerHostProvider top-level property

Provider<String?> walletEffectiveServerHostProvider
final

The HOST the sync sheet's Server row shows: the session's effective server when a session exists (the connection's own truth — the no-drift rule kept by reading the dial itself), else the host-config seam walletEndpointHostProvider (the pre-session value, and a session-only host's override). Host only, never the URL.

Implementation

final walletEffectiveServerHostProvider = Provider.autoDispose<String?>((ref) {
  final status = ref.watch(walletSyncServerStatusProvider).value;
  final fromSession = status == null
      ? null
      : Uri.tryParse(status.effectiveUrl)?.host;
  if (fromSession != null && fromSession.isNotEmpty) return fromSession;
  return ref.watch(walletEndpointHostProvider);
});