Skip to content

Commit

Permalink
refactor: rename ens variable (#2)
Browse files Browse the repository at this point in the history
Rename to `ensName`
  • Loading branch information
aahna-ashina committed Jun 23, 2022
1 parent 548be57 commit 85e886f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/pages/api/downloadPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) {
* @param address The Ethereum address
* @returns Promise
*/
const lookupEnsName = async (address: any) => {
const lookupEnsName = async (address: any): Promise<null | string> => {
console.log('lookupEnsName address:', address)

const infuraProvider = new ethers.providers.InfuraProvider('homestead', process.env.INFURA_ENDPOINT)
console.log('infuraProvider:\n', infuraProvider)

var ensPromise = await infuraProvider.lookupAddress(address)
console.log('ensPromise:', ensPromise)
var ensName = await infuraProvider.lookupAddress(address)
console.log('ensName:', ensName)

return ensPromise
return ensName
}

0 comments on commit 85e886f

Please sign in to comment.