dcrdex icon indicating copy to clipboard operation
dcrdex copied to clipboard

mm: overview page doesn't initialize sometimes (no fiat rate)

Open norwnd opened this issue 11 months ago • 0 comments

Occasionally /mm page won't load for me (robot-icon won't stop spinning), and I see the following error in console:

Image

Relevant piece of code is here, it seems the reason has to do with a (probably temporary) failure to fetch fiat rate(s):

2025-01-18 20:45:17.206 [ERR] WEB: error getting market report: auto-synced market has an expired price
2025-01-18 20:45:17.206 [TRC] MUX: "POST http://127.0.0.1:3333/api/marketreport HTTP/1.1" from 127.0.0.1:52022 - 200 61B in 196.375µs
2025-01-18 20:45:17.206 [ERR] WEB: error getting market report: auto-synced market has an expired price
2025-01-18 20:45:17.206 [TRC] MUX: "POST http://127.0.0.1:3333/api/marketreport HTTP/1.1" from 127.0.0.1:52021 - 200 61B in 75.5µs
2

I think the solution would look something like this:

  • maybe in most cases this issue can be completely prevented by waiting (& retrying if needed) for some time during initialization
  • and when error is not going away (eg. fiat rates simply cannot be fetched) handle it in JS to display in UI

norwnd avatar Jan 18 '25 22:01 norwnd