|
@ -415,6 +415,7 @@ export default class HomeView extends Vue { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
giveDescription(giveRecord: GiveServerRecord) { |
|
|
giveDescription(giveRecord: GiveServerRecord) { |
|
|
|
|
|
// similar code is in endorser-mobile utility.ts |
|
|
// claim.claim happen for some claims wrapped in a Verifiable Credential |
|
|
// claim.claim happen for some claims wrapped in a Verifiable Credential |
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
|
|
const claim = (giveRecord.fullClaim as any).claim || giveRecord.fullClaim; |
|
|
const claim = (giveRecord.fullClaim as any).claim || giveRecord.fullClaim; |
|
@ -429,7 +430,7 @@ export default class HomeView extends Vue { |
|
|
); |
|
|
); |
|
|
const gaveAmount = claim.object?.amountOfThisGood |
|
|
const gaveAmount = claim.object?.amountOfThisGood |
|
|
? this.displayAmount(claim.object.unitCode, claim.object.amountOfThisGood) |
|
|
? this.displayAmount(claim.object.unitCode, claim.object.amountOfThisGood) |
|
|
: claim.description || "something unknown"; |
|
|
: claim.description || "something without description"; |
|
|
// recipient.did is for legacy data, before March 2023 |
|
|
// recipient.did is for legacy data, before March 2023 |
|
|
const gaveRecipientId = |
|
|
const gaveRecipientId = |
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
|
@ -443,7 +444,7 @@ export default class HomeView extends Vue { |
|
|
this.allContacts, |
|
|
this.allContacts, |
|
|
) |
|
|
) |
|
|
: ""; |
|
|
: ""; |
|
|
return giverInfo + " gave " + gaveAmount + gaveRecipientInfo; |
|
|
return giverInfo + " gave" + gaveRecipientInfo + ": " + gaveAmount; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
displayAmount(code: string, amt: number) { |
|
|
displayAmount(code: string, amt: number) { |
|
|