The current sdk package does not provide a direct way of updating itself should new values for rpcUrl and nativeToken be needed by the client. In its current state, it is required that we create a new instance of Sdk, but this shouldn't necessarily be needed, since we only need to reload the wasms that depend on those values.
Provide a call on the Sdk instance to update url and nativeToken, which will reload both the Sdk and Query wasms
Make nativeToken optional, as some testnets (such as localnets) may not need this value to change
Allowing this instance to be updated will clean up logic in the client, as we can maintain one global instance of Sdk, and simply update to fix all queries/broadcasts.
The current
sdk
package does not provide a direct way of updating itself should new values forrpcUrl
andnativeToken
be needed by the client. In its current state, it is required that we create a new instance of Sdk, but this shouldn't necessarily be needed, since we only need to reload the wasms that depend on those values.url
andnativeToken
, which will reload both theSdk
andQuery
wasmsnativeToken
optional, as some testnets (such as localnets) may not need this value to changeAllowing this instance to be updated will clean up logic in the client, as we can maintain one global instance of Sdk, and simply update to fix all queries/broadcasts.