-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimise coins asset files #87
Conversation
Load coins config files and icons from the github repository and branch specified in coins_ci.json
Exclude coin files from the repository as they will be downloaded using the python script when setting up dev environment or deploying
Cleans existing coin asset files and redownloads assets
coins
asset files sourcing
@takenagain thanks, it's looking good. Can you write a Flutter test that checks that all loaded coins have a corresponding coin icon? You won't be able to simply scan through the json coin data files and check that each entry has a matching file in the icons folder. You will need to use the app's logic to filter out coins that are not shown in the app (not all coins are supported) and then use the app's function for mapping coin ticker to the icon file name. |
@takenagain we have the runtime update parameters specified here. Please make the following changes:
The revised {
"bundled_coins_repo_commit": "8cb5983ab858dde915e8de3175c15cd0f5572356",
"coins_repo_url": "https://raw.githubusercontent.com/KomodoPlatform/coins",
"coins_repo_branch": "master",
"runtime_updates_enabled": true,
"mapped_files": {
"assets/coins_config.json": "utils/coins_config.json",
"assets/coins.json": "coins"
},
"mapped_folders": {
"assets/coin-icons/": "icons/"
}
}
|
Even though coin config files are updated at runtime, it’s a good idea to keep the bundled version up to date since it’s used on the first launch and is used as a fallback if update fails. NB: In the near future, these files will be dropped from the repo and instead rather fetched at CI build time in PR #87 (#87).
Modified from komodo-wallet-archive changes
Test that every coin in the add coin list has a corresponding icon file
The validate coins action was failing silently because of the coins_ci.json file location changing to the assets folder
This approach was abandoned in favour of asset transformation, which is integrated into Flutter's build process. |
Optimise repository size by removing coins asset files and replacing them with a Python script that downloads the assets in CI/CD pipelines and local developer build steps.
Changes:
coins
asset files from the coins repository.build-android
action and the README.md to use the Python script to download the coins asset files.