Skip to content

Commit 30cbec9

Browse files
Hugo PerezHugo Perez
authored andcommitted
fix: update package name and version, remove cached config fallback
Always prioritize envVars over cached config in ReactNativeConfigProvider
1 parent a8d1486 commit 30cbec9

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@SOVEREIGN-NET/api-client",
3-
"version": "",
2+
"name": "@sovereign-net/api-client",
3+
"version": "1.1.3",
44
"type": "module",
55
"description": "Platform-agnostic API client for Sovereign Network ZHTP nodes",
66
"main": "./dist/vanilla-js/index.js",

src/react-native/config-provider.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,6 @@ export class ReactNativeConfigProvider implements ConfigProvider {
2626
}
2727

2828
async getConfig(): Promise<ApiConfig> {
29-
// Try to load cached config if AsyncStorage available
30-
if (this.AsyncStorage) {
31-
try {
32-
const cached = await this.AsyncStorage.getItem(this.cacheKey);
33-
if (cached) {
34-
return JSON.parse(cached);
35-
}
36-
} catch (error) {
37-
console.warn('Failed to load cached config:', error);
38-
}
39-
}
40-
41-
// Fall back to environment variables
4229
// Check for __DEV__ variable (React Native specific)
4330
let isDevMode = false;
4431
try {
@@ -48,6 +35,7 @@ export class ReactNativeConfigProvider implements ConfigProvider {
4835
isDevMode = false;
4936
}
5037

38+
// Always prioritize envVars over cached config
5139
const config: ApiConfig = {
5240
zhtpNodeUrl:
5341
this.envVars.ZHTP_NODE_URL ||

0 commit comments

Comments
 (0)