Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const userCollection = (conn: Connection) =>
getCollection(
conn,
"_usr",
() => getUser(conn) as Promise,
undefined
);
export const getConfigFlowInProgressCollection = (conn: Connection) =>
getCollection(
conn,
"_configFlowProgress",
fetchConfigFlowInProgress,
subscribeConfigFlowInProgressUpdates
);
export const getLovelaceCollection = (conn: Connection) =>
getCollection(
conn,
"_lovelace",
(conn2) => fetchConfig(conn2, false),
(_conn, store) =>
subscribeLovelaceUpdates(conn, () =>
fetchConfig(conn, false).then((config) => store.setState(config, true))
)
);