Safe-react: Assets taking too long to show in newly created safes

Created on 29 Mar 2021  路  11Comments  路  Source: gnosis/safe-react

version: 3.3.0
Env: https://pr2079--safereact.review.gnosisdev.com/rinkeby/app/#/safes/0x2ED30ba9dC7449aC17D932ebF99E7952C4A70558/balances

Create a safe, you will be taken to the "Assets" page right away
The table takes a long time to load

Snapshot of the network console:
image.png

image.png

Bug 馃悰 Major on hold

Most helpful comment

Tried in the 2122 to load a safe I got with a bunch of tokens in the Assets tab
0x9913B9180C20C6b0F21B6480c84422F6ebc4B808

I loaded it several times (cleaning storage and cache in between every try) and it always was pretty fast loading the table.

Looks good to me

All 11 comments

Labeled this as major as it is giving a rather bad impression to new users creating a new account.

I've been taking a look to this and it is not a problem related to the front end but the client gateway (After creating a safe, the backend returns a success response after 15/20 retries with 404 not found error). @lukasschor who could give a hand on this from the backend team ?

That would be @jpalvarezl :)

If the core services tell us that the safe exists we invalidate the caches, even if not there is a 1 minute timeout.
You should still handle 404 better in the interface (e.g. display an empty list and an error message, or a list with eth as 0 and an error message). Right now the interface does nothing which causes confusion.

Edit: most safes have 0 assests after being created, so showing an list with eth as 0 would probably make the most sense

@rmeissner Indeed. We have a separate ticket(https://github.com/gnosis/safe-react/issues/2139) for that.

I think we should display the proper asset list in some way and not just a loading spinner or even an error.

So I would just mock the list and show Ether = 0 until we get a response from the gateway (-> it's anyways the case for all newly created Safes via our interface and it already shows the user what type of data will be displayed here)

Because this seems to be expected behavior for all newly created Safes, I don't think showing an error would be a nice first impression for the user.

For other cases where the interface is waiting for a backend response, using e.g. Skeletons would be nice to show that the asset information is being loaded.

So while #2139 might already make things a bit better, as the user at least is aware that something is loading. We should maybe have this ticket for a proper solution such as the one suggested above. (Assuming nothing can be changed on the way the gateway handles this to speed up the time until the first response)

I get the point. In my opinion, I would do #2139 ticket first and waiting for the backend team to see if there is a solution for the long waiting time. Maybe it could be addressed and using the spinner would be enough. If don't, we could do the approach that you suggested above. WDYT @lukasschor ?

I'll mark it as on-hold until we get an update from the backend.

I just want to add that this may be fixed in https://github.com/gnosis/safe-react/pull/2122#issuecomment-821836310. By adding the "Loading your Safe" status, and waiting for proper data to be returned by the services this issue shouldn't happen.

I just testing this with #2122 as suggested by Fer. Since that Pr introduces this spinner to wait until the backend knows about the Safe, this issue is implicitly fixed as well.

Will move this to Ready for QA so @francovenica and @liliya-soroka can verify/close it with the caveat that it can only be tested once #2122 is merged.

Tried in the 2122 to load a safe I got with a bunch of tokens in the Assets tab
0x9913B9180C20C6b0F21B6480c84422F6ebc4B808

I loaded it several times (cleaning storage and cache in between every try) and it always was pretty fast loading the table.

Looks good to me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

katspaugh picture katspaugh  路  5Comments

lukasschor picture lukasschor  路  4Comments

tschubotz picture tschubotz  路  6Comments

rmeissner picture rmeissner  路  6Comments

francovenica picture francovenica  路  6Comments