Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Comments

Manav Rathi0f64a506e5d1
diff --git a/web/apps/cast/src/pages/index.tsx b/web/apps/cast/src/pages/index.tsx
index 88b7b55823..666cc1f0f9 100644
--- a/web/apps/cast/src/pages/index.tsx
+++ b/web/apps/cast/src/pages/index.tsx
@@ -39,7 +39,7 @@ export default function PairingMode() {
try {
const data = await getCastData(registration);
if (!data) {
- // No one has connected yet
+ // No one has connected yet.
return;
}
@@ -48,7 +48,7 @@ export default function PairingMode() {
await router.push("/slideshow");
} catch (e) {
console.log("Failed to get cast data", e);
- // Start again from the beginning
+ // Start again from the beginning.
setPairingCode(undefined);
init();
}
diff --git a/web/apps/cast/src/services/cast.ts b/web/apps/cast/src/services/cast.ts
index 32e24a9346..f0bff7787a 100644
--- a/web/apps/cast/src/services/cast.ts
+++ b/web/apps/cast/src/services/cast.ts
@@ -1,7 +1,3 @@
-// eslint has already fixed this warning, we don't have the latest version yet
-// https://github.com/eslint/eslint/pull/18286
-/* eslint-disable no-constant-condition */
-
import log from "@/next/log";
import { boxSealOpen, toB64 } from "@ente/shared/crypto/internal/libsodium";
import castGateway from "@ente/shared/network/cast";
@@ -86,6 +82,10 @@ export const register = async (): Promise<Registration> => {
// Register keypair with museum to get a pairing code.
let pairingCode: string;
+ // eslint has fixed this spurious warning, but we're not on the latest
+ // version yet, so add a disable.
+ // https://github.com/eslint/eslint/pull/18286
+ /* eslint-disable no-constant-condition */
while (true) {
try {
pairingCode = await castGateway.registerDevice(publicKeyB64);
@@ -143,7 +143,7 @@ export const advertiseCode = (
incomingMessageListener as unknown as SystemEventHandler,
);
- // Shutdown ourselves if the "sender" disconnects.
+ // Shutdown ourselves if the sender disconnects.
// TODO(MR): Does it?
context.addEventListener(
cast.framework.system.EventType.SENDER_DISCONNECTED,