forked from jsnbuchanan/crowd-funder-for-time-pwa
add expiration inside JWANT & refactor getHeaders to move toward supporting did:peer
This commit is contained in:
@@ -196,12 +196,17 @@ export function findAllVisibleToDids(
|
||||
*
|
||||
**/
|
||||
|
||||
export const getIdentity = async (activeDid: string): Promise<IIdentifier> => {
|
||||
export const getAccount = async (activeDid: string): Promise<Account> => {
|
||||
await accountsDB.open();
|
||||
const account = (await accountsDB.accounts
|
||||
.where("did")
|
||||
.equals(activeDid)
|
||||
.first()) as Account;
|
||||
return account;
|
||||
};
|
||||
|
||||
export const getIdentity = async (activeDid: string): Promise<IIdentifier> => {
|
||||
const account = await getAccount(activeDid);
|
||||
const identity = JSON.parse(account?.identity || "null");
|
||||
|
||||
if (!identity) {
|
||||
|
||||
Reference in New Issue
Block a user