Skip to content
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

refactor(network): remove name property and improve network ID types #338

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

drichar
Copy link
Collaborator

@drichar drichar commented Jan 17, 2025

Description

This PR removes the unused name property from network configurations and updates the type signature of setActiveNetwork to properly support both built-in and custom network IDs.

⚠️ BREAKING CHANGE: The name property has been removed from the NetworkConfig interface. If you're using custom network configurations, you'll need to remove any name properties from your configs.

Details

  • Remove unused name property from NetworkConfig interface
  • Remove name field from all default network configurations
  • Update setActiveNetwork to accept both NetworkId enum and custom string IDs
  • Update type signatures in React, Solid, and Vue adapters
  • Update tests to remove name-related assertions

Remove the unused `name` property from `NetworkConfig` interface and all related
code. This property was not serving any functional purpose in the network
configuration system.

- Remove `name` field from `NetworkConfig` interface
- Remove `name` property from all default network configurations
- Update tests to remove name-related assertions and test cases
Update type signature of `setActiveNetwork` to accept both `NetworkId` enum values
and custom string network IDs. This change is necessary to support custom
networks while maintaining backwards compatibility with the predefined `NetworkId`
enum values.

- Update type signature in React, Solid, and Vue adapters
- Update core `WalletManager` and store types
- Maintain existing runtime behavior while improving type flexibility
@drichar drichar force-pushed the refactor/network-config-enhancements branch from 4fda6f9 to e0518cf Compare January 17, 2025 08:48
@drichar drichar merged commit dbbad1b into v4 Jan 17, 2025
1 check passed
@drichar drichar deleted the refactor/network-config-enhancements branch January 17, 2025 09:31
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.

1 participant