Fix: re-organize entity type conditional logic in gifting flow

- Add conditional checks for person vs project entity types when setting DID fields
- Simplify project ID assignment logic by removing redundant entity type checks
- Preserve existing recipient context when selecting givers in ContactGiftingView, especially when dealing with "Unnamed" entity
This commit is contained in:
Jose Olarte III
2025-08-07 18:29:58 +08:00
parent 18e6aa5a9a
commit bf08e57ce7
4 changed files with 51 additions and 32 deletions

View File

@@ -261,12 +261,13 @@ export default class EntitySelectionStep extends Vue {
giverProjectName: this.giver?.name || "",
giverProjectImage: this.giver?.image || "",
giverProjectHandleId: this.giver?.handleId || "",
giverDid: this.giver?.did || "",
giverDid: this.giverEntityType === "person" ? this.giver?.did || "" : "",
recipientProjectId: this.toProjectId || "",
recipientProjectName: this.receiver?.name || "",
recipientProjectImage: this.receiver?.image || "",
recipientProjectHandleId: this.receiver?.handleId || "",
recipientDid: this.receiver?.did || "",
recipientDid:
this.recipientEntityType === "person" ? this.receiver?.did || "" : "",
};
}