Added identity check
This commit is contained in:
@@ -23,6 +23,9 @@ export async function loadLandmarks(vue, world, scene, loop) {
|
|||||||
const accounts = await accountsDB.accounts.toArray();
|
const accounts = await accountsDB.accounts.toArray();
|
||||||
const account = R.find((acc) => acc.did === activeDid, accounts);
|
const account = R.find((acc) => acc.did === activeDid, accounts);
|
||||||
const identity = JSON.parse(account?.identity || "undefined");
|
const identity = JSON.parse(account?.identity || "undefined");
|
||||||
|
if (!identity) {
|
||||||
|
throw new Error("No identity found.");
|
||||||
|
}
|
||||||
const token = await accessToken(identity);
|
const token = await accessToken(identity);
|
||||||
|
|
||||||
const url = apiServer + "/api/v2/report/claims?claimType=GiveAction";
|
const url = apiServer + "/api/v2/report/claims?claimType=GiveAction";
|
||||||
|
|||||||
Reference in New Issue
Block a user