authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-05 01:54:36-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 01:54:36-07:00
logee150e178be5e0484a588a8fe7ad98fd6b858973
tree5a70c51dbd3d92c41af08c060639ac447eb6384c
parent0acf05f4f561b873853587f8629ca691b18a613a
signature Signed by PGP key B5690EEEBB952194

refactor(mobile): remove unused cloud relay URL normalizer (#10068)


2 files changed, 0 insertions(+), 16 deletions(-)

apps/mobile/src/features/cloud/linkEnvironment.test.ts-8
......@@ -17,7 +17,6 @@ import {
1717 connectCloudEnvironment,
1818 listCloudEnvironments,
1919 listCloudEnvironmentsWithStatus,
20 normalizeRelayBaseUrl,
2120 refreshCloudEnvironmentConnection,
2221} from "./linkEnvironment";
2322
......@@ -195,13 +194,6 @@ describe("mobile cloud link environment client", () => {
195194 loadPreferences.mockClear();
196195 });
197196
198 it("normalizes configured relay base URLs before building DPoP-bound requests", () => {
199 expect(normalizeRelayBaseUrl(" https://relay.example.test/// ")).toBe(
200 "https://relay.example.test",
201 );
202 expect(normalizeRelayBaseUrl(" ")).toBeNull();
203 });
204
205197 it("makes linked environments visible while their status is still loading", () => {
206198 expect(cloudEnvironmentsPendingStatus([listedEnvironment("env-1")])).toMatchObject([
207199 {
apps/mobile/src/features/cloud/linkEnvironment.ts-8
......@@ -43,14 +43,6 @@ const RELAY_STATUS_AND_CONNECT_SCOPES = [
4343 RelayEnvironmentConnectScope,
4444] satisfies ReadonlyArray<RelayDpopAccessTokenScope>;
4545
46export function normalizeRelayBaseUrl(value: string | null | undefined): string | null {
47 const trimmed = value?.trim();
48 if (!trimmed) {
49 return null;
50 }
51 return trimmed.replace(/\/+$/g, "");
52}
53
5446function readRelayUrl(): string | null {
5547 return resolveCloudPublicConfig().relay.url;
5648}