Commit 0939d16
committed
fix: use raw addresses as Plotly labels key to prevent slice merging
Plotly merges pie slices with duplicate labels and sums their values,
which would silently misrepresent LP concentration when two addresses
share the same custom label (e.g. both labelled 'Team Wallet').
Fix: use raw addresses as the key (guaranteed unique) and put
the resolved human names in (shown in legend) and
(shown in hover). Also:
- Remove duplicated truncateAddress, import from shared @/lib/format
- Narrow getLabel prop type to (string) => string; call site wraps adapter
- Update unit tests: rename _ params to _addr to pass ESLint no-unused-vars,
add duplicate-label collision test documenting the labels/text split1 parent e5ceeae commit 0939d16
File tree
2 files changed
+15
-5
lines changed- ui-dashboard/src/components
- __tests__
2 files changed
+15
-5
lines changedLines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | | - | |
37 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
| |||
81 | 87 | | |
82 | 88 | | |
83 | 89 | | |
| 90 | + | |
84 | 91 | | |
85 | 92 | | |
86 | 93 | | |
| |||
0 commit comments