From 2e530518b10cb27f61f54e88ce93fb7ae17bbbbf Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sat, 25 Mar 2023 20:00:58 -0600 Subject: [PATCH] fix latest transaction description tooltip --- src/views/ContactsView.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index 574efe3..338eb55 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -329,9 +329,10 @@ export default class ContactsView extends Vue { const prevAmount = contactUnconfirmed[recipDid] || 0; contactUnconfirmed[recipDid] = prevAmount + give.amount; } - const prevDesc = contactDescriptions[recipDid] || ""; - // Since many make the tooltip too big, we'll just use the latest. - contactDescriptions[recipDid] = give.description || prevDesc; + if (!contactDescriptions[recipDid] && give.description) { + // Since many make the tooltip too big, we'll just use the latest. + contactDescriptions[recipDid] = give.description; + } } } //console.log("Done retrieving gives", contactConfirmed); @@ -382,9 +383,10 @@ export default class ContactsView extends Vue { const prevAmount = contactUnconfirmed[give.agentDid] || 0; contactUnconfirmed[give.agentDid] = prevAmount + give.amount; } - const prevDesc = contactDescriptions[give.agentDid] || ""; - // Since many make the tooltip too big, we'll just use the latest. - contactDescriptions[give.agentDid] = give.description || prevDesc; + if (!contactDescriptions[give.agentDid] && give.description) { + // Since many make the tooltip too big, we'll just use the latest. + contactDescriptions[give.agentDid] = give.description; + } } } //console.log("Done retrieving receipts", contactConfirmed);