Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive for warnProvider message #223

Closed
HJunyuan opened this issue Mar 24, 2022 · 1 comment · Fixed by #232
Closed

False positive for warnProvider message #223

HJunyuan opened this issue Mar 24, 2022 · 1 comment · Fixed by #232
Labels

Comments

@HJunyuan
Copy link
Member

Even after specifying a custom provider and resolver, the warnProvider message still appears.

Example code:

import { providers } from "ethers";
import { verificationBuilder, createResolver, openAttestationVerifiers } from "@govtechsg/oa-verify";

const NETWORK_NAME = "homestead";
const INFURA_API_KEY = "ENTER_KEY_HERE";

const verify = verificationBuilder(openAttestationVerifiers, {
  provider: new providers.InfuraProvider(NETWORK_NAME, INFURA_API_KEY),
  resolver: INFURA_API_KEY
    ? createResolver({
        ethrResolverConfig: {
          networks: [{ name: "mainnet", rpcUrl: `https://mainnet.infura.io/v3/${INFURA_API_KEY}` }],
        },
      })
    : undefined,
});

Warning message triggered from:

const apiKey =
options?.apiKey || (provider === "infura" && process.env.INFURA_API_KEY) || process.env.PROVIDER_API_KEY || "";
!apiKey && console.warn(warnProvider);

@john-dot-oa
Copy link
Contributor

🎉 This issue has been resolved in version 7.10.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants