dedis / popstellar

Proof-of-personhood System
GNU Affero General Public License v3.0
35 stars 8 forks source link

Fixed constant display of error message when Social tab without Token #1849

Closed Kaz-ookid closed 5 months ago

Kaz-ookid commented 6 months ago

addressing issue #1848

Disabled error toast when the error is InvalidPoPTokenException, otherwise it would just pop multiple times for every single chirps. The same error is displayed once on opening the Social Tab in isOwner so the user is still aware that no token is available.

github-actions[bot] commented 6 months ago

Pull reviewers stats

Stats of the last 30 days for popstellar: User Total reviews Time to review Total comments
K1li4nL
🥇
7
▀▀
4d 5h 54m))
27
▀▀▀▀
t1b00
🥈
4
7d 16h 20m))
5
onsriahi14
🥉
4
1d 16h 23m))
1
arnauds5
3
18h 51m))
4
simone-kalbermatter
3
1d 15h 1m))
2
pierluca
2
13d 6h 29m))
▀▀
5
MariemBaccari
2
1d 5h 39m))
0
ljankoschek
2
18m))
0
matteosz
2
13d 20h 18m))
▀▀
1
DanielTavaresA
2
8d 4h 48m))
5
Tyratox
1
12d 20h 49m))
6
1florentin
1
2h 20m))
0
sgueissa
1
25m))
0
osm-alt
1
5d 17h 36m))
1
quadcopterman
1
10h 19m))
0
Kaz-ookid
1
15d 41m))
▀▀
5

⚡️ Pull request stats

Kaz-ookid commented 5 months ago

I've made some updates to the token check implementation. Here's a quick rundown:

Now, when opening the Social tab, we are not even getting a single toast error, but we are only getting it when trying to send a chirps while not having the token, I think it makes more sense. Finally, the error should trigger if there is an issue with the retrieval of the token, other than it being uninitialized.

This should handle the spamming issue more gracefully by centralizing the token validation and making our error handling smarter. Let me know if this works well on your end too.

matteosz commented 5 months ago

LGTM! Nice job also with testing, now the error handling is much cleaner :)

Tests are failing because it hasn't been formatted, so remember to format and then either squash the commit or push it as is

CLAassistant commented 5 months ago

CLA assistant check
All committers have signed the CLA.

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed for 'PoP - PoPCHA-Web-Client'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed for 'PoP - Be2-Scala'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed for 'PoP - Be1-Go'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed for 'PoP - Fe1-Web'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed for 'PoP - Fe2-Android'

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
65.6% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud