Repository navigation
Commit 4656af4
committed
fix: show loading and unavailable states for operator balance and fee
The operator detail page rendered a confident "0 ETH" for Balance and
Annual Fee whenever the on-chain reads were pending or failing, because
useOperatorEarningsAndFees coalesced `data ?? 0n`.
- expose earningsStatus / feesStatus from the hook via combineQueryStatus
- treat fetchStatus "paused" as unavailable: a read that cannot reach the
RPC parks at status "pending" and never resolves to an error, which
would otherwise leave the UI on a skeleton indefinitely
- render a skeleton while pending and an explicit unavailable message
instead of a zero amount
- gate Withdraw and Update Fee on query success rather than on the
coalesced bigint, so a failed read no longer leaves Update Fee
clickable into the fee wizard
# Conflicts:
# src/app/routes/dashboard/operators/operator.tsx1 parent b2a88cc commit 4656af4
2 files changed
Lines changed: 109 additions & 20 deletions
File tree
- src
- app/routes/dashboard/operators
- hooks/operator
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
22 | 41 | | |
23 | 42 | | |
24 | 43 | | |
25 | 44 | | |
26 | 45 | | |
27 | | - | |
28 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
29 | 55 | | |
30 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
31 | 59 | | |
32 | 60 | | |
33 | 61 | | |
| |||
101 | 129 | | |
102 | 130 | | |
103 | 131 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
108 | 144 | | |
109 | 145 | | |
110 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
111 | 155 | | |
112 | 156 | | |
113 | 157 | | |
| |||
127 | 171 | | |
128 | 172 | | |
129 | 173 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
136 | 186 | | |
137 | 187 | | |
138 | 188 | | |
139 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
140 | 194 | | |
141 | 195 | | |
142 | 196 | | |
| |||
154 | 208 | | |
155 | 209 | | |
156 | 210 | | |
157 | | - | |
| 211 | + | |
158 | 212 | | |
159 | 213 | | |
160 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
7 | 25 | | |
8 | | - | |
9 | | - | |
| 26 | + | |
10 | 27 | | |
11 | | - | |
12 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
13 | 36 | | |
14 | 37 | | |
15 | 38 | | |
16 | 39 | | |
17 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
18 | 51 | | |
19 | 52 | | |
20 | 53 | | |
| |||
24 | 57 | | |
25 | 58 | | |
26 | 59 | | |
| 60 | + | |
| 61 | + | |
27 | 62 | | |
28 | 63 | | |
0 commit comments