improve give descriptions, bump to v 0.1.1

This commit is contained in:
2023-10-31 20:53:39 -06:00
parent 2a9ff8aa77
commit 7305606546
5 changed files with 8 additions and 7 deletions

View File

@@ -415,6 +415,7 @@ export default class HomeView extends Vue {
}
giveDescription(giveRecord: GiveServerRecord) {
// similar code is in endorser-mobile utility.ts
// claim.claim happen for some claims wrapped in a Verifiable Credential
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const claim = (giveRecord.fullClaim as any).claim || giveRecord.fullClaim;
@@ -429,7 +430,7 @@ export default class HomeView extends Vue {
);
const gaveAmount = 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
const gaveRecipientId =
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -443,7 +444,7 @@ export default class HomeView extends Vue {
this.allContacts,
)
: "";
return giverInfo + " gave " + gaveAmount + gaveRecipientInfo;
return giverInfo + " gave" + gaveRecipientInfo + ": " + gaveAmount;
}
displayAmount(code: string, amt: number) {