MCPcopy Create free account
hub / github.com/BootBoi/android-app / deleteConnection

Function deleteConnection

src/Connection/ConnectionStoreHelper.ts:43–51  ·  view source on GitHub ↗
(connection: Connection)

Source from the content-addressed store, hash-verified

41}
42
43export async function deleteConnection(connection: Connection) {
44 const storedConnections = await getStoredConnections();
45 const index = getIndexOfConnection(storedConnections, connection);
46 if (index === -1) {
47 return;
48 }
49 storedConnections.splice(index, 1);
50 await SecureStore.setItemAsync(STORE_KEY, JSON.stringify(storedConnections));
51}

Callers 1

onDeleteFunction · 0.90

Calls 2

getStoredConnectionsFunction · 0.85
getIndexOfConnectionFunction · 0.85

Tested by

no test coverage detected