stellar / js-stellar-base

The lowest-level stellar helper library. It consists of classes to read, write, hash, and sign Stellar xdr
https://stellar.github.io/js-stellar-base/
Apache License 2.0
108 stars 137 forks source link

Fix asset class contractId missing argument #718

Closed fazzatti closed 11 months ago

fazzatti commented 11 months ago

This commit addressed the issue reported in https://github.com/stellar/js-stellar-base/issues/717

What:

When using js-stellar-base and js-stellar-sdk to manage assets, the method contractId() always returns an error.

Why

By looking at the source code, we can see the method expects an argument that is not present in the exported type.

Forcing typescript to ignore the error and providing the network passphrase as an argument overcomes the issue. It is necessary to update the type to reflect the need for an argument.