forked from jsnbuchanan/crowd-funder-for-time-pwa
consolidate getIdentity & remove dups
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user