Considerable cleanup and merge

This commit is contained in:
Matthew Raymer
2023-07-06 16:59:50 +08:00
parent f568149745
commit 3b41014083
8 changed files with 196 additions and 130 deletions

View File

@@ -172,7 +172,9 @@ export default class ContactsView extends Vue {
const account = R.find((acc) => acc.did === activeDid, accounts);
const identity = JSON.parse(account?.identity || "null");
if (!identity) {
throw new Error("No identity found.");
throw new Error(
"An ID is chosen but there are no keys for it so it cannot be used to talk with the service."
);
}
// load all the time I have given to them
@@ -271,7 +273,9 @@ export default class ContactsView extends Vue {
const account = R.find((acc) => acc.did === this.activeDid, accounts);
const identity = JSON.parse(account?.identity || "null");
if (!identity) {
throw new Error("No identity found.");
throw new Error(
"An ID is chosen but there are no keys for it so it cannot be used to talk with the service."
);
}
if (identity.keys[0].privateKeyHex !== null) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion