Skip to content

Commit cdc5b25

Browse files
authored
fix: replace hardcoded key with env in tests (#46)
LGTM
1 parent 91562e6 commit cdc5b25

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/common/utils.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { INFURA_API_KEY } from "../config";
12
import { AllVerificationFragment } from "..";
23
import { InvalidVerificationFragment, ProviderDetails } from "../types/core";
34
import {
@@ -281,12 +282,12 @@ describe("generateProvider", () => {
281282
const options = {
282283
network: "sepolia",
283284
providerType: "infura",
284-
apiKey: "bb46da3f80e040e8ab73c0a9ff365d18",
285+
apiKey: INFURA_API_KEY,
285286
} as ProviderDetails;
286287
const provider = generateProvider(options) as any;
287288

288289
expect(provider?._network?.name).toEqual("sepolia");
289-
expect(provider?.apiKey).toEqual("bb46da3f80e040e8ab73c0a9ff365d18");
290+
expect(provider?.apiKey).toEqual(INFURA_API_KEY);
290291
expect(provider?.connection?.url).toMatch(/(infura)/i);
291292
});
292293

0 commit comments

Comments
 (0)