You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since 2.0.1, using a CallBuilder may pollute the issuing Server instance URI resulting in following CallBuilder instances trying to fetch the wrong URL.
To Reproduce
constStellarSdk=require("stellar-sdk")constserver=newStellarSdk.Server("https://horizon.stellar.org")constaccount="GDEDX3Z64XBZGQ72ZQNHAGDDBOVYNQ2KSVQ7ASO5NQDPHRVCX4BGISF6"functiondebug(){// In 2.0.1, creating this call builder will pollute the server object URI.constofferCallBuilder=server.offers("accounts",account)console.log(server)// As a consequence, this second call builder will fail to fetch data.consteffectCallBuilder=server.effects().forAccount(account).limit(1)effectCallBuilder.call().then(console.log).catch(console.error)}debug()
I advise to run this script with both 2.0.1 and a previous version for the purpose of comparing results.
Expected behavior
The Server instance should not get polluted and the second callBuilder call should properly fetch data.
Additional context
Update to StellarSDK 2.0.1 broke Equilibre.io portfolio history retrieval. In Equilibre.io, I re-use the same server object for all calls to Horizon in order to not spam memory with new instances.
The text was updated successfully, but these errors were encountered:
Describe the bug
Since 2.0.1, using a CallBuilder may pollute the issuing Server instance URI resulting in following CallBuilder instances trying to fetch the wrong URL.
To Reproduce
I advise to run this script with both 2.0.1 and a previous version for the purpose of comparing results.
Expected behavior
The Server instance should not get polluted and the second callBuilder call should properly fetch data.
Additional context
Update to StellarSDK 2.0.1 broke Equilibre.io portfolio history retrieval. In Equilibre.io, I re-use the same server object for all calls to Horizon in order to not spam memory with new instances.
The text was updated successfully, but these errors were encountered: