diff --git a/src/components/GiftedDialog.vue b/src/components/GiftedDialog.vue index cb4d9f4..2ad08b0 100644 --- a/src/components/GiftedDialog.vue +++ b/src/components/GiftedDialog.vue @@ -2,7 +2,7 @@

- {{ customTitle || message + " " + giver?.name || "somebody not named" }} + {{ customTitle }}

void; - @Prop message = ""; @Prop projectId = ""; activeDid = ""; @@ -337,7 +334,7 @@ export default class GiftedDialog extends Vue { // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (error: any) { console.error("Error with give recordation caught:", error); - const message = + const errorMessage = error.userMessage || error.response?.data?.error?.message || "There was an error recording the give."; @@ -346,7 +343,7 @@ export default class GiftedDialog extends Vue { group: "alert", type: "danger", title: "Error", - text: message, + text: errorMessage, }, -1, ); diff --git a/src/libs/endorserServer.ts b/src/libs/endorserServer.ts index 5b0c881..a3b9c35 100644 --- a/src/libs/endorserServer.ts +++ b/src/libs/endorserServer.ts @@ -454,8 +454,8 @@ async function getHeaders(identity: IIdentifier | null) { } /** - * @param handleId nullable -- which means that "undefined" will be returned - * @param identity nullable -- which means no private info will be returned + * @param handleId nullable, in which case "undefined" will be returned + * @param identity nullable, in which case no private info will be returned * @param axios * @param apiServer */ @@ -464,7 +464,7 @@ export async function getPlanFromCache( identity: IIdentifier | null, axios: Axios, apiServer: string, -) { +): Promise { if (!handleId) { return undefined; } diff --git a/src/views/ClaimView.vue b/src/views/ClaimView.vue index a4290f9..066507e 100644 --- a/src/views/ClaimView.vue +++ b/src/views/ClaimView.vue @@ -146,7 +146,7 @@
- +

Confirmations

@@ -782,6 +782,7 @@ export default class ClaimView extends Vue { giver, undefined, this.veriClaim.handleId, + "Offer fulfilled by " + (giver?.name || "someone not named"), ); } diff --git a/src/views/ContactGiftingView.vue b/src/views/ContactGiftingView.vue index 4f76741..ac83472 100644 --- a/src/views/ContactGiftingView.vue +++ b/src/views/ContactGiftingView.vue @@ -66,11 +66,7 @@ - + @@ -167,7 +163,12 @@ export default class ContactGiftingView extends Vue { const recipient = this.projectId ? undefined : { did: this.activeDid, name: "you" }; - (this.$refs.customDialog as GiftedDialog).open(giver, recipient); + (this.$refs.customDialog as GiftedDialog).open( + giver, + recipient, + undefined, + "Given by " + (giver?.name || "someone not named"), + ); } } diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index 511d22d..fb2fec4 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -1101,7 +1101,7 @@ export default class ContactsView extends Vue { } let callback: (amount: number) => void; - let customTitle = "Given"; + let customTitle = ""; // choose whether to open dialog to user or from user if (giverDid == this.activeDid) { callback = (amount: number) => { @@ -1109,7 +1109,7 @@ export default class ContactsView extends Vue { newList[recipientDid] = (newList[recipientDid] || 0) + amount; this.givenByMeUnconfirmed = newList; }; - customTitle = "To " + receiver.name; + customTitle = "Given to " + receiver.name; } else { // must be (recipientDid == this.activeDid) callback = (amount: number) => { @@ -1117,7 +1117,7 @@ export default class ContactsView extends Vue { newList[giverDid] = (newList[giverDid] || 0) + amount; this.givenToMeUnconfirmed = newList; }; - customTitle = "From " + giver.name; + customTitle = "Received from " + giver.name; } (this.$refs.customGivenDialog as GiftedDialog).open( giver, diff --git a/src/views/GiftedDetails.vue b/src/views/GiftedDetails.vue index bf31a79..5eabe11 100644 --- a/src/views/GiftedDetails.vue +++ b/src/views/GiftedDetails.vue @@ -18,12 +18,9 @@

What Was Given

- {{ customTitle || message + " " + giverName || "somebody not named" }} -

-
From {{ giverName || "somebody not named" }} to {{ recipientName || "somebody not named" }} -
+