Skip to content

Commit

Permalink
Merge pull request passportxyz#929 from gitcoinco/check-for-address-h…
Browse files Browse the repository at this point in the history
…otfix

fix(app): check for address before initiating db
  • Loading branch information
Tim Schultz authored Feb 4, 2023
2 parents 97e3406 + 3cbb745 commit bf5519b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/context/ceramicContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ export const CeramicContextProvider = ({ children }: { children: any }) => {
case "connected": {
if (dbAccessTokenStatus === "failed") {
setIsLoadingPassport(IsLoadingPassportState.FailedToConnect);
} else if (dbAccessToken) {
} else if (dbAccessToken && address) {
// Ceramic Network Connection
const ceramicClientInstance = new CeramicDatabase(
viewerConnection.selfID.did,
Expand All @@ -515,8 +515,8 @@ export const CeramicContextProvider = ({ children }: { children: any }) => {
// Ceramic cache db
const databaseInstance = new PassportDatabase(
process.env.NEXT_PUBLIC_CERAMIC_CACHE_ENDPOINT || "",
address || "",
dbAccessToken || "",
address,
dbAccessToken,
datadogLogs.logger,
viewerConnection.selfID.did
);
Expand Down

0 comments on commit bf5519b

Please sign in to comment.