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

@@ -268,7 +268,7 @@ import {
} from "../constants/app";
import { db, retrieveSettingsForActiveAccount } from "../db/index";
import * as databaseUtil from "../db/databaseUtil";
import { GenericCredWrapper, GiveVerifiableCredential } from "../interfaces";
import { GenericCredWrapper, GiveActionClaim } from "../interfaces";
import {
createAndSubmitGive,
didInfo,
@@ -311,7 +311,7 @@ export default class GiftedDetails extends Vue {
imageUrl = "";
message = "";
offerId = "";
prevCredToEdit?: GenericCredWrapper<GiveVerifiableCredential>;
prevCredToEdit?: GenericCredWrapper<GiveActionClaim>;
providerProjectId = "";
providerProjectName = "a project";
providedByProject = false; // basically static, based on input; if we allow changing then let's fix things (see below)
@@ -328,7 +328,7 @@ export default class GiftedDetails extends Vue {
this.prevCredToEdit = (this.$route.query["prevCredToEdit"] as string)
? (JSON.parse(
this.$route.query["prevCredToEdit"] as string,
) as GenericCredWrapper<GiveVerifiableCredential>)
) as GenericCredWrapper<GiveActionClaim>)
: undefined;
} catch (error) {
this.$notify(
@@ -883,7 +883,7 @@ export default class GiftedDetails extends Vue {
? this.fulfillsProjectId
: undefined;
const giveClaim = hydrateGive(
this.prevCredToEdit?.claim as GiveVerifiableCredential,
this.prevCredToEdit?.claim as GiveActionClaim,
giverDid,
recipientDid,
this.description,