fix some errors and correct recent type duplications & bloat (cherry-picked from d8f2587d1c)

This commit is contained in:
2025-05-31 22:36:15 -06:00
parent 4327a5175c
commit 24cfeca1eb
16 changed files with 264 additions and 346 deletions

View File

@@ -182,7 +182,7 @@ import QuickNav from "../components/QuickNav.vue";
import TopMessage from "../components/TopMessage.vue";
import { NotificationIface, USE_DEXIE_DB } from "../constants/app";
import { db, retrieveSettingsForActiveAccount } from "../db/index";
import { GenericCredWrapper, OfferVerifiableCredential } from "../interfaces";
import { GenericCredWrapper, OfferClaim } from "../interfaces";
import {
createAndSubmitOffer,
didInfo,
@@ -268,7 +268,7 @@ export default class OfferDetailsView extends Vue {
/** Offer ID for editing */
offerId = "";
/** Previous offer data for editing */
prevCredToEdit?: GenericCredWrapper<OfferVerifiableCredential>;
prevCredToEdit?: GenericCredWrapper<OfferClaim>;
/** Project ID if offer is for project */
projectId = "";
/** Project name display */
@@ -330,7 +330,7 @@ export default class OfferDetailsView extends Vue {
this.prevCredToEdit = (this.$route.query["prevCredToEdit"] as string)
? (JSON.parse(
this.$route.query["prevCredToEdit"] as string,
) as GenericCredWrapper<OfferVerifiableCredential>)
) as GenericCredWrapper<OfferClaim>)
: undefined;
} catch (error: unknown) {
this.$notify(
@@ -768,7 +768,7 @@ export default class OfferDetailsView extends Vue {
: undefined;
const projectId = this.offeredToProject ? this.projectId : undefined;
const offerClaim = hydrateOffer(
this.prevCredToEdit?.claim as OfferVerifiableCredential,
this.prevCredToEdit?.claim as OfferClaim,
this.activeDid,
recipientDid,
this.descriptionOfItem,