forked from trent_larson/crowd-funder-for-time-pwa
Test "You" explicitly; fallback is "Unnamed"
This commit is contained in:
@@ -263,10 +263,10 @@ export default class ContactGiftingView extends Vue {
|
||||
handleId: this.recipientProjectHandleId,
|
||||
};
|
||||
} else {
|
||||
// Check if the preserved recipient was "Unnamed" (empty DID) or a regular contact
|
||||
if (this.recipientDid === "") {
|
||||
// Recipient was "Unnamed"
|
||||
recipient = { did: "", name: "Unnamed" };
|
||||
// Check if the preserved recipient was "You" or a regular contact
|
||||
if (this.recipientDid === this.activeDid) {
|
||||
// Recipient was "You"
|
||||
recipient = { did: this.activeDid, name: "You" };
|
||||
} else if (this.recipientDid) {
|
||||
// Recipient was a regular contact
|
||||
recipient = {
|
||||
@@ -274,8 +274,8 @@ export default class ContactGiftingView extends Vue {
|
||||
name: this.recipientProjectName || "Someone",
|
||||
};
|
||||
} else {
|
||||
// Fallback to current user
|
||||
recipient = { did: this.activeDid, name: "You" };
|
||||
// Fallback to "Unnamed"
|
||||
recipient = { did: "", name: "Unnamed" };
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -291,10 +291,10 @@ export default class ContactGiftingView extends Vue {
|
||||
handleId: this.giverProjectHandleId,
|
||||
};
|
||||
} else {
|
||||
// Check if the preserved giver was "Unnamed" (empty DID) or a regular contact
|
||||
if (this.giverDid === "") {
|
||||
// Giver was "Unnamed"
|
||||
giver = { did: "", name: "Unnamed" };
|
||||
// Check if the preserved giver was "You" or a regular contact
|
||||
if (this.giverDid === this.activeDid) {
|
||||
// Giver was "You"
|
||||
giver = { did: this.activeDid, name: "You" };
|
||||
} else if (this.giverDid) {
|
||||
// Giver was a regular contact
|
||||
giver = {
|
||||
@@ -302,8 +302,8 @@ export default class ContactGiftingView extends Vue {
|
||||
name: this.giverProjectName || "Someone",
|
||||
};
|
||||
} else {
|
||||
// Fallback to current user
|
||||
giver = { did: this.activeDid, name: "You" };
|
||||
// Fallback to "Unnamed"
|
||||
giver = { did: "", name: "Unnamed" };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user