Browse Source

fix latest transaction description tooltip

pull/15/head
Trent Larson 2 years ago
parent
commit
2e530518b1
  1. 14
      src/views/ContactsView.vue

14
src/views/ContactsView.vue

@ -329,9 +329,10 @@ export default class ContactsView extends Vue {
const prevAmount = contactUnconfirmed[recipDid] || 0; const prevAmount = contactUnconfirmed[recipDid] || 0;
contactUnconfirmed[recipDid] = prevAmount + give.amount; contactUnconfirmed[recipDid] = prevAmount + give.amount;
} }
const prevDesc = contactDescriptions[recipDid] || ""; if (!contactDescriptions[recipDid] && give.description) {
// Since many make the tooltip too big, we'll just use the latest. // Since many make the tooltip too big, we'll just use the latest.
contactDescriptions[recipDid] = give.description || prevDesc; contactDescriptions[recipDid] = give.description;
}
} }
} }
//console.log("Done retrieving gives", contactConfirmed); //console.log("Done retrieving gives", contactConfirmed);
@ -382,9 +383,10 @@ export default class ContactsView extends Vue {
const prevAmount = contactUnconfirmed[give.agentDid] || 0; const prevAmount = contactUnconfirmed[give.agentDid] || 0;
contactUnconfirmed[give.agentDid] = prevAmount + give.amount; contactUnconfirmed[give.agentDid] = prevAmount + give.amount;
} }
const prevDesc = contactDescriptions[give.agentDid] || ""; if (!contactDescriptions[give.agentDid] && give.description) {
// Since many make the tooltip too big, we'll just use the latest. // Since many make the tooltip too big, we'll just use the latest.
contactDescriptions[give.agentDid] = give.description || prevDesc; contactDescriptions[give.agentDid] = give.description;
}
} }
} }
//console.log("Done retrieving receipts", contactConfirmed); //console.log("Done retrieving receipts", contactConfirmed);

Loading…
Cancel
Save