diff --git a/keyserver/src/utils/fc-cache.js b/keyserver/src/utils/fc-cache.js --- a/keyserver/src/utils/fc-cache.js +++ b/keyserver/src/utils/fc-cache.js @@ -15,13 +15,18 @@ +neynarWebhookSecret?: string, }; -let getFCNames: ?GetFCNames; -let neynarClient: ?NeynarClient; -async function initFCCache() { - const neynarSecret = await getCommConfig({ +function getNeynarConfig(): Promise { + return getCommConfig({ folder: 'secrets', name: 'neynar', }); +} + +let getFCNames: ?GetFCNames; +let neynarClient: ?NeynarClient; +async function initFCCache() { + const neynarSecret = await getNeynarConfig(); + const neynarKey = neynarSecret?.key; if (!neynarKey) { return; @@ -32,4 +37,4 @@ baseGetFCNames(fcCache, users); } -export { initFCCache, getFCNames, neynarClient }; +export { initFCCache, getFCNames, neynarClient, getNeynarConfig };