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

🐛 [BUG] - provider network type accepts invalid testnet-staging type #1861

Open
victorkl400 opened this issue Feb 25, 2025 · 0 comments
Open

Comments

@victorkl400
Copy link

victorkl400 commented Feb 25, 2025

Description

When the provider is passed a network type of "testnet-staging", the kit incorrectly falls back to "test" instead of throwing an error or failing validation as expected. The kit should reject unsupported network types rather than silently defaulting to a different value.

Reproduction URL

No response

Reproduction steps

1. Locate your implementation of `VechainKitProvider` in your codebase.  
2. Pass a custom network type (e.g., `"testnet-staging"`) and cast it to `NETWORK_TYPE`, as shown below:

   
   <VechainKitProvider
     network={{
       type: "testnet-staging" as NETWORK_TYPE,
     }}
   >
     {/* Your app components */}
   </VechainKitProvider>
   

3. Observe that the VeChain kit does not throw an error or fail validation.  
4. Instead, the kit incorrectly falls back to the `"test"` network when it should reject unsupported network types.

Screenshots

Image

Logs

OS

No response

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

No branches or pull requests

1 participant