feat: add custom local coins and coins-config file selection#3492
Open
CharlVS wants to merge 2 commits into
Open
feat: add custom local coins and coins-config file selection#3492CharlVS wants to merge 2 commits into
CharlVS wants to merge 2 commits into
Conversation
Add an advanced "Custom coins configuration" section in General Settings that lets users point KDF and the SDK at local coins and coins_config.json files instead of the bundled configuration. - New SettingsCustomCoinsPath widget that opens a file picker (pre-populating the starting directory on native, reading file content on web) and calls KomodoDefiSdk.setCustomCoinsPath / resetCustomCoinsPath. - Persist display labels via StoredSettings and SettingsBloc, and show a restart-required dialog after each change or reset. - Bump the komodo-defi-sdk submodule to the matching feat/local-coins-config commit that implements the SDK-layer feature. An app restart is required for changes to take effect.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Visit the preview URL for this PR (updated for commit 75952a6): https://walletrc--pull-3492-merge-f68gs49l.web.app (expires Tue, 23 Jun 2026 20:37:26 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc |
Rework the Custom coins configuration setting to be content-based, matching the SDK change. The picked file's content is now captured in memory (identically on native and web) instead of storing a filesystem path, and only the original file name is kept for display. - Read the selected file's bytes via the picker (withData) and pass a CustomCoinsFile snapshot to KomodoDefiSdk.setCustomCoins; drop the native path / initialDirectory handling. - Rename the setting widget to SettingsCustomCoins, the stored fields to customKdfCoinsFileName / customCoinsConfigFileName, and the events to CustomCoinsChanged / CustomCoinsReset. - Bump the komodo-defi-sdk submodule to the content-based rework. An app restart is still required for changes to take effect.
CharlVS
force-pushed
the
feat/local-coins-config
branch
2 times, most recently
from
June 16, 2026 20:31
01cf3dd to
75952a6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an advanced Custom coins configuration setting that lets users point KDF and the SDK at local
coinsandcoins_config.jsonfiles instead of the bundled configuration — useful for development and testing against local coin definitions.Two independent overrides are supported:
coinslist fed to mm2 at startup.coins_config.jsonconsumed by the SDK asset registry.SDK (
komodo-defi-sdk-flutter)Submodule bumped to branch
feat/local-coins-config:CustomCoinsFileSource(filesystem path on native, in-memory content on web) andFileCoinConfigProvider.CustomCoinsConfig: a persisted (Hive) registry loaded duringbootstrap()that supplies the parsed coins list to mm2 startup and an authoritative coins-config source to the asset manager and startup coins provider. Background coin updates are disabled while an override is active.KomodoDefiSdk:setCustomCoinsPath({ kdfCoins, coinsConfig })andresetCustomCoinsPath()— file selection is the host app's responsibility.App
SettingsCustomCoinsPathsection in General Settings that opens a file picker (pre-populating the starting directory on native, reading file content on web) and calls the SDK.StoredSettings/SettingsBloc; a restart-required dialog is shown after each change/reset.Behaviour notes
Testing
flutter analyzeis clean on the changed SDK and app files.Manual test files
Single-coin (DOC, a Komodo testnet UTXO coin) fixtures for manually exercising the two override slots, hosted as a gist (not committed to the repo). The DOC entries are copied verbatim from the bundled
coins.json/coins_config.json, so they parse, pass set-time validation, and are accepted by mm2.Gist: https://gist.github.com/CharlVS/477754b4012c619ea0f855e626bdc430
kdf_coins_DOC.json[ {…} ](raw mm2coins)coins_config_DOC.json{ "DOC": {…} }(coins_config.json)Download each file, pick it in Settings → General → Custom coins configuration, then fully restart. With the coins config file set, after restart the wallet's asset registry shows only DOC (clearest signal). Reset to bundled config reverts after a restart.