feat: enhance GenericVerifiableCredential interface with explicit optional properties
- Add name, description, and agent as optional properties to GenericVerifiableCredential - Improve type safety and IntelliSense for common claim properties - Maintain backward compatibility with existing code - Reduce need for type assertions when accessing claim properties
This commit is contained in:
@@ -12,9 +12,12 @@ import { nextTick } from "vue";
|
||||
import QRCode from "qrcode";
|
||||
|
||||
import { APP_SERVER, NotificationIface } from "../constants/app";
|
||||
import { db, retrieveSettingsForActiveAccount } from "../db/index";
|
||||
import * as databaseUtil from "../db/databaseUtil";
|
||||
import * as endorserServer from "../libs/endorserServer";
|
||||
import {
|
||||
GenericCredWrapper,
|
||||
GenericVerifiableCredential,
|
||||
} from "../interfaces/common";
|
||||
import { logger } from "../utils/logger";
|
||||
import { PlatformServiceFactory } from "@/services/PlatformServiceFactory";
|
||||
import { Contact } from "@/db/tables/contacts";
|
||||
@@ -66,9 +69,7 @@ export default class ClaimReportCertificateView extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
async drawCanvas(
|
||||
claimData: endorserServer.GenericCredWrapper<endorserServer.GenericVerifiableCredential>,
|
||||
) {
|
||||
async drawCanvas(claimData: GenericCredWrapper<GenericVerifiableCredential>) {
|
||||
const platformService = PlatformServiceFactory.getInstance();
|
||||
const dbAllContacts = await platformService.dbQuery(
|
||||
"SELECT * FROM contacts",
|
||||
|
||||
Reference in New Issue
Block a user