@one_deploy/sdk 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1215,16 +1215,15 @@ function OneProvider({
1215
1215
  config: config2,
1216
1216
  autoFetchBalance = true
1217
1217
  }) {
1218
- const [isInitialized, setIsInitialized] = React2.useState(false);
1218
+ React2.useMemo(() => {
1219
+ initOneSDK(config2);
1220
+ }, [config2]);
1221
+ const [isInitialized, setIsInitialized] = React2.useState(true);
1219
1222
  const engine = React2.useMemo(() => createOneEngineClient({
1220
1223
  baseUrl: config2.oneEngineUrl,
1221
1224
  clientId: config2.oneClientId,
1222
1225
  secretKey: config2.oneSecretKey
1223
1226
  }), [config2]);
1224
- React2.useEffect(() => {
1225
- initOneSDK(config2);
1226
- setIsInitialized(true);
1227
- }, [config2]);
1228
1227
  const [user, setUser] = React2.useState(null);
1229
1228
  const [accessToken, setAccessToken] = React2.useState(null);
1230
1229
  const [authLoading, setAuthLoading] = React2.useState(true);