@cofhe/react 0.0.0-beta-20260414112518 → 0.0.0-beta-20260415045854

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.cjs CHANGED
@@ -6504,10 +6504,30 @@ function useCofhePinnedToken({ enabled } = {}) {
6504
6504
  var import_jsx_runtime22 = require("react/jsx-runtime");
6505
6505
  var AssetCard = () => {
6506
6506
  const { navigateTo } = usePortalNavigation();
6507
+ const { connected } = useCofheConnection();
6508
+ const {
6509
+ client: {
6510
+ config: {
6511
+ react: { projectName }
6512
+ }
6513
+ }
6514
+ } = useCofheContext();
6507
6515
  const pinnedToken = useCofhePinnedToken();
6508
6516
  const chainId = useCofheChainId();
6509
6517
  const fallbackToken = chainId ? DEFAULT_TOKEN_BY_CHAIN_ID[chainId] : void 0;
6510
6518
  const token = pinnedToken ?? fallbackToken;
6519
+ const projectLabel = projectName ? `"${projectName}"` : "this app";
6520
+ if (!connected) {
6521
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "fnx-card-bg border border-[var(--fnx-border-color)] px-3 py-6 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "w-full max-w-[26rem] text-center", children: [
6522
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h2", { className: "text-2xl font-semibold leading-none", style: { color: "var(--fnx-corner-accent-color)" }, children: "CoFHE Portal" }),
6523
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("p", { className: "mt-4 text-xl leading-tight fnx-text-primary", children: [
6524
+ "Connect to ",
6525
+ projectLabel,
6526
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("br", {}),
6527
+ "to access"
6528
+ ] })
6529
+ ] }) });
6530
+ }
6511
6531
  const handleClick = () => {
6512
6532
  if (token) {
6513
6533
  navigateTo("tokeninfo" /* TokenInfo */, {
@@ -6971,7 +6991,17 @@ var BottomNavigation = () => {
6971
6991
 
6972
6992
  // src/components/FnxFloatingButton/pages/MainPage.tsx
6973
6993
  var import_jsx_runtime30 = require("react/jsx-runtime");
6974
- var MainPage = () => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PageContainer, { header: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(WalletHeader, {}), content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AssetCard, {}), footer: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(BottomNavigation, {}) });
6994
+ var MainPage = () => {
6995
+ const { connected } = useCofheConnection();
6996
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6997
+ PageContainer,
6998
+ {
6999
+ header: connected ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(WalletHeader, {}) : void 0,
7000
+ content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AssetCard, {}),
7001
+ footer: connected ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(BottomNavigation, {}) : void 0
7002
+ }
7003
+ );
7004
+ };
6975
7005
 
6976
7006
  // src/components/FnxFloatingButton/stores/settingsStore.ts
6977
7007
  var import_zustand9 = require("zustand");
@@ -10177,6 +10207,7 @@ var CofheReactConfigSchema = import_zod.z.object({
10177
10207
  shareablePermits: import_zod.z.boolean().optional().default(false),
10178
10208
  enableShieldUnshield: import_zod.z.boolean().optional().default(true),
10179
10209
  autogeneratePermits: import_zod.z.boolean().optional().default(true),
10210
+ projectName: import_zod.z.string().trim().optional().default(""),
10180
10211
  logger: CofheReactLoggerSchema,
10181
10212
  permitExpirationOptions: import_zod.z.array(
10182
10213
  import_zod.z.object({