stellar / js-soroban-client

Main Soroban client library for the Javascript language
https://stellar.github.io/js-soroban-client/
Apache License 2.0
22 stars 17 forks source link

Error referencing 'FUTURENET' and 'SANDBOX' in SorobanClient.Networks #104

Closed mauroepce closed 1 year ago

mauroepce commented 1 year ago

Describe the bug I'm working on documentation for a project that uses soroban-client and I've encountered a problem with references to FUTURENET and SANDBOX in SorobanClient.Networks. When trying to reference these networks I get the following errors:

Property 'FUTURENET' does not exist on type 'typeof Networks' Property 'SANDBOX' does not exist on type 'typeof Networks'

I've searched the documentation and repository but haven't found any mention of FUTURENET or SANDBOX that can help me solve this problem.

Have these constants been replaced or removed in a recent version? If so, what are the alternatives I should use instead? I would appreciate any help to resolve this issue.

What version are you on? "0.8.0"

To Reproduce Steps to reproduce the behavior: This occurs even after successfully installing all the dependencies specified in the package.json of the packages and the root directory of the project.

Expected behavior not having the error and successful reference

Additional context "My dev environment includes Node.js v16.18.0, npm v8.19.2, on a MacOS Ventura. I'm using VSC as text editor."

Shaptic commented 1 year ago

It comes from an underlying dependency (stellar-base@soroban), defined here: types/index.d.ts.

There was a bug in the 0.8.0 version of this package that used the wrong version of this dependency when starting a fresh project. Is this reference still missing in v0.8.1?

mauroepce commented 1 year ago

Perfect!. Thanks. Now working without a problem with the v0.8.1 update.