@dubsdotapp/expo 0.2.3 → 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.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +2 -2
- package/src/provider.tsx +9 -1
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
|
|
|
@@ -1856,7 +1856,13 @@ function DubsProvider({
|
|
|
1856
1856
|
const storage = (0, import_react12.useMemo)(() => tokenStorage || createSecureStoreStorage(), [tokenStorage]);
|
|
1857
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({});
|
|
1865
|
+
});
|
|
1860
1866
|
}, [client]);
|
|
1861
1867
|
if (uiConfig === null) return null;
|
|
1862
1868
|
if (externalWallet) {
|