Commit 8d503da
authored
fix: handling of token page throttling (#1100)
The token page is prone to being throttled because it tries to load in
order books for the "top 10 tokens". This change moves logic to useQuery
and out of redux. It then makes sure the token's information is loaded
in before trying to load in dex pairs.
Fixes #790
### Type of Change
<!--
Please check relevant options, delete irrelevant ones.
-->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [x] Refactor (non-breaking change that only restructures code)
- [x] Tests (You added tests for code that already exists, or your new
feature included in this PR)
- [ ] Documentation Updates
- [ ] Translation Updates
- [ ] Release
### TypeScript/Hooks Update
- [ ] Updated files to React Hooks
- [x] Updated files to TypeScript
## Before / After
### Before

### After
1 parent 12e04fa commit 8d503da
File tree
11 files changed
+86
-371
lines changed- src
- containers
- App
- Token
- TokenHeader
- test
- test
- rippled
11 files changed
+86
-371
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | 2 | | |
8 | 3 | | |
9 | | - | |
10 | 4 | | |
11 | 5 | | |
12 | 6 | | |
13 | 7 | | |
14 | 8 | | |
15 | 9 | | |
16 | 10 | | |
| 11 | + | |
17 | 12 | | |
18 | 13 | | |
19 | 14 | | |
| |||
23 | 18 | | |
24 | 19 | | |
25 | 20 | | |
26 | | - | |
27 | 21 | | |
28 | 22 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 23 | + | |
44 | 24 | | |
45 | 25 | | |
46 | | - | |
47 | | - | |
| 26 | + | |
48 | 27 | | |
49 | 28 | | |
50 | 29 | | |
51 | | - | |
52 | 30 | | |
53 | 31 | | |
54 | 32 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 33 | + | |
60 | 34 | | |
61 | 35 | | |
62 | | - | |
63 | | - | |
64 | 36 | | |
65 | 37 | | |
66 | 38 | | |
| |||
156 | 128 | | |
157 | 129 | | |
158 | 130 | | |
159 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
160 | 134 | | |
161 | 135 | | |
162 | 136 | | |
| |||
201 | 175 | | |
202 | 176 | | |
203 | 177 | | |
204 | | - | |
205 | 178 | | |
206 | 179 | | |
207 | 180 | | |
| |||
213 | 186 | | |
214 | 187 | | |
215 | 188 | | |
216 | | - | |
217 | | - | |
218 | | - | |
| 189 | + | |
219 | 190 | | |
220 | 191 | | |
221 | 192 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments