features/wallet/sync_server_sheet
library
Functions
-
addressTypedByUser(SyncServerChoice choice)
→ bool
-
Did the USER type the address this refusal is about? The one fact that
decides whether "check the address" is a step the reader can take
(syncServerRefusalCopy). A custom URL is typed; a predefined, default or
forward-compat choice came from the app's own list, so its address is not
the reader's to check. Exhaustive and wildcard-free: a choice added to the
bridge is a compile error here, never silently routed to the typed copy.
-
hostOf(String url)
→ String
-
The host of a URL for display — never the whole URL (§5.4 / ).
-
showSyncServerSheet(BuildContext context)
→ Future<void>
-
The sync-server picker (
docs/specs/sync-server-picker.md §3.4, P3-13):
the servers the host OFFERS as rows (the one in use marked), "App default"
when the default is not among them, and a custom entry — a URL field, a
"Check server" step, a trust notice, then "Use this server". Every switch
is preceded by the in-flight notice (it restarts the sync pass in
progress; the balance and history stay), and a custom server by the trust
notice as well. Opened from the sync sheet's Server row.
-
syncServerFallbackCopy(WalletLocalizations l10n, SyncServerFallback fallback, {required String host})
→ String
-
The copy for a
SyncServerFallback — shared by the sync sheet's Server
row banner and the picker's own banner (one wording, two places).
-
syncServerRefusalCopy(WalletLocalizations l10n, WalletApiError error, {required bool typedAddress})
→ String
-
The copy for a switch/probe REFUSAL, by KIND — never by message text (the
FFI rule). Unknown kinds fall to the unreachable copy: the honest generic
("couldn't reach this server") over a silent no-op.