@xyo-network/xl1-react-client-sdk 5.8.7 → 5.8.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"DataLakeRequestAccessPanel.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/connected/DataLakeRequestAccessPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,UAAU,EAAE,MAAM,eAAe,CAAA;AAMlE,OAAO,KAA4B,MAAM,OAAO,CAAA;AAShD,sEAAsE;AACtE,MAAM,WAAW,+BAAgC,SAAQ,UAAU;IACjE,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,CA+ChF,CAAA"}
1
+ {"version":3,"file":"DataLakeRequestAccessPanel.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/connected/DataLakeRequestAccessPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,UAAU,EAAE,MAAM,eAAe,CAAA;AAMlE,OAAO,KAA4B,MAAM,OAAO,CAAA;AAOhD,sEAAsE;AACtE,MAAM,WAAW,+BAAgC,SAAQ,UAAU;IACjE,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,CAgDhF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useGatewayFromWallet.d.ts","sourceRoot":"","sources":["../../../../../src/client/hooks/client/useGatewayFromWallet.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAG7D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,GAAI,cAAc,WAAW,EAAE,UAAU,MAAM,KAAG,iBAoBlF,CAAA;AAED,4DAA4D;AAC5D,eAAO,MAAM,UAAU,iBAvB4B,WAAW,YAAY,MAAM,KAAG,iBAuBrC,CAAA"}
1
+ {"version":3,"file":"useGatewayFromWallet.d.ts","sourceRoot":"","sources":["../../../../../src/client/hooks/client/useGatewayFromWallet.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAG7D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,GAAI,cAAc,WAAW,EAAE,UAAU,MAAM,KAAG,iBAkBlF,CAAA;AAED,4DAA4D;AAC5D,eAAO,MAAM,UAAU,iBArB4B,WAAW,YAAY,MAAM,KAAG,iBAqBrC,CAAA"}
@@ -352,8 +352,7 @@ var useGatewayFromWallet = (gatewayName, timeout) => {
352
352
  timedout
353
353
  } = useClientFromWallet(timeout);
354
354
  const resolveGateway = () => {
355
- if (isNull(client)) return null;
356
- return client?.gateways?.[gatewayName];
355
+ return isNull(client) ? null : client?.gateways?.[gatewayName];
357
356
  };
358
357
  return {
359
358
  // no gatewayName requested = undefined (opt-out, not "absent")
@@ -409,7 +408,7 @@ var ApprovedLakeSelector = ({
409
408
  const filtered = (lakes ?? []).filter((lake) => lake.capabilities.includes(capability));
410
409
  return /* @__PURE__ */ jsxs2(Stack2, { sx: { gap: 1, width: "100%" }, children: [
411
410
  timedout ? /* @__PURE__ */ jsx2(Alert, { severity: "warning", children: "Wallet not detected." }) : null,
412
- isDefinedNotNull2(client) && !supported ? /* @__PURE__ */ jsx2(Alert, { severity: "warning", children: "This wallet does not expose `xyo.client.dataLakes`." }) : null,
411
+ !supported && isDefinedNotNull2(client) ? /* @__PURE__ */ jsx2(Alert, { severity: "warning", children: "This wallet does not expose `xyo.client.dataLakes`." }) : null,
413
412
  isDefined4(lakes) && filtered.length === 0 ? /* @__PURE__ */ jsxs2(Alert, { severity: "info", children: [
414
413
  "No approved lakes with",
415
414
  " ",
@@ -676,7 +675,7 @@ var RequestPermissionsButton = ({
676
675
  }
677
676
  }, [permissionsApi]);
678
677
  useEffect4(() => {
679
- if (isDefinedNotNull3(permissionsApi) && granted === void 0) {
678
+ if (granted === void 0 && isDefinedNotNull3(permissionsApi)) {
680
679
  void refreshGranted();
681
680
  }
682
681
  }, [permissionsApi, granted, refreshGranted]);
@@ -1169,7 +1168,7 @@ var ConnectAccountsStack = ({
1169
1168
  children: [
1170
1169
  isLoading ? /* @__PURE__ */ jsx6(LoadingComponent, {}) : null,
1171
1170
  !isLoading && hasAccounts ? accounts?.map((account) => /* @__PURE__ */ jsx6(AccountComponent, { account, address: account }, account)) : null,
1172
- !isLoading && !hasAccounts && !timedout ? /* @__PURE__ */ jsx6(ConnectComponent, { onClick: () => void requestAccounts(), children: "Connect" }) : null,
1171
+ isLoading || hasAccounts || timedout ? null : /* @__PURE__ */ jsx6(ConnectComponent, { onClick: () => void requestAccounts(), children: "Connect" }),
1173
1172
  !isLoading && !hasAccounts && timedout ? /* @__PURE__ */ jsx6(NoWalletInstalledComponent, {}) : null,
1174
1173
  /* @__PURE__ */ jsx6(ErrorRender, { error, scope: "ConnectSigner:error" })
1175
1174
  ]
@@ -1554,7 +1553,7 @@ var DataLakeGetButton = ({
1554
1553
  },
1555
1554
  children: [
1556
1555
  timedout ? /* @__PURE__ */ jsx8(Alert7, { severity: "warning", children: "Wallet not detected." }) : null,
1557
- isDefinedNotNull7(client) && !supported ? /* @__PURE__ */ jsx8(Alert7, { severity: "warning", children: "This wallet does not expose `xyo.client.dataLakes`." }) : null,
1556
+ !supported && isDefinedNotNull7(client) ? /* @__PURE__ */ jsx8(Alert7, { severity: "warning", children: "This wallet does not expose `xyo.client.dataLakes`." }) : null,
1558
1557
  /* @__PURE__ */ jsxs8(
1559
1558
  ButtonEx7,
1560
1559
  {
@@ -1702,7 +1701,7 @@ var DataLakeInsertButton = ({
1702
1701
  },
1703
1702
  children: [
1704
1703
  timedout ? /* @__PURE__ */ jsx10(Alert8, { severity: "warning", children: "Wallet not detected." }) : null,
1705
- isDefinedNotNull8(client) && !supported ? /* @__PURE__ */ jsx10(Alert8, { severity: "warning", children: "This wallet does not expose `xyo.client.dataLakes`." }) : null,
1704
+ !supported && isDefinedNotNull8(client) ? /* @__PURE__ */ jsx10(Alert8, { severity: "warning", children: "This wallet does not expose `xyo.client.dataLakes`." }) : null,
1706
1705
  /* @__PURE__ */ jsxs10(
1707
1706
  ButtonEx8,
1708
1707
  {
@@ -1880,7 +1879,7 @@ var DataLakeListButton = ({ timeout, ...props }) => {
1880
1879
  },
1881
1880
  children: [
1882
1881
  timedout ? /* @__PURE__ */ jsx12(Alert10, { severity: "warning", children: "Wallet not detected." }) : null,
1883
- isDefinedNotNull9(client) && !supported ? /* @__PURE__ */ jsx12(Alert10, { severity: "warning", children: "This wallet does not expose `xyo.client.dataLakes`." }) : null,
1882
+ !supported && isDefinedNotNull9(client) ? /* @__PURE__ */ jsx12(Alert10, { severity: "warning", children: "This wallet does not expose `xyo.client.dataLakes`." }) : null,
1884
1883
  /* @__PURE__ */ jsx12(
1885
1884
  ButtonEx9,
1886
1885
  {
@@ -1985,7 +1984,7 @@ var DataLakeRequestAccessButton = ({
1985
1984
  },
1986
1985
  children: [
1987
1986
  timedout ? /* @__PURE__ */ jsx13(Alert11, { severity: "warning", children: "Wallet not detected." }) : null,
1988
- isDefinedNotNull10(client) && !supported ? /* @__PURE__ */ jsx13(Alert11, { severity: "warning", children: "This wallet does not expose `xyo.client.dataLakes`." }) : null,
1987
+ !supported && isDefinedNotNull10(client) ? /* @__PURE__ */ jsx13(Alert11, { severity: "warning", children: "This wallet does not expose `xyo.client.dataLakes`." }) : null,
1989
1988
  /* @__PURE__ */ jsx13(
1990
1989
  ButtonEx10,
1991
1990
  {
@@ -2521,7 +2520,7 @@ var IN_PAGE_GATEWAY_RETRY_MAX_MS = 3e4;
2521
2520
  function useInPageGatewayRetry(gatewayName, error, retry) {
2522
2521
  const failuresRef = useRef3({ count: 0, gatewayName });
2523
2522
  useEffect7(() => {
2524
- if (failuresRef.current.gatewayName !== gatewayName || error === void 0) {
2523
+ if (error === void 0 || failuresRef.current.gatewayName !== gatewayName) {
2525
2524
  failuresRef.current = { count: 0, gatewayName };
2526
2525
  }
2527
2526
  if (gatewayName === void 0 || error === void 0 || retry === void 0) return;