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

This commit is contained in:
Julius Marminge authored and GitHub committed 2026-09-05 01:54:36 -07:00
1 parent 0acf05f4f5
commit ee150e178b
2 files changed
-16

No files matched your search

@@ -17,7 +17,6 @@ import {
connectCloudEnvironment,
listCloudEnvironments,
listCloudEnvironmentsWithStatus,
normalizeRelayBaseUrl,
refreshCloudEnvironmentConnection,
} from "./linkEnvironment";
@@ -195,13 +194,6 @@ describe("mobile cloud link environment client", () => {
loadPreferences.mockClear();
});
it("normalizes configured relay base URLs before building DPoP-bound requests", () => {
expect(normalizeRelayBaseUrl(" https://relay.example.test/// ")).toBe(
"https://relay.example.test",
);
expect(normalizeRelayBaseUrl(" ")).toBeNull();
});
it("makes linked environments visible while their status is still loading", () => {
expect(cloudEnvironmentsPendingStatus([listedEnvironment("env-1")])).toMatchObject([
{
@@ -43,14 +43,6 @@ const RELAY_STATUS_AND_CONNECT_SCOPES = [
RelayEnvironmentConnectScope,
] satisfies ReadonlyArray<RelayDpopAccessTokenScope>;
export function normalizeRelayBaseUrl(value: string | null | undefined): string | null {
const trimmed = value?.trim();
if (!trimmed) {
return null;
}
return trimmed.replace(/\/+$/g, "");
}
function readRelayUrl(): string | null {
return resolveCloudPublicConfig().relay.url;
}