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
Users are currently required to set Stellar.default_network in order to submit transactions to mainnet. If users have clients for multiple different networks, they have to reset default_network before every submission.
This requirement is missed by many newcomers and can be confusing to even experienced users when they explicitly declare a client for mainnet but still have to set this attribute on the top-level module.
This design also differs from most of the SDKs (Go, Python, JavaScript, etc.). Instead, these SDK's accept the network passphrase as a parameter to the function that need it. See the JS library's TransactionBuilder, for example.
We should change the ruby implementation to accept these same parameters while maintaining backwards compatibility. This likely means the network will have to come in the form of a keyword argument. If omitted, the SDK can still use Stellar.default_network, but downstream errors due to not setting this attribute should be replaced with a suggestion to pass the network passphrase to the function or object constructor.
The text was updated successfully, but these errors were encountered:
nebolsin
transferred this issue from astroband/ruby-stellar-base
May 5, 2020
Users are currently required to set
Stellar.default_network
in order to submit transactions to mainnet. If users have clients for multiple different networks, they have to resetdefault_network
before every submission.This requirement is missed by many newcomers and can be confusing to even experienced users when they explicitly declare a client for mainnet but still have to set this attribute on the top-level module.
This design also differs from most of the SDKs (Go, Python, JavaScript, etc.). Instead, these SDK's accept the network passphrase as a parameter to the function that need it. See the JS library's TransactionBuilder, for example.
We should change the ruby implementation to accept these same parameters while maintaining backwards compatibility. This likely means the network will have to come in the form of a keyword argument. If omitted, the SDK can still use
Stellar.default_network
, but downstream errors due to not setting this attribute should be replaced with a suggestion to pass the network passphrase to the function or object constructor.The text was updated successfully, but these errors were encountered: