diff --git a/keyserver/src/utils/ens-cache.js b/keyserver/src/utils/ens-cache.js index 7cfb9b177..c6a4dbfbc 100644 --- a/keyserver/src/utils/ens-cache.js +++ b/keyserver/src/utils/ens-cache.js @@ -1,29 +1,31 @@ // @flow import { ethers } from 'ethers'; import { getCommConfig } from 'lib/utils/comm-config.js'; import { ENSCache } from 'lib/utils/ens-cache.js'; import { getENSNames as baseGetENSNames, type GetENSNames, } from 'lib/utils/ens-helpers.js'; type AlchemyConfig = { +key: string }; +type BaseUserInfo = { +username?: ?string, ... }; let getENSNames: ?GetENSNames; async function initENSCache() { const alchemySecret = await getCommConfig({ folder: 'secrets', name: 'alchemy', }); const alchemyKey = alchemySecret?.key; if (!alchemyKey) { return; } const provider = new ethers.providers.AlchemyProvider('mainnet', alchemyKey); const ensCache = new ENSCache(provider); - getENSNames = baseGetENSNames.bind(null, ensCache); + getENSNames = (users: $ReadOnlyArray): Promise => + baseGetENSNames(ensCache, users); } export { initENSCache, getENSNames };