consolidate getIdentity & remove dups

This commit is contained in:
2024-07-11 19:43:56 -06:00
parent 7cb9e2aa52
commit 11163dfad9
8 changed files with 12 additions and 133 deletions

View File

@@ -66,20 +66,6 @@ export default class ClaimAddRawView extends Vue {
}
}
public async getIdentity(activeDid: string): Promise<IIdentifier> {
await accountsDB.open();
const account = (await accountsDB.accounts
.where("did")
.equals(activeDid)
.first()) as Account;
const identity = JSON.parse(account?.identity || "null");
if (!identity) {
throw new Error("Cannot submit a claim without an identifier.");
}
return identity;
}
async submitClaim() {
const fullClaim = JSON.parse(this.claimStr);
const result = await serverUtil.createAndSubmitClaim(