using dynamic sdk version

This commit is contained in:
liangping 2023-12-26 13:51:17 +08:00
parent 84e26e26ad
commit 2a60e6fef9

View File

@ -56,7 +56,7 @@ export class CosmosRestClient extends BaseRestClient<RequestRegistry> {
req = findApiProfileByChain(chain.chainName)
// if not found. try sdk version
if(!req && chain.versions?.cosmosSdk) {
req = findApiProfileBySDKVersion(chain.versions?.cosmosSdk)
req = findApiProfileBySDKVersion(localStorage.getItem(`sdk_version_${chain.chainName}`) || chain.versions?.cosmosSdk)
}
}
return new CosmosRestClient(endpoint, req || DEFAULT)