Skip to content

Conversation

@kirillt
Copy link
Member

@kirillt kirillt commented Mar 12, 2025

📌 Description

We want to avoid the "no connection" screen at all cost. That's why same JSON files (crypto rates and fiat rates) should be included into the installer itself. The update schedule is not so important here though, even weekly is fine for the start.

When the app fails to refresh rates, it should also check if we've already downloaded the rates at least once. If yes, then take the downloaded exchange rates. If no, take the pre-packaged rates from the fallback JSONs.

Now, it'll be guaranteed that the app works offline under any circumstances. Otherwise, this could become a problem when we remove our cache repo and query the APIs directly. There will be much more potential reasons why updating could fail: server unreachable, exceeding quota, not supported in user's region, etc.

✅ Changes

  • Added GitHub Actions workflow fetch.yml

🎯 How to Test

  1. Launch the app with clean state (first launch) without internet.
  2. Must see outdated exchange rates.
  3. Must not see the "no connectivity" splash screen.

🆘 TODO

  • Fix paths near the ADJUST PATH HERE comments.
  • Remove the ADJUST PATH HERE comments.
  • Adjust rates fetch logic in the app to use fallback when the rates have never been fetched yet and there is no internet connection to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants