add maximum amount share to value metric in insights explorer

This commit is contained in:
MaysWind
2026-04-19 21:18:39 +08:00
parent e69df56874
commit d39494a78e
21 changed files with 27 additions and 0 deletions
+6
View File
@@ -1359,6 +1359,12 @@ export const useExplorersStore = defineStore('explorers', () => {
} else {
value = 0;
}
} else if (valueMetric === TransactionExplorerValueMetric.SourceMaximumAmountShare) {
if (allSourceAmountsInDefaultCurrency.length > 0) {
value = maximumSourceAmountInDefaultCurrency !== Number.MIN_SAFE_INTEGER ? 100.0 * maximumSourceAmountInDefaultCurrency / totalSourceAmountSumInDefaultCurrency : 0;
} else {
value = 0;
}
} else if (valueMetric === TransactionExplorerValueMetric.SourceTop5AmountSum) {
if (allSourceAmountsInDefaultCurrency.length > 0) {
allSourceAmountsInDefaultCurrency.sort((a, b) => a - b);