@dubsdotapp/expo 0.2.1 → 0.2.3
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
- package/src/provider.tsx +5 -2
package/dist/index.d.mts
CHANGED
|
@@ -493,7 +493,7 @@ interface DubsProviderProps {
|
|
|
493
493
|
/** Set to false to skip AuthGate and connect screen (headless/BYOA mode). Default: true. */
|
|
494
494
|
managed?: boolean;
|
|
495
495
|
}
|
|
496
|
-
declare function DubsProvider({ apiKey, children, appName, network, wallet: externalWallet, tokenStorage, baseUrl: baseUrlOverride, rpcUrl: rpcUrlOverride, renderConnectScreen, renderLoading, renderError, renderRegistration, managed, }: DubsProviderProps): react_jsx_runtime.JSX.Element;
|
|
496
|
+
declare function DubsProvider({ apiKey, children, appName, network, wallet: externalWallet, tokenStorage, baseUrl: baseUrlOverride, rpcUrl: rpcUrlOverride, renderConnectScreen, renderLoading, renderError, renderRegistration, managed, }: DubsProviderProps): react_jsx_runtime.JSX.Element | null;
|
|
497
497
|
declare function useDubs(): DubsContextValue;
|
|
498
498
|
|
|
499
499
|
/** The `transact` function signature from @solana-mobile/mobile-wallet-adapter-protocol-web3js */
|
package/dist/index.d.ts
CHANGED
|
@@ -493,7 +493,7 @@ interface DubsProviderProps {
|
|
|
493
493
|
/** Set to false to skip AuthGate and connect screen (headless/BYOA mode). Default: true. */
|
|
494
494
|
managed?: boolean;
|
|
495
495
|
}
|
|
496
|
-
declare function DubsProvider({ apiKey, children, appName, network, wallet: externalWallet, tokenStorage, baseUrl: baseUrlOverride, rpcUrl: rpcUrlOverride, renderConnectScreen, renderLoading, renderError, renderRegistration, managed, }: DubsProviderProps): react_jsx_runtime.JSX.Element;
|
|
496
|
+
declare function DubsProvider({ apiKey, children, appName, network, wallet: externalWallet, tokenStorage, baseUrl: baseUrlOverride, rpcUrl: rpcUrlOverride, renderConnectScreen, renderLoading, renderError, renderRegistration, managed, }: DubsProviderProps): react_jsx_runtime.JSX.Element | null;
|
|
497
497
|
declare function useDubs(): DubsContextValue;
|
|
498
498
|
|
|
499
499
|
/** The `transact` function signature from @solana-mobile/mobile-wallet-adapter-protocol-web3js */
|
package/dist/index.js
CHANGED
|
@@ -1854,11 +1854,11 @@ function DubsProvider({
|
|
|
1854
1854
|
const client = (0, import_react12.useMemo)(() => new DubsClient({ apiKey, baseUrl }), [apiKey, baseUrl]);
|
|
1855
1855
|
const connection = (0, import_react12.useMemo)(() => new import_web33.Connection(rpcUrl, { commitment: "confirmed" }), [rpcUrl]);
|
|
1856
1856
|
const storage = (0, import_react12.useMemo)(() => tokenStorage || createSecureStoreStorage(), [tokenStorage]);
|
|
1857
|
-
const [uiConfig, setUiConfig] = (0, import_react12.useState)(
|
|
1857
|
+
const [uiConfig, setUiConfig] = (0, import_react12.useState)(null);
|
|
1858
1858
|
(0, import_react12.useEffect)(() => {
|
|
1859
|
-
client.getAppConfig().then(setUiConfig).catch(() => {
|
|
1860
|
-
});
|
|
1859
|
+
client.getAppConfig().then(setUiConfig).catch(() => setUiConfig({}));
|
|
1861
1860
|
}, [client]);
|
|
1861
|
+
if (uiConfig === null) return null;
|
|
1862
1862
|
if (externalWallet) {
|
|
1863
1863
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1864
1864
|
ExternalWalletProvider,
|