status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
298 stars 78 forks source link

[Wallet] Analyse and re-introduce the URL validation for Collectibles #15331

Open alexjba opened 4 months ago

alexjba commented 4 months ago

Description

We used to validate the collectibles URLs to avoid reaching 404 when user tries to navigate to the URL. This introduced some latency when opening the wallet and was temporarily removed.

The purpose of this task is to analyse and determine if we need URL validation. If we do, this task should also implement a non-blocking validator. If we can totally drop the validator, this task should remove the current implementation.

Context

https://github.com/status-im/status-desktop/issues/15321#issuecomment-2188214397

alaibe commented 4 months ago

Shall we only validate the url when opening the specific collectible or when clicking the link? I don't think we need to validate all the urls

@dlipicar

dlipicar commented 4 months ago

@alaibe There was a requirement from Design to not show links to websites that are gonna throw a 404, so we need to make this check when the screen becomes visible, not after the user clicks the link. If it makes our lives easier we could ask Design to review the requirement, but if this endpoint is getting called at any other situation than when the user clicks a Collectible to launch the CollectiblesDetails view, then that's the first big problem here. On top of that, I agree these checks should be async (loading animation wherever these buttons need to be, I guess) and not block the main thread. I guess that's another thing to check with Design.