@unifold/connect-react 0.1.10 → 0.1.11
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 +18 -2
- package/dist/index.mjs +18 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -10634,6 +10634,14 @@ function DepositExecutionItem({
|
|
|
10634
10634
|
}
|
|
10635
10635
|
);
|
|
10636
10636
|
}
|
|
10637
|
+
function formatCurrency(currency) {
|
|
10638
|
+
if (!currency) return "";
|
|
10639
|
+
const dotIndex = currency.indexOf(".");
|
|
10640
|
+
if (dotIndex === -1) {
|
|
10641
|
+
return currency.toUpperCase();
|
|
10642
|
+
}
|
|
10643
|
+
return currency.slice(0, dotIndex).toUpperCase() + currency.slice(dotIndex);
|
|
10644
|
+
}
|
|
10637
10645
|
function DepositDetailContent({ execution }) {
|
|
10638
10646
|
const [chains, setChains] = (0, import_react11.useState)([]);
|
|
10639
10647
|
const [showNetworkDetails, setShowNetworkDetails] = (0, import_react11.useState)(false);
|
|
@@ -10773,7 +10781,7 @@ function DepositDetailContent({ execution }) {
|
|
|
10773
10781
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "uf-text-foreground uf-font-medium", children: [
|
|
10774
10782
|
formatAmount(execution.source_amount_base_unit),
|
|
10775
10783
|
" ",
|
|
10776
|
-
execution.source_currency
|
|
10784
|
+
formatCurrency(execution.source_currency)
|
|
10777
10785
|
] })
|
|
10778
10786
|
] }),
|
|
10779
10787
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
|
|
@@ -10781,7 +10789,7 @@ function DepositDetailContent({ execution }) {
|
|
|
10781
10789
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "uf-text-foreground uf-font-medium", children: [
|
|
10782
10790
|
formatAmount(execution.destination_amount_base_unit),
|
|
10783
10791
|
" ",
|
|
10784
|
-
execution.destination_currency
|
|
10792
|
+
formatCurrency(execution.destination_currency)
|
|
10785
10793
|
] })
|
|
10786
10794
|
] }),
|
|
10787
10795
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
|
|
@@ -11378,6 +11386,10 @@ function TransferCryptoBase({
|
|
|
11378
11386
|
setLoading(false);
|
|
11379
11387
|
return;
|
|
11380
11388
|
}
|
|
11389
|
+
if (internalWallets.length > 0) {
|
|
11390
|
+
setLoading(false);
|
|
11391
|
+
return;
|
|
11392
|
+
}
|
|
11381
11393
|
let retryTimeout = null;
|
|
11382
11394
|
let isCancelled = false;
|
|
11383
11395
|
const fetchWallets = async () => {
|
|
@@ -12179,6 +12191,10 @@ function BuyWithCard({
|
|
|
12179
12191
|
setWalletsLoading(false);
|
|
12180
12192
|
return;
|
|
12181
12193
|
}
|
|
12194
|
+
if (internalWallets.length > 0) {
|
|
12195
|
+
setWalletsLoading(false);
|
|
12196
|
+
return;
|
|
12197
|
+
}
|
|
12182
12198
|
let retryTimeout = null;
|
|
12183
12199
|
let isCancelled = false;
|
|
12184
12200
|
const fetchWallets = async () => {
|
package/dist/index.mjs
CHANGED
|
@@ -10630,6 +10630,14 @@ function DepositExecutionItem({
|
|
|
10630
10630
|
}
|
|
10631
10631
|
);
|
|
10632
10632
|
}
|
|
10633
|
+
function formatCurrency(currency) {
|
|
10634
|
+
if (!currency) return "";
|
|
10635
|
+
const dotIndex = currency.indexOf(".");
|
|
10636
|
+
if (dotIndex === -1) {
|
|
10637
|
+
return currency.toUpperCase();
|
|
10638
|
+
}
|
|
10639
|
+
return currency.slice(0, dotIndex).toUpperCase() + currency.slice(dotIndex);
|
|
10640
|
+
}
|
|
10633
10641
|
function DepositDetailContent({ execution }) {
|
|
10634
10642
|
const [chains, setChains] = useState16([]);
|
|
10635
10643
|
const [showNetworkDetails, setShowNetworkDetails] = useState16(false);
|
|
@@ -10769,7 +10777,7 @@ function DepositDetailContent({ execution }) {
|
|
|
10769
10777
|
/* @__PURE__ */ jsxs42("span", { className: "uf-text-foreground uf-font-medium", children: [
|
|
10770
10778
|
formatAmount(execution.source_amount_base_unit),
|
|
10771
10779
|
" ",
|
|
10772
|
-
execution.source_currency
|
|
10780
|
+
formatCurrency(execution.source_currency)
|
|
10773
10781
|
] })
|
|
10774
10782
|
] }),
|
|
10775
10783
|
/* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
|
|
@@ -10777,7 +10785,7 @@ function DepositDetailContent({ execution }) {
|
|
|
10777
10785
|
/* @__PURE__ */ jsxs42("span", { className: "uf-text-foreground uf-font-medium", children: [
|
|
10778
10786
|
formatAmount(execution.destination_amount_base_unit),
|
|
10779
10787
|
" ",
|
|
10780
|
-
execution.destination_currency
|
|
10788
|
+
formatCurrency(execution.destination_currency)
|
|
10781
10789
|
] })
|
|
10782
10790
|
] }),
|
|
10783
10791
|
/* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
|
|
@@ -11374,6 +11382,10 @@ function TransferCryptoBase({
|
|
|
11374
11382
|
setLoading(false);
|
|
11375
11383
|
return;
|
|
11376
11384
|
}
|
|
11385
|
+
if (internalWallets.length > 0) {
|
|
11386
|
+
setLoading(false);
|
|
11387
|
+
return;
|
|
11388
|
+
}
|
|
11377
11389
|
let retryTimeout = null;
|
|
11378
11390
|
let isCancelled = false;
|
|
11379
11391
|
const fetchWallets = async () => {
|
|
@@ -12175,6 +12187,10 @@ function BuyWithCard({
|
|
|
12175
12187
|
setWalletsLoading(false);
|
|
12176
12188
|
return;
|
|
12177
12189
|
}
|
|
12190
|
+
if (internalWallets.length > 0) {
|
|
12191
|
+
setWalletsLoading(false);
|
|
12192
|
+
return;
|
|
12193
|
+
}
|
|
12178
12194
|
let retryTimeout = null;
|
|
12179
12195
|
let isCancelled = false;
|
|
12180
12196
|
const fetchWallets = async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unifold/connect-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
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,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@tanstack/react-query": "^5.62.15",
|
|
27
|
-
"@unifold/react-provider": "0.1.
|
|
28
|
-
"@unifold/ui-react": "0.1.
|
|
27
|
+
"@unifold/react-provider": "0.1.11",
|
|
28
|
+
"@unifold/ui-react": "0.1.11"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/react": "^18.2.0",
|