Bug in useMoralisWeb3Api.d.ts types

I was trying to use ENS lookup in my React app using TypeScript and came across the following in useMoralisWeb3Api.d.ts on line 784:

resolveAddress: () => Promise<{
            name: string;
        }>;

It should be like this:

resolveAddress: (options: {address:string}) => Promise<{
            name: string;
        }>;

Otherwise TypeScript complains that it expects 0 arguments. Making the above edit to useMoralisWeb3Api.d.ts fixed the problem.

1 Like

You should post this issue on the relevant GitHub repo or make a PR - it should get resolved faster for this sort of thing.