@trustware/sdk-staging 1.1.6-staging.1 → 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/constants.cjs +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/core.cjs +2 -2
- package/dist/core.cjs.map +1 -1
- package/dist/core.mjs +2 -2
- package/dist/core.mjs.map +1 -1
- package/dist/index.cjs +16 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +41 -53
- package/dist/index.mjs.map +1 -1
- package/dist/wallet.cjs +2 -2
- package/dist/wallet.cjs.map +1 -1
- package/dist/wallet.mjs +2 -2
- package/dist/wallet.mjs.map +1 -1
- package/dist/widget.cjs +16 -28
- package/dist/widget.cjs.map +1 -1
- package/dist/widget.mjs +41 -53
- package/dist/widget.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -68,7 +68,7 @@ var init_config = __esm({
|
|
|
68
68
|
approachingThreshold: 5
|
|
69
69
|
};
|
|
70
70
|
DEFAULT_FEATURE_FLAGS = {
|
|
71
|
-
tokensPagination:
|
|
71
|
+
tokensPagination: true,
|
|
72
72
|
balanceStreaming: false,
|
|
73
73
|
shouldAllowGA4: true
|
|
74
74
|
};
|
|
@@ -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.
|
|
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";
|
|
@@ -6653,7 +6653,7 @@ function useTrustwareConfig() {
|
|
|
6653
6653
|
approachingThreshold: 5
|
|
6654
6654
|
},
|
|
6655
6655
|
features: {
|
|
6656
|
-
tokensPagination:
|
|
6656
|
+
tokensPagination: true,
|
|
6657
6657
|
balanceStreaming: false,
|
|
6658
6658
|
shouldAllowGA4: true
|
|
6659
6659
|
}
|
|
@@ -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
|
-
|
|
10954
|
+
onLoadRef.current?.();
|
|
10949
10955
|
};
|
|
10950
10956
|
img.onerror = () => {
|
|
10951
10957
|
setStatus("error");
|
|
10952
|
-
|
|
10958
|
+
onErrorRef.current?.();
|
|
10953
10959
|
};
|
|
10954
|
-
};
|
|
10960
|
+
}, [src]);
|
|
10955
10961
|
(0, import_react28.useEffect)(() => {
|
|
10956
10962
|
if (!lazy2) {
|
|
10957
|
-
setTimeout(() =>
|
|
10958
|
-
|
|
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",
|