Browse Source

Test "You" explicitly; fallback is "Unnamed"

get-get-hash
Jose Olarte III 7 days ago
parent
commit
795df6a8fb
  1. 24
      src/views/ContactGiftingView.vue

24
src/views/ContactGiftingView.vue

@ -263,10 +263,10 @@ export default class ContactGiftingView extends Vue {
handleId: this.recipientProjectHandleId, handleId: this.recipientProjectHandleId,
}; };
} else { } else {
// Check if the preserved recipient was "Unnamed" (empty DID) or a regular contact // Check if the preserved recipient was "You" or a regular contact
if (this.recipientDid === "") { if (this.recipientDid === this.activeDid) {
// Recipient was "Unnamed" // Recipient was "You"
recipient = { did: "", name: "Unnamed" }; recipient = { did: this.activeDid, name: "You" };
} else if (this.recipientDid) { } else if (this.recipientDid) {
// Recipient was a regular contact // Recipient was a regular contact
recipient = { recipient = {
@ -274,8 +274,8 @@ export default class ContactGiftingView extends Vue {
name: this.recipientProjectName || "Someone", name: this.recipientProjectName || "Someone",
}; };
} else { } else {
// Fallback to current user // Fallback to "Unnamed"
recipient = { did: this.activeDid, name: "You" }; recipient = { did: "", name: "Unnamed" };
} }
} }
} else { } else {
@ -291,10 +291,10 @@ export default class ContactGiftingView extends Vue {
handleId: this.giverProjectHandleId, handleId: this.giverProjectHandleId,
}; };
} else { } else {
// Check if the preserved giver was "Unnamed" (empty DID) or a regular contact // Check if the preserved giver was "You" or a regular contact
if (this.giverDid === "") { if (this.giverDid === this.activeDid) {
// Giver was "Unnamed" // Giver was "You"
giver = { did: "", name: "Unnamed" }; giver = { did: this.activeDid, name: "You" };
} else if (this.giverDid) { } else if (this.giverDid) {
// Giver was a regular contact // Giver was a regular contact
giver = { giver = {
@ -302,8 +302,8 @@ export default class ContactGiftingView extends Vue {
name: this.giverProjectName || "Someone", name: this.giverProjectName || "Someone",
}; };
} else { } else {
// Fallback to current user // Fallback to "Unnamed"
giver = { did: this.activeDid, name: "You" }; giver = { did: "", name: "Unnamed" };
} }
} }
} }

Loading…
Cancel
Save