@unifold/connect-react 0.1.29 → 0.1.31
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 +13 -3
- package/dist/index.mjs +13 -3
- package/package.json +6 -7
package/dist/index.js
CHANGED
|
@@ -6064,7 +6064,13 @@ var import_react9 = require("react");
|
|
|
6064
6064
|
|
|
6065
6065
|
// ../core/dist/index.mjs
|
|
6066
6066
|
var import_react_query2 = require("@tanstack/react-query");
|
|
6067
|
-
var API_BASE_URL =
|
|
6067
|
+
var API_BASE_URL = (() => {
|
|
6068
|
+
try {
|
|
6069
|
+
return process.env.NEXT_PUBLIC_API_BASE_URL || "https://api.unifold.io";
|
|
6070
|
+
} catch {
|
|
6071
|
+
return "https://api.unifold.io";
|
|
6072
|
+
}
|
|
6073
|
+
})();
|
|
6068
6074
|
var DEFAULT_PUBLISHABLE_KEY = "pk_test_123";
|
|
6069
6075
|
var DEFAULT_CONFIG = {};
|
|
6070
6076
|
function setApiConfig(config) {
|
|
@@ -12146,6 +12152,10 @@ function useDepositPolling({
|
|
|
12146
12152
|
const execution = executionToShow;
|
|
12147
12153
|
const previousStatus = trackedExecutionsRef.current.get(execution.id);
|
|
12148
12154
|
trackedExecutionsRef.current.set(execution.id, execution.status);
|
|
12155
|
+
const executionCreatedAt = execution.created_at ? new Date(execution.created_at) : null;
|
|
12156
|
+
if (!executionCreatedAt || executionCreatedAt < modalOpenedAtRef.current) {
|
|
12157
|
+
return;
|
|
12158
|
+
}
|
|
12149
12159
|
setExecutions((prev) => {
|
|
12150
12160
|
const existingIndex = prev.findIndex((e) => e.id === execution.id);
|
|
12151
12161
|
if (existingIndex >= 0) {
|
|
@@ -18460,7 +18470,7 @@ function TransferCryptoSingleInput({
|
|
|
18460
18470
|
] })
|
|
18461
18471
|
] })
|
|
18462
18472
|
] }),
|
|
18463
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
18473
|
+
wallets && wallets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
18464
18474
|
DepositPollingUi,
|
|
18465
18475
|
{
|
|
18466
18476
|
depositConfirmationMode,
|
|
@@ -19043,7 +19053,7 @@ function TransferCryptoDoubleInput({
|
|
|
19043
19053
|
] })
|
|
19044
19054
|
] })
|
|
19045
19055
|
] }),
|
|
19046
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
19056
|
+
wallets && wallets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
19047
19057
|
DepositPollingUi,
|
|
19048
19058
|
{
|
|
19049
19059
|
depositConfirmationMode,
|
package/dist/index.mjs
CHANGED
|
@@ -6038,7 +6038,13 @@ import { useState as useState92, useEffect as useEffect52, useRef as useRef22 }
|
|
|
6038
6038
|
|
|
6039
6039
|
// ../core/dist/index.mjs
|
|
6040
6040
|
import { useQuery } from "@tanstack/react-query";
|
|
6041
|
-
var API_BASE_URL =
|
|
6041
|
+
var API_BASE_URL = (() => {
|
|
6042
|
+
try {
|
|
6043
|
+
return process.env.NEXT_PUBLIC_API_BASE_URL || "https://api.unifold.io";
|
|
6044
|
+
} catch {
|
|
6045
|
+
return "https://api.unifold.io";
|
|
6046
|
+
}
|
|
6047
|
+
})();
|
|
6042
6048
|
var DEFAULT_PUBLISHABLE_KEY = "pk_test_123";
|
|
6043
6049
|
var DEFAULT_CONFIG = {};
|
|
6044
6050
|
function setApiConfig(config) {
|
|
@@ -12120,6 +12126,10 @@ function useDepositPolling({
|
|
|
12120
12126
|
const execution = executionToShow;
|
|
12121
12127
|
const previousStatus = trackedExecutionsRef.current.get(execution.id);
|
|
12122
12128
|
trackedExecutionsRef.current.set(execution.id, execution.status);
|
|
12129
|
+
const executionCreatedAt = execution.created_at ? new Date(execution.created_at) : null;
|
|
12130
|
+
if (!executionCreatedAt || executionCreatedAt < modalOpenedAtRef.current) {
|
|
12131
|
+
return;
|
|
12132
|
+
}
|
|
12123
12133
|
setExecutions((prev) => {
|
|
12124
12134
|
const existingIndex = prev.findIndex((e) => e.id === execution.id);
|
|
12125
12135
|
if (existingIndex >= 0) {
|
|
@@ -18434,7 +18444,7 @@ function TransferCryptoSingleInput({
|
|
|
18434
18444
|
] })
|
|
18435
18445
|
] })
|
|
18436
18446
|
] }),
|
|
18437
|
-
/* @__PURE__ */ jsx39(
|
|
18447
|
+
wallets && wallets.length > 0 && /* @__PURE__ */ jsx39(
|
|
18438
18448
|
DepositPollingUi,
|
|
18439
18449
|
{
|
|
18440
18450
|
depositConfirmationMode,
|
|
@@ -19017,7 +19027,7 @@ function TransferCryptoDoubleInput({
|
|
|
19017
19027
|
] })
|
|
19018
19028
|
] })
|
|
19019
19029
|
] }),
|
|
19020
|
-
/* @__PURE__ */ jsx41(
|
|
19030
|
+
wallets && wallets.length > 0 && /* @__PURE__ */ jsx41(
|
|
19021
19031
|
DepositPollingUi,
|
|
19022
19032
|
{
|
|
19023
19033
|
depositConfirmationMode,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unifold/connect-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.31",
|
|
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",
|
|
@@ -21,16 +21,15 @@
|
|
|
21
21
|
],
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": "^18.2.0 || ^19.0.0",
|
|
24
|
-
"react-dom": "^18.2.0 || ^19.0.0"
|
|
25
|
-
"@tanstack/react-query": "^5.0.0"
|
|
24
|
+
"react-dom": "^18.2.0 || ^19.0.0"
|
|
26
25
|
},
|
|
27
26
|
"dependencies": {
|
|
28
|
-
"@
|
|
29
|
-
"@unifold/
|
|
30
|
-
"@unifold/react-provider": "0.1.
|
|
27
|
+
"@tanstack/react-query": "^5.90.11",
|
|
28
|
+
"@unifold/core": "0.1.31",
|
|
29
|
+
"@unifold/react-provider": "0.1.31",
|
|
30
|
+
"@unifold/ui-react": "0.1.31"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@tanstack/react-query": "^5.90.11",
|
|
34
33
|
"@types/react": "^19.0.0",
|
|
35
34
|
"@types/react-dom": "^19.0.0",
|
|
36
35
|
"tsup": "^8.0.0",
|