Skip to content

fix(activation): eth PrivateKeyPolicy enum breaking changes#96

Merged
CharlVS merged 7 commits intodevfrom
fix/eth-activation-breaking-changes
Jun 25, 2025
Merged

fix(activation): eth PrivateKeyPolicy enum breaking changes#96
CharlVS merged 7 commits intodevfrom
fix/eth-activation-breaking-changes

Conversation

@takenagain
Copy link
Copy Markdown
Contributor

@takenagain takenagain commented Jun 24, 2025

Updates the PrivateKeyPolicy enum to cater for the new EVM-specific WalletConnect policy structure. Changed from enum to freezed Union types.

EVM/ETH activation functions structure:

{
  ...
  "priv_key_policy": { 
    "type": "WalletConnect", 
    "session_topic": "your_session_topic" 
  }
}

Everything else:

{
  ...
  "priv_key_policy": "ContextPrivKey"
}

Summary by CodeRabbit

  • New Features

    • Added integration tests for wallet creation and coin activation in the example app.
    • Introduced unique keys to various UI elements for improved widget identification and testability.
  • Bug Fixes

    • Enhanced support for legacy and modern private key policy formats, ensuring robust serialization and deserialization.
  • Refactor

    • Replaced enum-based private key policies with extensible union types for greater flexibility.
    • Updated default values and equality checks for private key policies to use constant constructors across the app.
  • Tests

    • Added comprehensive unit tests for private key policy parsing and serialization.
  • Chores

    • Updated configuration files and dependencies to support integration testing and improved code analysis.

@takenagain takenagain self-assigned this Jun 24, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jun 24, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This change refactors all usages of the PrivateKeyPolicy type from static enum-like references to constant constructor invocations throughout the codebase. It replaces the enum with a freezed union type, updates default values, comparisons, and serialization/deserialization logic, and adds comprehensive tests and integration testing support. UI widget keys are also introduced for improved testability.

Changes

File(s) / Group Change Summary
activation_params.dart, eth_activation_params.dart, tendermint_activation_params.dart, utxo_activation_params.dart Refactored PrivateKeyPolicy from enum to freezed union; updated all usages, constructors, serialization, and deserialization logic; added new parsing and serialization methods.
activation_params.freezed.dart, activation_params.g.dart Added/generated sealed class and JSON serialization code for PrivateKeyPolicy union.
private_key_policy_legacy_json_test.dart, private_key_policy_test.dart Added comprehensive tests for legacy and modern PrivateKeyPolicy parsing, serialization, and error handling.
komodo_defi_local_auth.dart, trezor_auth_service.dart, auth_event.dart, trezor_auth_mixin.dart Updated all PrivateKeyPolicy comparisons and assignments to use constant constructors instead of static enum values.
auth_options.dart, protocol_class.dart, qtum_protocol.dart, utxo_protocol.dart, activation_manager.dart Updated default parameter values and equality checks for PrivateKeyPolicy to use constant constructor invocations.
analysis_options.yaml, index_generator.yaml, pubspec.yaml (both packages) Minor config changes: added/removed blank lines, updated analysis options, added integration test dependency.
coin_activation_test.dart, test_driver/integration_test.dart Added new integration test and test driver for wallet creation and coin activation flows.
asset_page.dart, instance_assets_list.dart, seed_dialog.dart, instance_view.dart Added explicit Flutter widget keys to various UI elements for improved testability and widget identification.

Sequence Diagram(s)

sequenceDiagram
    participant UI
    participant AuthOptions
    participant PrivateKeyPolicy
    participant ActivationParams

    UI->>AuthOptions: Create (privKeyPolicy: const PrivateKeyPolicy.trezor())
    AuthOptions->>PrivateKeyPolicy: Serialize to JSON
    PrivateKeyPolicy-->>AuthOptions: JSON object
    AuthOptions->>ActivationParams: Pass privKeyPolicy
    ActivationParams->>PrivateKeyPolicy: Deserialize from JSON/legacy
    PrivateKeyPolicy-->>ActivationParams: Union instance
Loading

Possibly related PRs

Suggested labels

bug

Suggested reviewers

  • CharlVS

Poem

In the warren of code, a rabbit did hop,
Swapping enums for unions—oh, what a swap!
With constants and keys, the widgets align,
Now tests can discover each widget just fine.
Serialization’s robust, old bugs out of sight—
This bunny’s refactor brings code delight! 🐇✨


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@takenagain
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jun 24, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (5)
packages/komodo_defi_sdk/example/lib/widgets/assets/instance_assets_list.dart (1)

49-51: Extract hard-coded widget keys into a typed constants file

Key('asset_list') is fine for a one-off, but the string literal can easily drift or be reused with typos across tests.
Create a small ui_keys.dart (or similar) exporting typed const values – this keeps keys discoverable and enforces compile-time reuse.

-          key: const Key('asset_list'),
+          key: UiKeys.assetList,
packages/komodo_defi_sdk/example/lib/widgets/auth/seed_dialog.dart (1)

149-151: Apply the same key-extraction pattern for the dialog button

Same rationale as above – moving 'dialog_register_button' to a central constants file keeps tests resilient to renames.

-          key: const Key('dialog_register_button'),
+          key: UiKeys.dialogRegisterButton,
packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/eth_activation_params.dart (1)

75-76: Update outdated comment.

The comment mentions "expected enum format" but the code now calls toJson() which produces JSON structure, not enum format.

-      // override privKeyPolicy to ensure it is in the expected enum format
+      // include privKeyPolicy in JSON format
       'priv_key_policy': privKeyPolicy?.toJson(),
packages/komodo_defi_sdk/example/integration_test/coin_activation_test.dart (1)

28-79: Consider removing runZonedGuarded wrapper

Using runZonedGuarded to catch all exceptions might hide legitimate test failures. Integration tests should fail visibly when there are actual issues to ensure problems are detected in CI/CD pipelines.

Consider removing the error suppression or at least re-throwing the error after logging:

-        } catch (e, stackTrace) {
-          print('❌ Test failed with error: $e');
-          print('Stack trace: $stackTrace');
-          // Do not rethrow, just log and ignore
-        }
+        } catch (e, stackTrace) {
+          print('❌ Test failed with error: $e');
+          print('Stack trace: $stackTrace');
+          rethrow;
+        }
packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/activation_params.dart (1)

163-163: Potential JSON serialization inconsistency

The @Freezed annotation uses FreezedUnionCase.pascal which generates PascalCase type values in JSON. This might not align with typical snake_case JSON conventions used elsewhere in the codebase.

#!/bin/bash
# Description: Check JSON serialization conventions in the codebase

# Look for other freezed annotations to check naming conventions
rg "@Freezed.*unionValueCase" -A 2 -B 2

# Check JSON field naming in activation params
rg "JsonKey.*name.*:" packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/

If snake_case is the standard convention, consider:

-@Freezed(unionKey: 'type', unionValueCase: FreezedUnionCase.pascal)
+@Freezed(unionKey: 'type', unionValueCase: FreezedUnionCase.snake)
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2a50691 and 22c3887.

⛔ Files ignored due to path filters (2)
  • packages/komodo_defi_sdk/example/macos/Podfile.lock is excluded by !**/*.lock
  • packages/komodo_defi_sdk/example/pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (27)
  • packages/komodo_defi_local_auth/lib/src/komodo_defi_local_auth.dart (4 hunks)
  • packages/komodo_defi_local_auth/lib/src/trezor/trezor_auth_service.dart (2 hunks)
  • packages/komodo_defi_rpc_methods/analysis_options.yaml (1 hunks)
  • packages/komodo_defi_rpc_methods/index_generator.yaml (2 hunks)
  • packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/activation_params.dart (7 hunks)
  • packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/activation_params.freezed.dart (1 hunks)
  • packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/activation_params.g.dart (1 hunks)
  • packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/eth_activation_params.dart (5 hunks)
  • packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/tendermint_activation_params.dart (2 hunks)
  • packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/utxo_activation_params.dart (2 hunks)
  • packages/komodo_defi_rpc_methods/pubspec.yaml (1 hunks)
  • packages/komodo_defi_rpc_methods/test/src/common_structures/activation/activation_params/private_key_policy_legacy_json_test.dart (1 hunks)
  • packages/komodo_defi_rpc_methods/test/src/common_structures/activation/activation_params/private_key_policy_test.dart (1 hunks)
  • packages/komodo_defi_sdk/example/integration_test/coin_activation_test.dart (1 hunks)
  • packages/komodo_defi_sdk/example/lib/blocs/auth/auth_event.dart (2 hunks)
  • packages/komodo_defi_sdk/example/lib/blocs/auth/trezor_auth_mixin.dart (1 hunks)
  • packages/komodo_defi_sdk/example/lib/screens/asset_page.dart (1 hunks)
  • packages/komodo_defi_sdk/example/lib/widgets/assets/instance_assets_list.dart (1 hunks)
  • packages/komodo_defi_sdk/example/lib/widgets/auth/seed_dialog.dart (1 hunks)
  • packages/komodo_defi_sdk/example/lib/widgets/instance_manager/instance_view.dart (3 hunks)
  • packages/komodo_defi_sdk/example/pubspec.yaml (1 hunks)
  • packages/komodo_defi_sdk/example/test_driver/integration_test.dart (1 hunks)
  • packages/komodo_defi_sdk/lib/src/activation/activation_manager.dart (1 hunks)
  • packages/komodo_defi_types/lib/src/auth/auth_options.dart (2 hunks)
  • packages/komodo_defi_types/lib/src/coin_classes/protocol_class.dart (1 hunks)
  • packages/komodo_defi_types/lib/src/protocols/qtum/qtum_protocol.dart (1 hunks)
  • packages/komodo_defi_types/lib/src/protocols/utxo/utxo_protocol.dart (1 hunks)
🔇 Additional comments (38)
packages/komodo_defi_rpc_methods/index_generator.yaml (2)

18-20: Whitespace cleanup—LGTM

Removing the superfluous blank line after the first disclaimer: false keeps the YAML tidy and avoids noisy diffs in the future.


72-75: Added final newline—good practice

Ensuring the file ends with a newline conforms to POSIX conventions and prevents certain linters from complaining. No further action needed.

packages/komodo_defi_rpc_methods/pubspec.yaml (1)

20-20: Whitespace tidy-up LGTM

The added blank line cleanly separates regular and dev dependencies, keeping the pubspec.yaml consistent with common formatting conventions. No functional impact.

packages/komodo_defi_sdk/example/pubspec.yaml (1)

30-31: Integration-test dependency looks good; consider pinning for reproducibility

Adding the SDK-bundled integration_test entry is the standard Flutter approach and unblocks the new E2E suite.
If deterministic builds are important for CI, pinning the Flutter constraint (sdk: flutter) to a concrete version tag in your CI image (or locking with fvm) will avoid accidental breakage when the SDK updates.

packages/komodo_defi_rpc_methods/analysis_options.yaml (1)

4-4: Verify blanket suppression of invalid_annotation_target

Silencing this rule repo-wide may hide genuine annotation mistakes outside the generated freezed code.
If the warnings originate exclusively from generated files (*.g.dart, *.freezed.dart), prefer adding an ignore_for_file header to those files or excluding the generated folder instead of globally ignoring.

Would you like a PR snippet showing a .dart_tool/-level exclusion?

packages/komodo_defi_sdk/example/test_driver/integration_test.dart (1)

1-3: Driver stub added – LGTM

The minimal driver correctly wires integrationDriver(). Nothing else needed.

packages/komodo_defi_sdk/example/lib/screens/asset_page.dart (1)

561-561: LGTM: Widget key addition improves testability.

Adding the 'asset_addresses_list' key to the ListView.builder enhances widget identification for testing and maintains widget state during rebuilds.

packages/komodo_defi_sdk/lib/src/activation/activation_manager.dart (1)

104-104: LGTM: Correctly updates PrivateKeyPolicy to use constant constructor.

The change from PrivateKeyPolicy.contextPrivKey to const PrivateKeyPolicy.contextPrivKey() aligns with the refactor from enum to freezed union type while maintaining the same default fallback logic.

packages/komodo_defi_sdk/example/lib/blocs/auth/trezor_auth_mixin.dart (1)

26-26: LGTM: Trezor PrivateKeyPolicy correctly updated to constant constructor.

The change from PrivateKeyPolicy.trezor to const PrivateKeyPolicy.trezor() properly implements the new freezed union type pattern for Trezor authentication.

packages/komodo_defi_local_auth/lib/src/trezor/trezor_auth_service.dart (2)

330-330: LGTM: Trezor user lookup correctly updated for new PrivateKeyPolicy.

The equality comparison now uses const PrivateKeyPolicy.trezor() which is consistent with the freezed union type refactor.


343-343: LGTM: AuthOptions construction properly updated for Trezor.

The PrivateKeyPolicy instantiation correctly uses the constant constructor form const PrivateKeyPolicy.trezor().

packages/komodo_defi_sdk/example/lib/widgets/instance_manager/instance_view.dart (1)

427-427: LGTM: Widget keys improve testability and performance.

The addition of descriptive constant keys to interactive UI elements enhances:

  • Widget identification for integration tests
  • Widget tree performance during rebuilds
  • State preservation across widget updates

All key names follow good naming conventions and provide clear identification for their respective widgets.

Also applies to: 432-432, 437-437, 506-506, 513-513, 581-581

packages/komodo_defi_types/lib/src/protocols/qtum/qtum_protocol.dart (1)

58-58: LGTM! Clean refactoring to constant constructor pattern.

The change from static enum reference to constant constructor call is consistent with the broader PrivateKeyPolicy refactoring. This maintains the same default behavior while improving type safety and JSON serialization support.

packages/komodo_defi_local_auth/lib/src/komodo_defi_local_auth.dart (4)

263-263: LGTM! Consistent update to constant constructor pattern.

The equality comparison now uses the constant constructor form, maintaining the same Trezor authentication logic while adopting the new PrivateKeyPolicy pattern.


297-297: LGTM! Consistent update to constant constructor pattern.

The Trezor check in the streaming sign-in method correctly uses the constant constructor form.


357-357: LGTM! Consistent update to constant constructor pattern.

The Trezor check in the registration method correctly uses the constant constructor form.


394-394: LGTM! Consistent update to constant constructor pattern.

The Trezor check in the streaming registration method correctly uses the constant constructor form.

packages/komodo_defi_types/lib/src/coin_classes/protocol_class.dart (1)

140-140: LGTM! Base class updated consistently with constant constructor pattern.

The default parameter value in the base ProtocolClass correctly adopts the constant constructor form, ensuring consistency across all derived protocol classes.

packages/komodo_defi_sdk/example/lib/blocs/auth/auth_event.dart (2)

21-21: LGTM! Event constructor updated with constant constructor pattern.

The default parameter value in AuthSignedIn correctly uses the constant constructor form, maintaining consistency with the PrivateKeyPolicy refactoring.


50-50: LGTM! Event constructor updated with constant constructor pattern.

The default parameter value in AuthRegistered correctly uses the constant constructor form, maintaining consistency with the PrivateKeyPolicy refactoring.

packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/utxo_activation_params.dart (2)

37-37: LGTM! Factory constructor updated with constant constructor pattern.

The default parameter value in the hdWallet factory constructor correctly uses the constant constructor form, maintaining consistency with the PrivateKeyPolicy refactoring.


71-71: LGTM! Factory constructor updated with constant constructor pattern.

The default parameter value in the nonHd factory constructor correctly uses the constant constructor form, maintaining consistency with the PrivateKeyPolicy refactoring.

packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/activation_params.g.dart (1)

1-40: Generated serialization code looks correct.

The JSON serialization methods for the PrivateKeyPolicy union variants are properly generated. The _WalletConnect variant correctly handles the additional sessionTopic field, and all variants properly serialize/deserialize the $type discriminator field.

packages/komodo_defi_types/lib/src/protocols/utxo/utxo_protocol.dart (2)

32-32: Correct migration to constant constructor pattern.

The default parameter correctly uses the constant constructor form const PrivateKeyPolicy.contextPrivKey() instead of the old enum-style reference.


35-35: Equality check properly updated for freezed union.

The comparison against const PrivateKeyPolicy.trezor() correctly uses the constant constructor form, ensuring proper equality semantics with the new freezed union type.

packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/tendermint_activation_params.dart (2)

13-13: Constructor default correctly updated.

The default parameter properly uses the constant constructor const PrivateKeyPolicy.contextPrivKey() consistent with the new freezed union pattern.


35-37: Enhanced JSON parsing with legacy support.

The migration to PrivateKeyPolicy.fromLegacyJson() is excellent as it provides backward compatibility while supporting the new JSON format. This is more robust than the previous manual string checking approach.

packages/komodo_defi_types/lib/src/auth/auth_options.dart (3)

9-9: Constructor default properly migrated.

The default parameter correctly uses the constant constructor form consistent with the new PrivateKeyPolicy union type.


17-19: JSON deserialization enhanced with legacy support.

Using PrivateKeyPolicy.fromLegacyJson() provides robust backward compatibility while supporting the new JSON structure.


31-31: JSON serialization improved with structured output.

Calling privKeyPolicy.toJson() now produces proper structured JSON instead of just a string ID, which is more consistent with the enhanced union type capabilities.

packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/eth_activation_params.dart (3)

11-11: Proper integration of privKeyPolicy as required parameter.

Making privKeyPolicy a required parameter ensures it's always explicitly set, which is good for the API consistency.


31-31: Correct assignment from base class.

Properly passes through the privKeyPolicy from the base ActivationParams instance parsed in fromConfigJson.


50-50: Complete copyWith method integration.

The privKeyPolicy parameter is properly added to both the method signature and implementation, maintaining the immutable update pattern.

Also applies to: 61-61

packages/komodo_defi_rpc_methods/test/src/common_structures/activation/activation_params/private_key_policy_test.dart (1)

1-337: Comprehensive test coverage - well done!

The test suite provides excellent coverage for the PrivateKeyPolicy.fromLegacyJson factory method and pascalCaseName property. The tests are well-organized, cover edge cases, and validate both legacy string formats and modern JSON formats effectively.

packages/komodo_defi_rpc_methods/test/src/common_structures/activation/activation_params/private_key_policy_legacy_json_test.dart (1)

1-159: Good legacy compatibility test coverage

This test file effectively validates legacy JSON parsing and backward compatibility. While there's some overlap with private_key_policy_test.dart, the focus on legacy support and compatibility matrices justifies the separate test organization.

The backward compatibility matrix (lines 75-97) and JSON roundtrip tests (lines 99-116) are particularly valuable for ensuring the enum-to-union refactoring maintains full backward compatibility.

packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/activation_params.freezed.dart (1)

18-34: Verify PascalCase type discrimination in JSON

The generated JSON deserialization uses PascalCase values ('ContextPrivKey', 'Trezor', etc.) for type discrimination. This appears inconsistent with typical JSON conventions that use snake_case. Please verify this is intentional and aligns with your API's JSON format.

Run the following script to check how PrivateKeyPolicy is serialized in the codebase:

#!/bin/bash
# Description: Check PrivateKeyPolicy JSON serialization format in tests and usage

# Search for toJson() calls on PrivateKeyPolicy instances
rg -A 3 'PrivateKeyPolicy.*\.toJson\(\)'

# Look for JSON test data containing type fields
rg -A 2 -B 2 "type.*:.*['\"].*[Pp]riv[Kk]ey|[Tt]rezor|[Mm]etamask|[Ww]allet[Cc]onnect"
packages/komodo_defi_sdk/example/integration_test/coin_activation_test.dart (1)

101-101: Let’s list all imports in the test to confirm SecurityUtils is brought into scope:

#!/bin/bash
rg -n '^import ' packages/komodo_defi_sdk/example/integration_test/coin_activation_test.dart
packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/activation_params.dart (1)

192-223: Robust legacy JSON parsing implementation

The fromLegacyJson factory method provides excellent backward compatibility by handling both legacy string formats and modern JSON objects. The error handling with descriptive messages is well implemented.

@takenagain takenagain marked this pull request as ready for review June 24, 2025 17:53
@takenagain takenagain requested a review from CharlVS June 24, 2025 17:53
Copy link
Copy Markdown
Collaborator

@CharlVS CharlVS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

giphy

@CharlVS CharlVS merged commit 24d09fd into dev Jun 25, 2025
5 of 6 checks passed
CharlVS added a commit that referenced this pull request Aug 5, 2025
commit 0303d39
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Fri Aug 1 15:52:14 2025 +0200

    chore: switch KDF to `dev`

    Switch KDF to `dev` to allow usage of unreleased changes (particularly related to fees/priorities)

commit 1fae456
Author: Francois <takenagain@users.noreply.github.com>
Date:   Fri Aug 1 17:46:34 2025 +0200

    fix(market-data-price): try fetch current price from komodo price repository first before cex repository (#167)

    * fix(market-data-manager): default to KomodoPriceRepository

    Binance CexRepository supports a limited number of symbols and no longer lists KMD price history after the delisting

    * refactor(market-data-manager): deduplicate and clarify intent

    * refactor(review): remove zero check and add log statements

    also simplify the priceIfKnown function

commit f8064f2
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Fri Aug 1 15:50:09 2025 +0200

    fix(types): comprehensive bip39 validation

commit 60e5f2e
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Wed Jul 30 21:18:06 2025 +0200

    feat: offline private key export (#160)

    * feat(hd): integrate hd privkey export

    * chore: roll KDF

    * chore: enable tendermint hd support

    * refactor(rpc): Misc rpc class formats/fixes

    * feat: private keys + fixed Tendermint

    * refactor(sdk): implement co-ordinated activation manager

    * fix: invalid path error

    Possible fix for paths containing special characters on Windows.

    * fix: remove unnecessary activation logging

    * chore(pr): apply formatting and fixes to PR

    Apply Dart formatting and fixes to all files modified in this PR.

    * feat(example): integrate private key export to example app

    * chore: roll KDF

    * chore: roll KDF

    * feat: fee estimation

    * fix(build): make re-build failure stand out

    * chore: roll KDF

    Roll KDF for optimisation for key export time.

    * feat(tx): further progress on fee/priority integration

    * chore: roll KDF fro `v2.6.1`

    TODO: Change from CI builds to GitHub release when artefacts are available.

    * fix(api): disable fee/priority features

    Disable fee/priority features because they are not included in the pending KDF release. They should be included in the following release (likely `2.7.0`)

    * fix: Temporarily disable fee/priority features

    Temporarily disable fee/priority features until the feature is available in the API (KDF)

    * feat: add memo support protocol value

    * fix: resolve incorrect `unban_pubkeys` parsing

    * fix: resolve regression in legacy withdrawal manager

    * feat(security): Include failed activations in privkey export

    * docs(build): expand asset build failure explination

    * fix: tweak private key type json to match class properties

    * fix(RPC): fix new address generation types

    * chore: bump version tags

    * fix: apply Claude PR review suggestions

commit 834b83f
Merge: 1526a23 a41f81f
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Wed Jul 30 20:12:37 2025 +0200

    Merge pull request #165 from KomodoPlatform/migrate/dragon_logs_flutter

    feat: migrate dragon_logs_flutter to monorepo packages

commit a41f81f
Merge: 1526a23 a6a9a6e
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Wed Jul 30 18:19:07 2025 +0200

    Merge commit 'a6a9a6ef4a308f95be1fafbb018449f198d8b4db' as 'packages/dragon_logs'

commit a6a9a6e
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Wed Jul 30 18:19:07 2025 +0200

    Squashed 'packages/dragon_logs/' content from commit 399ef1d1

    git-subtree-dir: packages/dragon_logs
    git-subtree-split: 399ef1d17034029155b63b6bc1d9ab0a5a0fbb04

commit 1526a23
Merge: dc093db acda1d9
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jul 28 21:10:37 2025 +0200

    Merge branch 'codex/implement-pubkey-unbanning-feature' into dev

commit acda1d9
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jul 28 21:07:58 2025 +0200

    fix(ui): resolve stale asset balance widget

commit dc093db
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jul 28 20:18:02 2025 +0200

    feat(pubkeys): add unbanning support (#161)

    * feat(pubkeys): add unbanning support

    * Update packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/unban_pubkeys.dart

    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

    * fix(types): export missing RPC types

    ---------

    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

commit 7d7e888
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jul 28 20:14:54 2025 +0200

    fix(types): export missing RPC types

commit 9621aa2
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jul 28 20:00:48 2025 +0200

    Update packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/unban_pubkeys.dart

    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

commit 4a3d9c8
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jul 28 18:33:47 2025 +0200

    feat(pubkeys): add unbanning support

commit b18af0b
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Sun Jul 27 16:59:11 2025 +0200

    feat(ui): add hero support for coin icons (#159)

    * feat(ui): add hero support for asset icons

    * fix(ui): Hero Tag Ignored in AssetLogo Placeholder

    * fix: Move Hero widget outside Opacity widget for proper animation continuity

    - Fix AssetLogo.placeholder to pass heroTag parameter to _AssetLogoPlaceholder
    - Move Hero widget outside Opacity widget in AssetIcon to prevent animation interference
    - Ensures Hero animations work correctly for both asset icons and placeholder logos
    - Maintains visual continuity by placing Hero widgets as outermost components

commit c2d985a
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Fri Jul 25 15:20:29 2025 +0200

    feat(fees): integrate fee management (#152)

    * feat(fees): add fee management support

    * docs(sdk): Document withdrawal manager

    Document withdrawal manager and implement PR review comments.

    * docs(sdk): Add documentation for fee manager

commit e1a63e2
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Fri Jul 25 11:15:26 2025 +0200

    feat(activation): disable tx history when using external strategy (#151)

    * feat(activation): disable kdf tx history when using external strategy

    * docs: clarify mm2 history helper (#154)

commit 74d8eff
Author: Francois <takenagain@users.noreply.github.com>
Date:   Thu Jul 24 18:30:54 2025 +0200

    Revert "fix(activation): track activation status to avoid duplicate activation requests (#80)" (#153)

    This reverts commit abd3de0.

commit 7eefbd8
Author: dragonhound <35845239+smk762@users.noreply.github.com>
Date:   Mon Jul 21 20:24:39 2025 +0800

    adds `max_connected: 1` to utxo activation (#148)

commit b8ff967
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jul 21 14:24:16 2025 +0200

    Revert "feat(rpc): support max_connected on activation (#149)" (#150)

    This reverts commit eac2b8f.

commit eac2b8f
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jul 21 13:11:54 2025 +0200

    feat(rpc): support max_connected on activation (#149)

    * feat(rpc): support max_connected on activation

    * fix: limit max connections to 1

commit bb57e87
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Sun Jul 20 00:15:49 2025 +0200

    fix(build): update config format

commit 6534d47
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Sun Jul 20 00:04:09 2025 +0200

    feat(wallet_build_transformer): add flexible CDN support (#144)

commit abd3de0
Author: Francois <takenagain@users.noreply.github.com>
Date:   Thu Jul 17 18:54:01 2025 +0200

    fix(activation): track activation status to avoid duplicate activation requests (#80)

    * Track activation streams to avoid duplicate requests

    * fix activation stream propagation

    * fix(activation): provide historical states to late stream subscribers

    * fix(activation): use asset lookup in parent grouping

    using the asset itself as a placeholder led to assertion errors being thrown if the child asset is activated individually.

commit 9351c22
Author: Francois <takenagain@users.noreply.github.com>
Date:   Wed Jul 16 19:55:00 2025 +0200

    feat(ui): allow customizing SourceAddressField header (#135)

    * feat(ui): make source address field customizable

    * refactor: remove content override from SourceAddressField

commit a521a80
Author: Francois <takenagain@users.noreply.github.com>
Date:   Wed Jul 16 14:37:28 2025 +0200

    fix(withdraw): revert temporary IBC channel type changes (#136)

    #63

commit a44acf3
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jul 14 16:14:45 2025 +0200

    fix(ui): make Divided button min width

commit aa51985
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jul 7 17:15:04 2025 +0200

    feat: protect SDK after disposal (#116)

    * feat: prevent SDK reuse after disposal

    * refactor(sdk): promote dispose helper (#127)

commit 9cf9e37
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Mon Jul 7 15:08:29 2025 +0200

    chore: roll KDF version to commit fbab8ec for branch main (#124)

    * chore: roll KDF version to commit fbab8ec for branch main

    * chore: update binaries

    * chore: roll coins assets

    ---------

    Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
    Co-authored-by: CharlVS <77973576+CharlVS@users.noreply.github.com>

commit ce68c7a
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Sat Jul 5 19:24:33 2025 +0200

    feat(seed): update seed node format (#87)

    * feat(seed): update seed node format with netid

    * Update packages/komodo_defi_types/lib/src/seed_node/seed_node.dart

    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

    * feat(core): use constant netid in seed node filtering (#111)

    * fix: add missing imports/exports

    ---------

    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

commit d7b6ede
Author: Francois <takenagain@users.noreply.github.com>
Date:   Sat Jul 5 18:37:15 2025 +0200

    feat(pubkey): add streamed new address API with Trezor confirmations (#123)

    * feat(pubkey): add streamed new address API with Trezor confirmations (#117)

    * Implement streamed new address state with confirmations

    * refactor: remove unused imports and make polling interval configurable

    * refactor: move confirm address details to types (#120)

    * refactor: move confirm address details to types

    * refactor: fix warnings

    * feat(example): use streamed address creation (#119)

    * Use streamed address generation

    * refactor: add cancel action and use normal stream rather than broadcast

    * chore: add json conversion support to `NewAddressState`

    * fix(asset-filter): exclude BCH and yield address creation error states

    * refactor: add task description parser and try cancel task if user cancel

commit d6d83c6
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Fri Jul 4 18:30:50 2025 +0200

    fix(local_auth): ensure kdf running before wallet deletion (#118)

commit cda8498
Author: Francois <takenagain@users.noreply.github.com>
Date:   Thu Jul 3 20:44:32 2025 +0200

    feat(ui): add helper constructors for AssetLogo from legacy ticker and AssetId (#109)

    * feat(ui): add AssetLogo constructors

    * fix: correct protocol overlay for child assets (#115)

    * fix(example): use parent protocol for child assets in trailing icon

    * feat(ui): add placeholder asset logo

    used in legacy maker and taker forms in KW

    * feat(ui): add asset exists helper functions

    used in KW fiat onramp form

    * refactor: clarify doc comments and rename constructors

    * fix(assets): tendermint token parent parsing logic

    - place tendermint before tendermint token
    - replace subclass check with canBeParentOf

    * refactor(asset-logo): use theme `disabledColor` in place of  Opacity

    ---------

    Co-authored-by: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>

commit 3dc37d0
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Thu Jul 3 19:16:58 2025 +0200

    add(ui): enhance TrendPercentageText

    Enhance `TrendPercentageText` with expanded use cases and automatic animations.

commit c5c30d4
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Wed Jul 2 18:45:02 2025 +0200

    fix: resolve bug with dispose logic

    TODO(@CharlVS): Consider separating the KDF-related concerns of dispose into a separate method named terminate(). This helps differentiate between KDF resource clean-up and UI resource clean-up

commit 9d63c56
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Wed Jul 2 15:34:14 2025 +0200

    add(auth): auth stream method with initial value

commit 81ba643
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Wed Jul 2 11:09:33 2025 +0200

    fix: stop KDF when disposed

commit c8f27a7
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Wed Jul 2 10:33:27 2025 +0200

    fix: SIA support

    Disable SIA as it is not yet supported. The SIA activation strategy will be merged soon, but this depends on a specific branch of KDF and will likely still be very long before it is available in a public release of KDF.

commit a02c4a2
Author: Francois <takenagain@users.noreply.github.com>
Date:   Wed Jul 2 09:48:09 2025 +0200

    fix(trezor): improve trezor error handling (#110)

    * chore(deps): bump logging version to 1.3.0 as in komodo-wallet

    * fix(trezor): sign out of existing wallet if initialisation fails

    fixes the following scenarios
    - trezor device not found
    - trezor device not selected

    and other edge cases that may cause trezor init or auth to fail, ensuring that the user already exists error is not thrown

    * feat(trezor): add priv_key_policy to tendermint, erc20, and zhtlc params

    * fix(trezor): yield error states rather than exceptions in streams

    * feat(activation,rpc): task-based eth activation

    * feat(asset-manager): asset filter strategy based on current wallet (#107)

    * feat(asset-manager): asset filter strategy based on current wallet

    * featasset-manager): limit trezor asset filter to utxo and qtum only

    * refactor: add error response check and evm subclasses set

    coderabbitai suggestions

    * feat: add name-based filter strategy (#108)

    * refactor: update authOptions references to use walletId

    * refactor(asset-filter): rename `name` to `strategyId`

    * ci(example): re-enable dry build run

commit 8a1daea
Author: Francois <takenagain@users.noreply.github.com>
Date:   Wed Jul 2 09:45:18 2025 +0200

    feat(ui): adjust error display layout for narrow screens (#114)

    * chore(deps): bump logging version to 1.3.0 as in komodo-wallet

    * fix(trezor): sign out of existing wallet if initialisation fails

    fixes the following scenarios
    - trezor device not found
    - trezor device not selected

    and other edge cases that may cause trezor init or auth to fail, ensuring that the user already exists error is not thrown

    * feat(trezor): add priv_key_policy to tendermint, erc20, and zhtlc params

    * fix(trezor): yield error states rather than exceptions in streams

    * feat(activation,rpc): task-based eth activation

    * feat(asset-manager): asset filter strategy based on current wallet (#107)

    * feat(asset-manager): asset filter strategy based on current wallet

    * featasset-manager): limit trezor asset filter to utxo and qtum only

    * refactor: add error response check and evm subclasses set

    coderabbitai suggestions

    * feat: add name-based filter strategy (#108)

    * refactor: update authOptions references to use walletId

    * refactor(asset-filter): rename `name` to `strategyId`

    * refactor: extract show details button

    * Refactor error display components

    * refactor: convert toggle to stateless widget

    * feat(ui): add toggle for icon and expose breakpoint

    * fix(ui): button interactivity no-op when showDetailsOverride is true

    Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

    * refactor: remove unnecessary spread operator

    ---------

    Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

commit 5f7da9e
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jun 30 15:34:29 2025 +0200

    ci: skip melos init

    Disabled melos generation due to circular dependency issues caused by komodo_defi_rpc_methods and komodo_defi_types packages. This will be revisited in the.

    The app should already have the necessary generated files committed to the repository. If this is not the case, we have bigger issues.

commit f6f5820
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jun 30 15:25:59 2025 +0200

    add: Wallet deletion example and fix global error parsing flaw (#99)

    * feat(auth): add wallet deletion

    * feat(example): add wallet deletion

    * add: wallet deletion for Trezor wallets

    * chore: re-generate melos

    * refactor: fix flaw in response error parsing

    Fix flaw in response error parsing where the custom error parser function would never be called because of the inheritence structure.

    * feat(example): move delete wallet action (#104)

commit fafc707
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jun 30 14:57:00 2025 +0200

    feat(asset): add message signing support flag (#105)

commit 3701f49
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jun 30 14:41:23 2025 +0200

    fix: kdf hashes

commit a2face7
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jun 30 14:16:56 2025 +0200

    chore(kdf): update build config to latest staging (#103)

commit 41fb498
Author: Francois <takenagain@users.noreply.github.com>
Date:   Mon Jun 30 11:45:18 2025 +0200

    chore(deps): bump komodo-defi-framework to a25aea614 (#102)

    latest staging with hotfix for trezor coin activation

commit 7dfe68b
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Fri Jun 27 14:58:42 2025 +0200

    chore: roll KDF (#100)

commit e5d022b
Author: Francois <takenagain@users.noreply.github.com>
Date:   Thu Jun 26 16:41:13 2025 +0200

    fix(pubkey-strategy): use new PrivateKeyPolicy constructors for checks (#97)

commit 24d09fd
Author: Francois <takenagain@users.noreply.github.com>
Date:   Wed Jun 25 16:08:18 2025 +0200

    fix(activation): eth PrivateKeyPolicy enum breaking changes (#96)

    * fix(rpc,activation): breaking EVM private key policy enum change

    * fix(activation-params): use pascal case for to and from json

    * test(example): add asset activation integration test

    * test(example): run in zone to catch microtask and uncaught exceptions

    * fix(auth): merge issues and update privkeypolicy comparisons

    * docs: expand doc comments and remove runzonedguarded

commit 2a50691
Author: Francois <takenagain@users.noreply.github.com>
Date:   Tue Jun 24 18:52:35 2025 +0200

    feat(sdk): add trezor support via RPC and SDK wrappers (#77)

    * fix(trezor,activation): add PrivateKeyPolicy to AuthOptions and beyond

    * feat(rpc): add trezor init task RPCs

    * feat(sdk): trezor manager for init and user input requests

    * feat(rpc): add task-based address generation RPCs

    * feat(rpc): add trezor pubkey strategy with task-based address creation

    * WIP: trezor login option in SDK example

    * refactor(example): trezor auth mixin and remove previous trezor ui code

    * fix(trezor): device info parsing and example auth state transitions

    * refactor(trezor): add auth listener & implement coderabbitai suggestions

    * fix(example): auth restoration and listener order

    * fix(trezor): workaround for trezor-specifc scan issue

    funded addresses not being scanned for fresh trezor logins (maybe not believed to be a "fresh" wallet)?

    * fix(rpc): get new address task status response parsing

    * refactor(trezor): move authentication and initialization logic to SDK (#81)

    This is a concept solution that moves the Trezor initialization and authentication flow from the example BLoC to the SDK KomodoDefiAuth class & package.

    Two issues that make integrating the trezor login flow with the current SDK difficult:

    - Trezor login is a multi-step process that uses task-based RPCs, so Stream-based versions of the signin and register methods are required.
    - Async user inputs (i.e. passphrase or pin) need to be sent to trezor as part of login process.

    Solution implemented in this PR:

    - Add stream-based signInStream and registerStream functions to KomodoDefiAuth with a new Authentication state/status class.
      - Alternative (breaking): modify the existing functions to return Stream
    - Add input methods for passphrase and pin to KomodoDefiAuth
      - Alternative 1: Ask user for passphrase before starting trezor sign-in and pass it through the existing wallet password field.
      - Alternative 2: SDK consumers use device-specific managers (e.g. sdk.trezor.sendPassphrase).

    Commits:

    * Use TrezorWalletManager in example bloc

    * refactor(trezor,auth): move trezor auth into komodo_defi_local_auth

    * refactor: implement coderabbitai suggestions

    * refactor(trezor): migrate auth options and state models to freezed (#90)

    * migrate models to freezed

    * fix(types): revert changes to seed_node and auth_options

commit b863ccb
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Tue Jun 24 17:40:41 2025 +0200

    fix(auth): allow custom seeds for legacy wallets (#95)

commit 3e9f73c
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jun 23 15:32:19 2025 +0200

    chore: re-generate melos configs

commit 1a4ec66
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jun 23 15:31:36 2025 +0200

    fix: remove obsolete coins transformer

    Remove ETH coins config transformer which was temporarily required because of a breaking ETH change in KDF.

commit 58acbc2
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jun 23 15:21:36 2025 +0200

    bug: fix missing pubkey equality operators

commit d05c13b
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jun 23 15:19:50 2025 +0200

    chore: update KDF to release preview version

commit fdeb713
Author: dragonhound <35845239+smk762@users.noreply.github.com>
Date:   Wed Jun 18 20:38:33 2025 +0800

    removes BCH from _filteredCoins (#83)

commit a36357e
Author: Francois <takenagain@users.noreply.github.com>
Date:   Wed Jun 18 14:38:12 2025 +0200

    feat(ui): add AssetLogo widget (#78)

    * Use AssetLogo in example and tweak imports

    * style: match the styling with the existing komodo-wallet implementation

commit 8990c9c
Author: DeckerSU <support@decker.su>
Date:   Wed Jun 18 14:37:22 2025 +0200

    fix KDF not found warnings in _tryRenameFile of FetchDefiApiStep (#76)

    If the KDF binaries were already renamed from `mm2` to `kdf`—i.e., if the target folder already contained `kdf.exe` or `libkdf.a` after the last successful rename from `*mm2*`—the warning `KDF not found at` would still appear, which was a bit confusing. Now, if the folder already contains the renamed binary, the warning no longer appears.

commit 55176e1
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Mon Jun 16 01:02:04 2025 +0200

    fix: revert ETH coins config migration transformer

commit 7d438bd
Author: Francois <takenagain@users.noreply.github.com>
Date:   Sun Jun 15 17:31:26 2025 +0200

    fix(kdf): enable p2p in noAuth mode (#86)

    * fix(kdf): enable p2p in noAuth mode

    * refactor(kdf): use SeedNodeService to get seednodes for noAuth

commit 4038b86
Author: CharlVS <77973576+CharlVS@users.noreply.github.com>
Date:   Sun Jun 15 02:15:36 2025 +0200

    chore: refresh KDF checksums

commit aa8148b
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Sun Jun 15 00:17:09 2025 +0200

    feat: add configurable seed node system with remote fetching (#85)

    * feat: add custom seed nodes

    - Add custom seed nodes to accommodate breaking KDF changes.
    - Upgrade KDF for latest seed node changes.

    * feat: add configurable seed node system with remote fetching

    Implement a comprehensive seed node configuration system that fetches
    seed nodes from the Komodo Platform repository with automatic fallback
    to hardcoded defaults.

    ### New Features:
    - Add SeedNode and SeedNodeContact types for type-safe configuration
    - Implement SeedNodeUpdater for fetching remote seed nodes
    - Add SeedNodeService with automatic fallback mechanism
    - Add SeedNodeValidator with enhanced P2P configuration validation
    - Export seed node service from komodo_defi_framework

    ### Configuration Updates:
    - Update build_config.json to include seed-nodes.json mapping
    - Add seed_nodes.json to gitignore for dynamic assets
    - Change API branch from 'dev' to 'alt-main'
    - Update all platform binary checksums and commit hashes

    ### Framework Integration:
    - Add automatic seed node fetching to KdfStartupConfig
    - Integrate SeedNodeService into auth service for wallet creation
    - Fix trading protocol parameter name (trading_proto_v2 -> use_trading_proto_v2)
    - Improve boolean validation in SeedNodeValidator

    ### Documentation:
    - Add comprehensive SEED_NODES_GUIDE.md with usage examples
    - Include example code for seed node functionality
    - Add complete test coverage for new types and services

    ### Dependencies:
    - Add komodo_coin_updates dependency to komodo_defi_framework
    - Export seed node types from komodo_defi_types
    - Update pubspec.lock files across packages

    The seed node system ensures applications always have access to current
    seed nodes while maintaining backwards compatibility through fallback
    mechanisms. This addresses the upcoming requirement in v2.5.0-beta
    where seed nodes will be mandatory unless P2P is disabled.

    Breaking changes: None - all changes are additive with sensible defaults.

    * chore: PR cleanup

commit 2768355
Author: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>
Date:   Tue Jun 10 16:34:01 2025 +0200

    chore(android): downgrade Java compatibility from 21 to 17 (#79)

    Co-authored-by: DeckerSU <deckersu@protonmail.com>

commit f63bebb
Author: Francois <takenagain@users.noreply.github.com>
Date:   Fri Jun 6 13:46:17 2025 +0200

    fix(trezor,activation): add PrivateKeyPolicy to AuthOptions (#75)

    * fix(trezor,activation): add PrivateKeyPolicy to AuthOptions and beyond

    * refactor(types): replace `.from` with `.of`

    of has type annotations

    Co-authored-by: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>

    ---------

    Co-authored-by: Charl (Nitride) <77973576+CharlVS@users.noreply.github.com>

commit 040c040
Author: dragonhound <35845239+smk762@users.noreply.github.com>
Date:   Fri Jun 6 19:20:28 2025 +0800

    Update/ethscan v2 (#71)

    * update etherscan-proxy to v2

    * add distinct token url paths
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