Closed esteblock closed 8 months ago
Freighter API got an update with the new soroban rpc url
packages/core/src/SorobanReactProvider.tsx Line: 75
The TODO: is mentioned there
let server used to be like this
let server =
networkDetails &&
new SorobanClient.Server(networkDetails.networkUrl, {
allowHttp: networkDetails.networkUrl.startsWith('http://'),
})
networkDetails has to be updated to also get the sorobanRpc and horizonRpc, not sure if networkUrl is still in use... from the freighter wallet soroban rpc is sometimes empty or undefined, when using standalone for exmaple we use horizonRpc url and with futurenet we need to use sorobanRpc url, so maybe it could be better to do something like "if sorobanRpc == undefined or empty then use horizonRpc : sorobanRpc or sorobanRpc ?? horizonRpc will depend on the freighter api response i guess
@benjaminsalon refer to https://github.com/stellar/freighter/issues/990 and https://github.com/stellar/freighter/issues/991
With the new Freighter Wallet (5.6.4) https://github.com/stellar/freighter/releases/tag/5.6.4 and freighter-api 1.7.1 https://www.npmjs.com/package/@stellar/freighter-api/v/1.7.1
We get something like this:
freighterApi.getNetworkDetails ~ value:
Object { network: "CUSTOM", networkUrl: "http://horizon.com/", networkPassphrase: "pass", sorobanRpcUrl: "http://soroban.url/" }
Our server object needs to take the "sorobanRpcUrl" @benjaminsalon Please publish a new verision of @soroban-react library with freighter-api 1.7.1
We are doing this hack
We are waiting for a new freighter api in order to not to do this hack