@dubsdotapp/expo 0.2.2 → 0.2.4
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 +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +2 -2
- package/src/provider.tsx +13 -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
|
@@ -481,7 +481,7 @@ var DubsClient = class {
|
|
|
481
481
|
/** Fetch the app's UI customization config (accent color, icon, tagline) */
|
|
482
482
|
async getAppConfig() {
|
|
483
483
|
const res = await this.request("GET", "/apps/config");
|
|
484
|
-
return res.uiConfig || {};
|
|
484
|
+
return res.data?.uiConfig || {};
|
|
485
485
|
}
|
|
486
486
|
};
|
|
487
487
|
|
|
@@ -1854,11 +1854,17 @@ 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(
|
|
1859
|
+
client.getAppConfig().then((config2) => {
|
|
1860
|
+
console.log("[DubsProvider] UI config loaded:", JSON.stringify(config2));
|
|
1861
|
+
setUiConfig(config2);
|
|
1862
|
+
}).catch((err) => {
|
|
1863
|
+
console.log("[DubsProvider] UI config fetch failed, using defaults:", err?.message);
|
|
1864
|
+
setUiConfig({});
|
|
1860
1865
|
});
|
|
1861
1866
|
}, [client]);
|
|
1867
|
+
if (uiConfig === null) return null;
|
|
1862
1868
|
if (externalWallet) {
|
|
1863
1869
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1864
1870
|
ExternalWalletProvider,
|