@trustware/sdk-staging 1.1.6-staging.2 → 1.1.6-staging.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/wallet.cjs CHANGED
@@ -240,7 +240,7 @@ var init_constants = __esm({
240
240
  "src/constants.ts"() {
241
241
  "use strict";
242
242
  SDK_NAME = "@trustware/sdk";
243
- SDK_VERSION = "1.1.6-staging.2";
243
+ SDK_VERSION = "1.1.6-staging.3";
244
244
  API_ROOT = "https://bv-staging-api.trustware.io";
245
245
  API_PREFIX = "/api";
246
246
  WALLETCONNECT_PROJECT_ID = "72ea74c400f5111d43aea638d7d83a24";
package/dist/wallet.mjs CHANGED
@@ -224,7 +224,7 @@ var init_constants = __esm({
224
224
  "src/constants.ts"() {
225
225
  "use strict";
226
226
  SDK_NAME = "@trustware/sdk";
227
- SDK_VERSION = "1.1.6-staging.2";
227
+ SDK_VERSION = "1.1.6-staging.3";
228
228
  API_ROOT = "https://bv-staging-api.trustware.io";
229
229
  API_PREFIX = "/api";
230
230
  WALLETCONNECT_PROJECT_ID = "72ea74c400f5111d43aea638d7d83a24";
package/dist/widget.cjs CHANGED
@@ -589,7 +589,7 @@ var init_constants = __esm({
589
589
  "src/constants.ts"() {
590
590
  "use strict";
591
591
  SDK_NAME = "@trustware/sdk";
592
- SDK_VERSION = "1.1.6-staging.2";
592
+ SDK_VERSION = "1.1.6-staging.3";
593
593
  API_ROOT = "https://bv-staging-api.trustware.io";
594
594
  GTM_ID = "GTM-TZDGNCXB";
595
595
  API_PREFIX = "/api";
@@ -10787,7 +10787,6 @@ function ImageLoader({
10787
10787
  retryDelay = 1e3,
10788
10788
  lazy: lazy2 = true,
10789
10789
  Fallback = null,
10790
- // skeleton = null,
10791
10790
  imgStyle,
10792
10791
  onLoad,
10793
10792
  onError
@@ -10797,6 +10796,12 @@ function ImageLoader({
10797
10796
  const [srcIsEmpty, setSrcIsEmpty] = (0, import_react28.useState)(false);
10798
10797
  const imgRef = (0, import_react28.useRef)(null);
10799
10798
  const observerRef = (0, import_react28.useRef)(null);
10799
+ const onLoadRef = (0, import_react28.useRef)(onLoad);
10800
+ const onErrorRef = (0, import_react28.useRef)(onError);
10801
+ (0, import_react28.useEffect)(() => {
10802
+ onLoadRef.current = onLoad;
10803
+ onErrorRef.current = onError;
10804
+ }, [onLoad, onError]);
10800
10805
  (0, import_react28.useEffect)(() => {
10801
10806
  if (status === "error" && attempt < retry) {
10802
10807
  const timer = setTimeout(() => {
@@ -10806,29 +10811,28 @@ function ImageLoader({
10806
10811
  return () => clearTimeout(timer);
10807
10812
  }
10808
10813
  }, [status, attempt, retry, retryDelay]);
10809
- const loadImage = () => {
10814
+ const loadImage = (0, import_react28.useCallback)(() => {
10810
10815
  if (!src) {
10811
10816
  setSrcIsEmpty(true);
10812
10817
  return;
10813
10818
  }
10819
+ setSrcIsEmpty(false);
10814
10820
  setStatus("loading");
10815
10821
  const img = new Image();
10816
10822
  img.src = src;
10817
10823
  img.onload = () => {
10818
10824
  setStatus("success");
10819
- onLoad?.();
10825
+ onLoadRef.current?.();
10820
10826
  };
10821
10827
  img.onerror = () => {
10822
10828
  setStatus("error");
10823
- onError?.();
10829
+ onErrorRef.current?.();
10824
10830
  };
10825
- };
10831
+ }, [src]);
10826
10832
  (0, import_react28.useEffect)(() => {
10827
10833
  if (!lazy2) {
10828
- setTimeout(() => {
10829
- loadImage();
10830
- }, 0);
10831
- return;
10834
+ const timer = setTimeout(() => loadImage(), 0);
10835
+ return () => clearTimeout(timer);
10832
10836
  }
10833
10837
  observerRef.current = new IntersectionObserver(
10834
10838
  (entries) => {
@@ -10863,35 +10867,20 @@ function ImageLoader({
10863
10867
  src,
10864
10868
  alt,
10865
10869
  style: {
10866
- // Css guards to prevent external styles from interfering with image rendering
10867
10870
  all: "revert",
10868
- // Undo any inherited/global resets (e.g. Tailwind, normalize.css)
10869
10871
  display: "block",
10870
- // Prevent inline baseline gap
10871
10872
  width: "100%",
10872
- // Restore intended sizing
10873
10873
  maxWidth: "100%",
10874
- // Prevent overflow
10875
10874
  height: "auto",
10876
- // Maintain aspect ratio
10877
10875
  border: "none",
10878
- // Strip any border resets
10879
10876
  padding: 0,
10880
- // Strip padding resets
10881
10877
  margin: 0,
10882
- // Strip margin resets
10883
10878
  objectFit: "cover",
10884
- // Preserve visual intent
10885
10879
  verticalAlign: "middle",
10886
- // Guard against inline stripping
10887
10880
  filter: "none",
10888
- // Prevent inherited filter washes
10889
10881
  opacity: 1,
10890
- // Prevent inherited opacity stripping
10891
10882
  mixBlendMode: "normal",
10892
- // Prevent blend mode interference
10893
10883
  colorScheme: "normal",
10894
- // Prevent dark-mode inversion
10895
10884
  ...imgStyle
10896
10885
  }
10897
10886
  }
@@ -14806,7 +14795,6 @@ function useRoutePreviewModel({
14806
14795
  walletAddress
14807
14796
  }) {
14808
14797
  const { chains } = useChains();
14809
- console.log({ walletAddress });
14810
14798
  const destinationConfig = (0, import_react34.useMemo)(
14811
14799
  () => ({
14812
14800
  dappName: config.messages?.title || "DApp",