@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.
@@ -30,7 +30,7 @@ __export(constants_exports, {
30
30
  });
31
31
  module.exports = __toCommonJS(constants_exports);
32
32
  var SDK_NAME = "@trustware/sdk";
33
- var SDK_VERSION = "1.1.6-staging.2";
33
+ var SDK_VERSION = "1.1.6-staging.3";
34
34
  var API_ROOT = "https://bv-staging-api.trustware.io";
35
35
  var GTM_ID = "GTM-TZDGNCXB";
36
36
  var API_PREFIX = "/api";
@@ -1,6 +1,6 @@
1
1
  // src/constants.ts
2
2
  var SDK_NAME = "@trustware/sdk";
3
- var SDK_VERSION = "1.1.6-staging.2";
3
+ var SDK_VERSION = "1.1.6-staging.3";
4
4
  var API_ROOT = "https://bv-staging-api.trustware.io";
5
5
  var GTM_ID = "GTM-TZDGNCXB";
6
6
  var API_PREFIX = "/api";
package/dist/core.cjs CHANGED
@@ -69,7 +69,7 @@ var init_constants = __esm({
69
69
  "src/constants.ts"() {
70
70
  "use strict";
71
71
  SDK_NAME = "@trustware/sdk";
72
- SDK_VERSION = "1.1.6-staging.2";
72
+ SDK_VERSION = "1.1.6-staging.3";
73
73
  API_ROOT = "https://bv-staging-api.trustware.io";
74
74
  API_PREFIX = "/api";
75
75
  WALLETCONNECT_PROJECT_ID = "72ea74c400f5111d43aea638d7d83a24";
package/dist/core.mjs CHANGED
@@ -57,7 +57,7 @@ var init_constants = __esm({
57
57
  "src/constants.ts"() {
58
58
  "use strict";
59
59
  SDK_NAME = "@trustware/sdk";
60
- SDK_VERSION = "1.1.6-staging.2";
60
+ SDK_VERSION = "1.1.6-staging.3";
61
61
  API_ROOT = "https://bv-staging-api.trustware.io";
62
62
  API_PREFIX = "/api";
63
63
  WALLETCONNECT_PROJECT_ID = "72ea74c400f5111d43aea638d7d83a24";
package/dist/index.cjs CHANGED
@@ -434,7 +434,7 @@ var init_constants = __esm({
434
434
  "src/constants.ts"() {
435
435
  "use strict";
436
436
  SDK_NAME = "@trustware/sdk";
437
- SDK_VERSION = "1.1.6-staging.2";
437
+ SDK_VERSION = "1.1.6-staging.3";
438
438
  API_ROOT = "https://bv-staging-api.trustware.io";
439
439
  GTM_ID = "GTM-TZDGNCXB";
440
440
  API_PREFIX = "/api";
@@ -10916,7 +10916,6 @@ function ImageLoader({
10916
10916
  retryDelay = 1e3,
10917
10917
  lazy: lazy2 = true,
10918
10918
  Fallback = null,
10919
- // skeleton = null,
10920
10919
  imgStyle,
10921
10920
  onLoad,
10922
10921
  onError
@@ -10926,6 +10925,12 @@ function ImageLoader({
10926
10925
  const [srcIsEmpty, setSrcIsEmpty] = (0, import_react28.useState)(false);
10927
10926
  const imgRef = (0, import_react28.useRef)(null);
10928
10927
  const observerRef = (0, import_react28.useRef)(null);
10928
+ const onLoadRef = (0, import_react28.useRef)(onLoad);
10929
+ const onErrorRef = (0, import_react28.useRef)(onError);
10930
+ (0, import_react28.useEffect)(() => {
10931
+ onLoadRef.current = onLoad;
10932
+ onErrorRef.current = onError;
10933
+ }, [onLoad, onError]);
10929
10934
  (0, import_react28.useEffect)(() => {
10930
10935
  if (status === "error" && attempt < retry) {
10931
10936
  const timer = setTimeout(() => {
@@ -10935,29 +10940,28 @@ function ImageLoader({
10935
10940
  return () => clearTimeout(timer);
10936
10941
  }
10937
10942
  }, [status, attempt, retry, retryDelay]);
10938
- const loadImage = () => {
10943
+ const loadImage = (0, import_react28.useCallback)(() => {
10939
10944
  if (!src) {
10940
10945
  setSrcIsEmpty(true);
10941
10946
  return;
10942
10947
  }
10948
+ setSrcIsEmpty(false);
10943
10949
  setStatus("loading");
10944
10950
  const img = new Image();
10945
10951
  img.src = src;
10946
10952
  img.onload = () => {
10947
10953
  setStatus("success");
10948
- onLoad?.();
10954
+ onLoadRef.current?.();
10949
10955
  };
10950
10956
  img.onerror = () => {
10951
10957
  setStatus("error");
10952
- onError?.();
10958
+ onErrorRef.current?.();
10953
10959
  };
10954
- };
10960
+ }, [src]);
10955
10961
  (0, import_react28.useEffect)(() => {
10956
10962
  if (!lazy2) {
10957
- setTimeout(() => {
10958
- loadImage();
10959
- }, 0);
10960
- return;
10963
+ const timer = setTimeout(() => loadImage(), 0);
10964
+ return () => clearTimeout(timer);
10961
10965
  }
10962
10966
  observerRef.current = new IntersectionObserver(
10963
10967
  (entries) => {
@@ -10992,35 +10996,20 @@ function ImageLoader({
10992
10996
  src,
10993
10997
  alt,
10994
10998
  style: {
10995
- // Css guards to prevent external styles from interfering with image rendering
10996
10999
  all: "revert",
10997
- // Undo any inherited/global resets (e.g. Tailwind, normalize.css)
10998
11000
  display: "block",
10999
- // Prevent inline baseline gap
11000
11001
  width: "100%",
11001
- // Restore intended sizing
11002
11002
  maxWidth: "100%",
11003
- // Prevent overflow
11004
11003
  height: "auto",
11005
- // Maintain aspect ratio
11006
11004
  border: "none",
11007
- // Strip any border resets
11008
11005
  padding: 0,
11009
- // Strip padding resets
11010
11006
  margin: 0,
11011
- // Strip margin resets
11012
11007
  objectFit: "cover",
11013
- // Preserve visual intent
11014
11008
  verticalAlign: "middle",
11015
- // Guard against inline stripping
11016
11009
  filter: "none",
11017
- // Prevent inherited filter washes
11018
11010
  opacity: 1,
11019
- // Prevent inherited opacity stripping
11020
11011
  mixBlendMode: "normal",
11021
- // Prevent blend mode interference
11022
11012
  colorScheme: "normal",
11023
- // Prevent dark-mode inversion
11024
11013
  ...imgStyle
11025
11014
  }
11026
11015
  }
@@ -14935,7 +14924,6 @@ function useRoutePreviewModel({
14935
14924
  walletAddress
14936
14925
  }) {
14937
14926
  const { chains } = useChains();
14938
- console.log({ walletAddress });
14939
14927
  const destinationConfig = (0, import_react34.useMemo)(
14940
14928
  () => ({
14941
14929
  dappName: config.messages?.title || "DApp",