Skip to content

Commit

Permalink
fix(app): check for address before initiating db
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-schultz committed Feb 4, 2023
1 parent 97e3406 commit 3cbb745
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 3cbb745

Please sign in to comment.