remove remaining getIdentity calls & fix QR code for did:peer

This commit is contained in:
2024-07-15 20:47:10 -06:00
parent f7f38789d2
commit cd0a31e6f5
9 changed files with 86 additions and 71 deletions

View File

@@ -211,18 +211,6 @@ export const getAccount = async (
return account;
};
export const getIdentity = async (activeDid: string): Promise<IIdentifier> => {
const account = await getAccount(activeDid);
const identity = JSON.parse(account?.identity || "null");
if (!identity) {
throw new Error(
`Attempted to load identity ${activeDid} but no identifier was found`,
);
}
return identity;
};
/**
* Generates a new identity, saves it to the database, and sets it as the active identity.
* @return {Promise<string>} with the DID of the new identity