@unifold/ui-react 0.1.2 → 0.1.4
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.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +11 -2
- package/dist/index.mjs +11 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -15,6 +15,7 @@ interface DepositModalProps {
|
|
|
15
15
|
modalTitle?: string;
|
|
16
16
|
destinationTokenSymbol?: string;
|
|
17
17
|
recipientAddress?: string;
|
|
18
|
+
destinationChainType?: "ethereum" | "solana" | "bitcoin";
|
|
18
19
|
destinationChainId?: string;
|
|
19
20
|
destinationTokenAddress?: string;
|
|
20
21
|
hideDepositTracker?: boolean;
|
|
@@ -30,7 +31,7 @@ interface DepositModalProps {
|
|
|
30
31
|
}) => void;
|
|
31
32
|
theme?: 'light' | 'dark' | 'auto';
|
|
32
33
|
}
|
|
33
|
-
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainId, destinationTokenAddress, hideDepositTracker, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
34
|
+
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
34
35
|
|
|
35
36
|
interface DepositHeaderProps {
|
|
36
37
|
title: string;
|
|
@@ -48,6 +49,7 @@ interface TransferCryptoProps {
|
|
|
48
49
|
userId: string;
|
|
49
50
|
publishableKey: string;
|
|
50
51
|
recipientAddress?: string;
|
|
52
|
+
destinationChainType?: "ethereum" | "solana" | "bitcoin";
|
|
51
53
|
destinationChainId?: string;
|
|
52
54
|
destinationTokenAddress?: string;
|
|
53
55
|
copyButtonMode?: "compact" | "fullWidth";
|
|
@@ -284,6 +286,7 @@ interface TransferCryptoBaseProps {
|
|
|
284
286
|
userId: string;
|
|
285
287
|
publishableKey: string;
|
|
286
288
|
recipientAddress?: string;
|
|
289
|
+
destinationChainType?: "ethereum" | "solana" | "bitcoin";
|
|
287
290
|
destinationChainId?: string;
|
|
288
291
|
destinationTokenAddress?: string;
|
|
289
292
|
copyButtonMode?: "compact" | "fullWidth";
|
|
@@ -301,7 +304,7 @@ interface TransferCryptoBaseProps {
|
|
|
301
304
|
code?: string;
|
|
302
305
|
}) => void;
|
|
303
306
|
}
|
|
304
|
-
declare function TransferCryptoBase({ userId, publishableKey, recipientAddress, destinationChainId, destinationTokenAddress, copyButtonMode, layoutVariant, showDetailedDropdowns, onExecutionsChange, onDepositSuccess, onDepositError, }: TransferCryptoBaseProps): react_jsx_runtime.JSX.Element;
|
|
307
|
+
declare function TransferCryptoBase({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, copyButtonMode, layoutVariant, showDetailedDropdowns, onExecutionsChange, onDepositSuccess, onDepositError, }: TransferCryptoBaseProps): react_jsx_runtime.JSX.Element;
|
|
305
308
|
|
|
306
309
|
interface BuyWithCardProps {
|
|
307
310
|
userId: string;
|
|
@@ -312,6 +315,7 @@ interface BuyWithCardProps {
|
|
|
312
315
|
accentColor?: string;
|
|
313
316
|
destinationTokenSymbol?: string;
|
|
314
317
|
recipientAddress?: string;
|
|
318
|
+
destinationChainType?: "ethereum" | "solana" | "bitcoin";
|
|
315
319
|
destinationChainId?: string;
|
|
316
320
|
destinationTokenAddress?: string;
|
|
317
321
|
onDepositSuccess?: (data: {
|
|
@@ -326,7 +330,7 @@ interface BuyWithCardProps {
|
|
|
326
330
|
}) => void;
|
|
327
331
|
themeClass?: string;
|
|
328
332
|
}
|
|
329
|
-
declare function BuyWithCard({ userId, publishableKey, view: externalView, onViewChange, maxAmountUsd, accentColor, destinationTokenSymbol, recipientAddress, destinationChainId, destinationTokenAddress, themeClass, }: BuyWithCardProps): react_jsx_runtime.JSX.Element;
|
|
333
|
+
declare function BuyWithCard({ userId, publishableKey, view: externalView, onViewChange, maxAmountUsd, accentColor, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, themeClass, }: BuyWithCardProps): react_jsx_runtime.JSX.Element;
|
|
330
334
|
|
|
331
335
|
interface CurrencyModalProps {
|
|
332
336
|
open: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ interface DepositModalProps {
|
|
|
15
15
|
modalTitle?: string;
|
|
16
16
|
destinationTokenSymbol?: string;
|
|
17
17
|
recipientAddress?: string;
|
|
18
|
+
destinationChainType?: "ethereum" | "solana" | "bitcoin";
|
|
18
19
|
destinationChainId?: string;
|
|
19
20
|
destinationTokenAddress?: string;
|
|
20
21
|
hideDepositTracker?: boolean;
|
|
@@ -30,7 +31,7 @@ interface DepositModalProps {
|
|
|
30
31
|
}) => void;
|
|
31
32
|
theme?: 'light' | 'dark' | 'auto';
|
|
32
33
|
}
|
|
33
|
-
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainId, destinationTokenAddress, hideDepositTracker, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
34
|
+
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
34
35
|
|
|
35
36
|
interface DepositHeaderProps {
|
|
36
37
|
title: string;
|
|
@@ -48,6 +49,7 @@ interface TransferCryptoProps {
|
|
|
48
49
|
userId: string;
|
|
49
50
|
publishableKey: string;
|
|
50
51
|
recipientAddress?: string;
|
|
52
|
+
destinationChainType?: "ethereum" | "solana" | "bitcoin";
|
|
51
53
|
destinationChainId?: string;
|
|
52
54
|
destinationTokenAddress?: string;
|
|
53
55
|
copyButtonMode?: "compact" | "fullWidth";
|
|
@@ -284,6 +286,7 @@ interface TransferCryptoBaseProps {
|
|
|
284
286
|
userId: string;
|
|
285
287
|
publishableKey: string;
|
|
286
288
|
recipientAddress?: string;
|
|
289
|
+
destinationChainType?: "ethereum" | "solana" | "bitcoin";
|
|
287
290
|
destinationChainId?: string;
|
|
288
291
|
destinationTokenAddress?: string;
|
|
289
292
|
copyButtonMode?: "compact" | "fullWidth";
|
|
@@ -301,7 +304,7 @@ interface TransferCryptoBaseProps {
|
|
|
301
304
|
code?: string;
|
|
302
305
|
}) => void;
|
|
303
306
|
}
|
|
304
|
-
declare function TransferCryptoBase({ userId, publishableKey, recipientAddress, destinationChainId, destinationTokenAddress, copyButtonMode, layoutVariant, showDetailedDropdowns, onExecutionsChange, onDepositSuccess, onDepositError, }: TransferCryptoBaseProps): react_jsx_runtime.JSX.Element;
|
|
307
|
+
declare function TransferCryptoBase({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, copyButtonMode, layoutVariant, showDetailedDropdowns, onExecutionsChange, onDepositSuccess, onDepositError, }: TransferCryptoBaseProps): react_jsx_runtime.JSX.Element;
|
|
305
308
|
|
|
306
309
|
interface BuyWithCardProps {
|
|
307
310
|
userId: string;
|
|
@@ -312,6 +315,7 @@ interface BuyWithCardProps {
|
|
|
312
315
|
accentColor?: string;
|
|
313
316
|
destinationTokenSymbol?: string;
|
|
314
317
|
recipientAddress?: string;
|
|
318
|
+
destinationChainType?: "ethereum" | "solana" | "bitcoin";
|
|
315
319
|
destinationChainId?: string;
|
|
316
320
|
destinationTokenAddress?: string;
|
|
317
321
|
onDepositSuccess?: (data: {
|
|
@@ -326,7 +330,7 @@ interface BuyWithCardProps {
|
|
|
326
330
|
}) => void;
|
|
327
331
|
themeClass?: string;
|
|
328
332
|
}
|
|
329
|
-
declare function BuyWithCard({ userId, publishableKey, view: externalView, onViewChange, maxAmountUsd, accentColor, destinationTokenSymbol, recipientAddress, destinationChainId, destinationTokenAddress, themeClass, }: BuyWithCardProps): react_jsx_runtime.JSX.Element;
|
|
333
|
+
declare function BuyWithCard({ userId, publishableKey, view: externalView, onViewChange, maxAmountUsd, accentColor, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, themeClass, }: BuyWithCardProps): react_jsx_runtime.JSX.Element;
|
|
330
334
|
|
|
331
335
|
interface CurrencyModalProps {
|
|
332
336
|
open: boolean;
|
package/dist/index.js
CHANGED
|
@@ -977,6 +977,7 @@ function TransferCryptoBase({
|
|
|
977
977
|
userId,
|
|
978
978
|
publishableKey,
|
|
979
979
|
recipientAddress,
|
|
980
|
+
destinationChainType,
|
|
980
981
|
destinationChainId,
|
|
981
982
|
destinationTokenAddress,
|
|
982
983
|
copyButtonMode = "compact",
|
|
@@ -1063,6 +1064,7 @@ function TransferCryptoBase({
|
|
|
1063
1064
|
{
|
|
1064
1065
|
user_id: userId,
|
|
1065
1066
|
recipient_address: recipientAddress,
|
|
1067
|
+
destination_chain_type: destinationChainType,
|
|
1066
1068
|
destination_chain_id: destinationChainId,
|
|
1067
1069
|
destination_token_address: destinationTokenAddress
|
|
1068
1070
|
},
|
|
@@ -1081,6 +1083,7 @@ function TransferCryptoBase({
|
|
|
1081
1083
|
}, [
|
|
1082
1084
|
userId,
|
|
1083
1085
|
recipientAddress,
|
|
1086
|
+
destinationChainType,
|
|
1084
1087
|
destinationChainId,
|
|
1085
1088
|
destinationTokenAddress,
|
|
1086
1089
|
publishableKey
|
|
@@ -1521,8 +1524,9 @@ function TransferCryptoBase({
|
|
|
1521
1524
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1522
1525
|
"a",
|
|
1523
1526
|
{
|
|
1524
|
-
href: "
|
|
1527
|
+
href: "https://unifold.io/terms",
|
|
1525
1528
|
className: "uf-text-muted-foreground uf-underline hover:uf-text-foreground uf-transition-colors",
|
|
1529
|
+
target: "_blank",
|
|
1526
1530
|
children: t.terms.termsApply
|
|
1527
1531
|
}
|
|
1528
1532
|
),
|
|
@@ -1831,6 +1835,7 @@ function BuyWithCard({
|
|
|
1831
1835
|
accentColor = "#0052FF",
|
|
1832
1836
|
destinationTokenSymbol,
|
|
1833
1837
|
recipientAddress,
|
|
1838
|
+
destinationChainType,
|
|
1834
1839
|
destinationChainId,
|
|
1835
1840
|
destinationTokenAddress,
|
|
1836
1841
|
themeClass = ""
|
|
@@ -1904,6 +1909,7 @@ function BuyWithCard({
|
|
|
1904
1909
|
{
|
|
1905
1910
|
user_id: userId,
|
|
1906
1911
|
recipient_address: recipientAddress,
|
|
1912
|
+
destination_chain_type: destinationChainType,
|
|
1907
1913
|
destination_chain_id: destinationChainId,
|
|
1908
1914
|
destination_token_address: destinationTokenAddress
|
|
1909
1915
|
},
|
|
@@ -1918,7 +1924,7 @@ function BuyWithCard({
|
|
|
1918
1924
|
}
|
|
1919
1925
|
}
|
|
1920
1926
|
fetchWallets();
|
|
1921
|
-
}, [userId, recipientAddress, destinationChainId, destinationTokenAddress, publishableKey]);
|
|
1927
|
+
}, [userId, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, publishableKey]);
|
|
1922
1928
|
(0, import_react5.useEffect)(() => {
|
|
1923
1929
|
async function fetchSupportedTokens() {
|
|
1924
1930
|
try {
|
|
@@ -2610,6 +2616,7 @@ function DepositModal({
|
|
|
2610
2616
|
modalTitle,
|
|
2611
2617
|
destinationTokenSymbol,
|
|
2612
2618
|
recipientAddress,
|
|
2619
|
+
destinationChainType,
|
|
2613
2620
|
destinationChainId,
|
|
2614
2621
|
destinationTokenAddress,
|
|
2615
2622
|
hideDepositTracker = false,
|
|
@@ -2720,6 +2727,7 @@ function DepositModal({
|
|
|
2720
2727
|
userId,
|
|
2721
2728
|
publishableKey,
|
|
2722
2729
|
recipientAddress,
|
|
2730
|
+
destinationChainType,
|
|
2723
2731
|
destinationChainId,
|
|
2724
2732
|
destinationTokenAddress,
|
|
2725
2733
|
onExecutionsChange: setDepositExecutions,
|
|
@@ -2747,6 +2755,7 @@ function DepositModal({
|
|
|
2747
2755
|
onViewChange: handleCardViewChange,
|
|
2748
2756
|
destinationTokenSymbol,
|
|
2749
2757
|
recipientAddress,
|
|
2758
|
+
destinationChainType,
|
|
2750
2759
|
destinationChainId,
|
|
2751
2760
|
destinationTokenAddress,
|
|
2752
2761
|
onDepositSuccess,
|
package/dist/index.mjs
CHANGED
|
@@ -894,6 +894,7 @@ function TransferCryptoBase({
|
|
|
894
894
|
userId,
|
|
895
895
|
publishableKey,
|
|
896
896
|
recipientAddress,
|
|
897
|
+
destinationChainType,
|
|
897
898
|
destinationChainId,
|
|
898
899
|
destinationTokenAddress,
|
|
899
900
|
copyButtonMode = "compact",
|
|
@@ -980,6 +981,7 @@ function TransferCryptoBase({
|
|
|
980
981
|
{
|
|
981
982
|
user_id: userId,
|
|
982
983
|
recipient_address: recipientAddress,
|
|
984
|
+
destination_chain_type: destinationChainType,
|
|
983
985
|
destination_chain_id: destinationChainId,
|
|
984
986
|
destination_token_address: destinationTokenAddress
|
|
985
987
|
},
|
|
@@ -998,6 +1000,7 @@ function TransferCryptoBase({
|
|
|
998
1000
|
}, [
|
|
999
1001
|
userId,
|
|
1000
1002
|
recipientAddress,
|
|
1003
|
+
destinationChainType,
|
|
1001
1004
|
destinationChainId,
|
|
1002
1005
|
destinationTokenAddress,
|
|
1003
1006
|
publishableKey
|
|
@@ -1438,8 +1441,9 @@ function TransferCryptoBase({
|
|
|
1438
1441
|
/* @__PURE__ */ jsx11(
|
|
1439
1442
|
"a",
|
|
1440
1443
|
{
|
|
1441
|
-
href: "
|
|
1444
|
+
href: "https://unifold.io/terms",
|
|
1442
1445
|
className: "uf-text-muted-foreground uf-underline hover:uf-text-foreground uf-transition-colors",
|
|
1446
|
+
target: "_blank",
|
|
1443
1447
|
children: t.terms.termsApply
|
|
1444
1448
|
}
|
|
1445
1449
|
),
|
|
@@ -1748,6 +1752,7 @@ function BuyWithCard({
|
|
|
1748
1752
|
accentColor = "#0052FF",
|
|
1749
1753
|
destinationTokenSymbol,
|
|
1750
1754
|
recipientAddress,
|
|
1755
|
+
destinationChainType,
|
|
1751
1756
|
destinationChainId,
|
|
1752
1757
|
destinationTokenAddress,
|
|
1753
1758
|
themeClass = ""
|
|
@@ -1821,6 +1826,7 @@ function BuyWithCard({
|
|
|
1821
1826
|
{
|
|
1822
1827
|
user_id: userId,
|
|
1823
1828
|
recipient_address: recipientAddress,
|
|
1829
|
+
destination_chain_type: destinationChainType,
|
|
1824
1830
|
destination_chain_id: destinationChainId,
|
|
1825
1831
|
destination_token_address: destinationTokenAddress
|
|
1826
1832
|
},
|
|
@@ -1835,7 +1841,7 @@ function BuyWithCard({
|
|
|
1835
1841
|
}
|
|
1836
1842
|
}
|
|
1837
1843
|
fetchWallets();
|
|
1838
|
-
}, [userId, recipientAddress, destinationChainId, destinationTokenAddress, publishableKey]);
|
|
1844
|
+
}, [userId, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, publishableKey]);
|
|
1839
1845
|
useEffect4(() => {
|
|
1840
1846
|
async function fetchSupportedTokens() {
|
|
1841
1847
|
try {
|
|
@@ -2527,6 +2533,7 @@ function DepositModal({
|
|
|
2527
2533
|
modalTitle,
|
|
2528
2534
|
destinationTokenSymbol,
|
|
2529
2535
|
recipientAddress,
|
|
2536
|
+
destinationChainType,
|
|
2530
2537
|
destinationChainId,
|
|
2531
2538
|
destinationTokenAddress,
|
|
2532
2539
|
hideDepositTracker = false,
|
|
@@ -2637,6 +2644,7 @@ function DepositModal({
|
|
|
2637
2644
|
userId,
|
|
2638
2645
|
publishableKey,
|
|
2639
2646
|
recipientAddress,
|
|
2647
|
+
destinationChainType,
|
|
2640
2648
|
destinationChainId,
|
|
2641
2649
|
destinationTokenAddress,
|
|
2642
2650
|
onExecutionsChange: setDepositExecutions,
|
|
@@ -2664,6 +2672,7 @@ function DepositModal({
|
|
|
2664
2672
|
onViewChange: handleCardViewChange,
|
|
2665
2673
|
destinationTokenSymbol,
|
|
2666
2674
|
recipientAddress,
|
|
2675
|
+
destinationChainType,
|
|
2667
2676
|
destinationChainId,
|
|
2668
2677
|
destinationTokenAddress,
|
|
2669
2678
|
onDepositSuccess,
|