@unifold/connect-react 0.1.16 → 0.1.17
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.js +4 -10
- package/dist/index.mjs +4 -10
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1215,10 +1215,6 @@ function UnifoldProvider({
|
|
|
1215
1215
|
const prevPublishableKeyRef = (0, import_react.useRef)(publishableKey);
|
|
1216
1216
|
(0, import_react.useEffect)(() => {
|
|
1217
1217
|
if (prevPublishableKeyRef.current !== publishableKey) {
|
|
1218
|
-
console.log(
|
|
1219
|
-
"Unifold: Reinitializing with new publishable key:",
|
|
1220
|
-
publishableKey
|
|
1221
|
-
);
|
|
1222
1218
|
prevPublishableKeyRef.current = publishableKey;
|
|
1223
1219
|
}
|
|
1224
1220
|
}, [publishableKey]);
|
|
@@ -6263,7 +6259,6 @@ async function getProjectConfig(publishableKey) {
|
|
|
6263
6259
|
const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
|
|
6264
6260
|
validatePublishableKey(pk);
|
|
6265
6261
|
const url = `${API_BASE_URL}/v1/public/projects/config`;
|
|
6266
|
-
console.log("[getProjectConfig] Fetching from:", url, "with key:", pk);
|
|
6267
6262
|
const response = await fetch(url, {
|
|
6268
6263
|
method: "GET",
|
|
6269
6264
|
headers: {
|
|
@@ -10792,9 +10787,9 @@ function DepositExecutionItem({
|
|
|
10792
10787
|
return timestamp;
|
|
10793
10788
|
}
|
|
10794
10789
|
};
|
|
10795
|
-
const formatUsdAmount = (
|
|
10790
|
+
const formatUsdAmount = (sourceAmountUsd) => {
|
|
10796
10791
|
try {
|
|
10797
|
-
const amount = Number(
|
|
10792
|
+
const amount = Number(sourceAmountUsd);
|
|
10798
10793
|
return new Intl.NumberFormat("en-US", {
|
|
10799
10794
|
style: "currency",
|
|
10800
10795
|
currency: "USD",
|
|
@@ -11204,9 +11199,9 @@ function DepositSuccessToast({
|
|
|
11204
11199
|
return timestamp;
|
|
11205
11200
|
}
|
|
11206
11201
|
};
|
|
11207
|
-
const formatUsdAmount = (
|
|
11202
|
+
const formatUsdAmount = (sourceAmountUsd2) => {
|
|
11208
11203
|
try {
|
|
11209
|
-
const amount = Number(
|
|
11204
|
+
const amount = Number(sourceAmountUsd2);
|
|
11210
11205
|
return new Intl.NumberFormat("en-US", {
|
|
11211
11206
|
style: "currency",
|
|
11212
11207
|
currency: "USD",
|
|
@@ -12305,7 +12300,6 @@ function useUserIp2() {
|
|
|
12305
12300
|
queryKey: ["unifold", "userIpInfo"],
|
|
12306
12301
|
queryFn: async () => {
|
|
12307
12302
|
const data = await getIpAddress();
|
|
12308
|
-
console.log("[useUserIp] IP detected:", data);
|
|
12309
12303
|
return {
|
|
12310
12304
|
alpha2: data.alpha2.toLowerCase(),
|
|
12311
12305
|
alpha3: data.alpha3?.toLowerCase(),
|
package/dist/index.mjs
CHANGED
|
@@ -1190,10 +1190,6 @@ function UnifoldProvider({
|
|
|
1190
1190
|
const prevPublishableKeyRef = useRef(publishableKey);
|
|
1191
1191
|
useEffect(() => {
|
|
1192
1192
|
if (prevPublishableKeyRef.current !== publishableKey) {
|
|
1193
|
-
console.log(
|
|
1194
|
-
"Unifold: Reinitializing with new publishable key:",
|
|
1195
|
-
publishableKey
|
|
1196
|
-
);
|
|
1197
1193
|
prevPublishableKeyRef.current = publishableKey;
|
|
1198
1194
|
}
|
|
1199
1195
|
}, [publishableKey]);
|
|
@@ -6238,7 +6234,6 @@ async function getProjectConfig(publishableKey) {
|
|
|
6238
6234
|
const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
|
|
6239
6235
|
validatePublishableKey(pk);
|
|
6240
6236
|
const url = `${API_BASE_URL}/v1/public/projects/config`;
|
|
6241
|
-
console.log("[getProjectConfig] Fetching from:", url, "with key:", pk);
|
|
6242
6237
|
const response = await fetch(url, {
|
|
6243
6238
|
method: "GET",
|
|
6244
6239
|
headers: {
|
|
@@ -10767,9 +10762,9 @@ function DepositExecutionItem({
|
|
|
10767
10762
|
return timestamp;
|
|
10768
10763
|
}
|
|
10769
10764
|
};
|
|
10770
|
-
const formatUsdAmount = (
|
|
10765
|
+
const formatUsdAmount = (sourceAmountUsd) => {
|
|
10771
10766
|
try {
|
|
10772
|
-
const amount = Number(
|
|
10767
|
+
const amount = Number(sourceAmountUsd);
|
|
10773
10768
|
return new Intl.NumberFormat("en-US", {
|
|
10774
10769
|
style: "currency",
|
|
10775
10770
|
currency: "USD",
|
|
@@ -11179,9 +11174,9 @@ function DepositSuccessToast({
|
|
|
11179
11174
|
return timestamp;
|
|
11180
11175
|
}
|
|
11181
11176
|
};
|
|
11182
|
-
const formatUsdAmount = (
|
|
11177
|
+
const formatUsdAmount = (sourceAmountUsd2) => {
|
|
11183
11178
|
try {
|
|
11184
|
-
const amount = Number(
|
|
11179
|
+
const amount = Number(sourceAmountUsd2);
|
|
11185
11180
|
return new Intl.NumberFormat("en-US", {
|
|
11186
11181
|
style: "currency",
|
|
11187
11182
|
currency: "USD",
|
|
@@ -12280,7 +12275,6 @@ function useUserIp2() {
|
|
|
12280
12275
|
queryKey: ["unifold", "userIpInfo"],
|
|
12281
12276
|
queryFn: async () => {
|
|
12282
12277
|
const data = await getIpAddress();
|
|
12283
|
-
console.log("[useUserIp] IP detected:", data);
|
|
12284
12278
|
return {
|
|
12285
12279
|
alpha2: data.alpha2.toLowerCase(),
|
|
12286
12280
|
alpha3: data.alpha3?.toLowerCase(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unifold/connect-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "Unifold Connect React - Complete React SDK with UI components for crypto deposits",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@tanstack/react-query": "^5.62.15",
|
|
27
|
-
"@unifold/core": "0.1.
|
|
28
|
-
"@unifold/react-provider": "0.1.
|
|
29
|
-
"@unifold/ui-react": "0.1.
|
|
27
|
+
"@unifold/core": "0.1.17",
|
|
28
|
+
"@unifold/react-provider": "0.1.17",
|
|
29
|
+
"@unifold/ui-react": "0.1.17"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/react": "^19.0.0",
|