@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.
package/dist/index.js CHANGED
@@ -1666,16 +1666,15 @@ function OneProvider({
1666
1666
  config: config2,
1667
1667
  autoFetchBalance = true
1668
1668
  }) {
1669
- const [isInitialized2, setIsInitialized] = React2.useState(false);
1669
+ React2.useMemo(() => {
1670
+ initOneSDK(config2);
1671
+ }, [config2]);
1672
+ const [isInitialized2, setIsInitialized] = React2.useState(true);
1670
1673
  const engine = React2.useMemo(() => createOneEngineClient({
1671
1674
  baseUrl: config2.oneEngineUrl,
1672
1675
  clientId: config2.oneClientId,
1673
1676
  secretKey: config2.oneSecretKey
1674
1677
  }), [config2]);
1675
- React2.useEffect(() => {
1676
- initOneSDK(config2);
1677
- setIsInitialized(true);
1678
- }, [config2]);
1679
1678
  const [user, setUser] = React2.useState(null);
1680
1679
  const [accessToken, setAccessToken] = React2.useState(null);
1681
1680
  const [authLoading, setAuthLoading] = React2.useState(true);