This repository was archived by the owner on Aug 26, 2025. It is now read-only.
Commit 30e5a24
Fix: Prevented incorrect error handling on getting token balances and corrected cGHS address for Alfajores (#205)
### Description
We couldn't get balances on Alfajores because of the incorrect error
handling on getting token balances - it was trying to get the balance of
the token with the address that is not correct (cGHS, this way we faced
the issue). Now, I replaced it with `try catch` block to prevent
throwing an error when there's an issue with some of the tokens.
Instead, we load all the tokens we can and display the responsive
console error to make it more understandable and prevent problems like
this.
### Other changes
Updated address for the 'cGHS' token.
### Tested
While token/s addresses are correct.
1. Navigate to the preview and connect your wallet where you have tokens
on the Alfajores.
2. Change the network to Alfajores.
3. Wait until the balances are loaded.
While token/s addresses are not correct
1. Check out the branch and change any token address to an incorrect
one.
2. Run locally and connect your wallet where you have tokens on the
Alfajores.
3. Change the network to Alfajores.
4. Wait until the warning notification toast is loaded and the console
error is displayed.
### Related issues
- Fixes #issue number here
### Checklist before requesting a review
- [ ] I have performed a self-review of my own code
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] The PR title follows the
[conventions](https://www.notion.so/Git-Branching-and-Commit-Message-Conventions-18f66f7d06444cfcbac5725ffbc7c04a?pvs=4#9355048863c549ef92fe210a8a1298aa)
- [ ] I have run the [regression
tests](https://www.notion.so/Mento-Web-App-Regression-Tests-37bd43a7da8d4e38b65993320a33d557)
Co-authored-by: chapati <philip.paetz@me.com>1 parent acdc35a commit 30e5a24
File tree
3 files changed
+32
-11
lines changed- src
- config
- features
- accounts
- polling
3 files changed
+32
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | | - | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 38 | + | |
| 39 | + | |
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
0 commit comments