Skip to content

Commit

Permalink
fix(app): update @gitcoin/passport-identity imports in app to include…
Browse files Browse the repository at this point in the history
… dist directory

fixes issue where nextjs export was failing due to not finding the passport-identity module
  • Loading branch information
shavinac committed Jun 13, 2022
1 parent 9eca72f commit 83d6626
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions app/__tests__/components/ProviderCards/BrightidCard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { mockAddress, mockWallet } from "../../../__test-fixtures__/onboardHookV
import { STAMP_PROVIDERS } from "../../../config/providers";
import { brightidStampFixture } from "../../../__test-fixtures__/databaseStorageFixtures";
import { SUCCESFUL_BRIGHTID_RESULT } from "../../../__test-fixtures__/verifiableCredentialResults";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity/dist/commonjs/src/credentials";

jest.mock("@gitcoin/passport-identity", () => ({
jest.mock("@gitcoin/passport-identity/dist/commonjs/src/credentials", () => ({
fetchVerifiableCredential: jest.fn(),
}));
jest.mock("../../../utils/onboard.ts");
Expand Down
4 changes: 2 additions & 2 deletions app/__tests__/components/ProviderCards/EnsCard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { mockAddress, mockWallet } from "../../../__test-fixtures__/onboardHookV
import { STAMP_PROVIDERS } from "../../../config/providers";
import { ensStampFixture } from "../../../__test-fixtures__/databaseStorageFixtures";
import { SUCCESFUL_ENS_RESULT } from "../../../__test-fixtures__/verifiableCredentialResults";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity/dist/commonjs/src/credentials";

jest.mock("@gitcoin/passport-identity", () => ({
jest.mock("@gitcoin/passport-identity/dist/commonjs/src/credentials", () => ({
fetchVerifiableCredential: jest.fn(),
}));
jest.mock("../../../utils/onboard.ts");
Expand Down
4 changes: 2 additions & 2 deletions app/__tests__/components/ProviderCards/PoapCard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { mockAddress, mockWallet } from "../../../__test-fixtures__/onboardHookV
import { STAMP_PROVIDERS } from "../../../config/providers";
import { poapStampFixture } from "../../../__test-fixtures__/databaseStorageFixtures";
import { SUCCESFUL_POAP_RESULT } from "../../../__test-fixtures__/verifiableCredentialResults";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity/dist/commonjs/src/credentials";

jest.mock("@gitcoin/passport-identity", () => ({
jest.mock("@gitcoin/passport-identity/dist/commonjs/src/credentials", () => ({
fetchVerifiableCredential: jest.fn(),
}));
jest.mock("../../../utils/onboard.ts");
Expand Down
4 changes: 2 additions & 2 deletions app/__tests__/components/ProviderCards/PohCard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { mockAddress, mockWallet } from "../../../__test-fixtures__/onboardHookV
import { STAMP_PROVIDERS } from "../../../config/providers";
import { pohStampFixture } from "../../../__test-fixtures__/databaseStorageFixtures";
import { SUCCESFUL_POH_RESULT } from "../../../__test-fixtures__/verifiableCredentialResults";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity/dist/commonjs/src/credentials";

jest.mock("@gitcoin/passport-identity", () => ({
jest.mock("@gitcoin/passport-identity/dist/commonjs/src/credentials", () => ({
fetchVerifiableCredential: jest.fn(),
}));
jest.mock("../../../utils/onboard.ts");
Expand Down
2 changes: 1 addition & 1 deletion app/components/ProviderCards/BrightidCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { datadogLogs } from "@datadog/browser-logs";
import { datadogRum } from "@datadog/browser-rum";

// --- Identity tools
import { fetchVerifiableCredential } from "@gitcoin/passport-identity";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity/dist/commonjs/src/credentials";

// --- pull context
import { UserContext } from "../../context/userContext";
Expand Down
2 changes: 1 addition & 1 deletion app/components/ProviderCards/EnsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { datadogLogs } from "@datadog/browser-logs";
import { datadogRum } from "@datadog/browser-rum";

// --- Identity tools
import { fetchVerifiableCredential } from "@gitcoin/passport-identity";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity/dist/commonjs/src/credentials";

// --- pull context
import { UserContext } from "../../context/userContext";
Expand Down
2 changes: 1 addition & 1 deletion app/components/ProviderCards/FacebookCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { datadogLogs } from "@datadog/browser-logs";
import { datadogRum } from "@datadog/browser-rum";

// --- Identity tools
import { fetchVerifiableCredential } from "@gitcoin/passport-identity";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity/dist/commonjs/src/credentials";

// --- UserContext
import { UserContext } from "../../context/userContext";
Expand Down
2 changes: 1 addition & 1 deletion app/components/ProviderCards/GoogleCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React, { useContext, useState } from "react";

// --- Identity tools
import { fetchVerifiableCredential } from "@gitcoin/passport-identity";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity/dist/commonjs/src/credentials";

// --- Google OAuth toolkit
import GoogleLogin, { GoogleLoginResponse } from "react-google-login";
Expand Down
2 changes: 1 addition & 1 deletion app/components/ProviderCards/PoapCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { datadogLogs } from "@datadog/browser-logs";
import { datadogRum } from "@datadog/browser-rum";

// --- Identity tools
import { fetchVerifiableCredential } from "@gitcoin/passport-identity";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity/dist/commonjs/src/credentials";

// pull context
import { UserContext } from "../../context/userContext";
Expand Down
2 changes: 1 addition & 1 deletion app/components/ProviderCards/PohCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { datadogLogs } from "@datadog/browser-logs";
import { datadogRum } from "@datadog/browser-rum";

// --- Identity tools
import { fetchVerifiableCredential } from "@gitcoin/passport-identity";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity/dist/commonjs/src/credentials";

// pull context
import { UserContext } from "../../context/userContext";
Expand Down
2 changes: 1 addition & 1 deletion app/components/ProviderCards/TwitterCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { BroadcastChannel } from "broadcast-channel";

// --- Identity tools
import { PROVIDER_ID } from "@gitcoin/passport-types";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity";
import { fetchVerifiableCredential } from "@gitcoin/passport-identity/dist/commonjs/src/credentials";

// --- Style Components
import { Card } from "../Card";
Expand Down
6 changes: 3 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
"@chakra-ui/react": "^1.8.8",
"@datadog/browser-logs": "^4.11.2",
"@datadog/browser-rum": "^4.11.2",
"@gitcoin/passport-database-client": "^0.0.1",
"@gitcoin/passport-identity": "^0.0.1",
"@gitcoin/passport-types": "^0.0.1",
"@emotion/react": "^11.9.0",
"@emotion/styled": "^11.8.1",
"@ethersproject/providers": "^5.6.4",
"@gitcoin/passport-database-client": "^0.0.1",
"@gitcoin/passport-identity": "^0.0.1",
"@gitcoin/passport-types": "^0.0.1",
"@self.id/framework": "^0.3.2",
"@web3-onboard/core": "^2.2.5",
"@web3-onboard/injected-wallets": "^2.0.5",
Expand Down

0 comments on commit 83d6626

Please sign in to comment.