@unifold/connect-react 0.1.71-beta.2 → 0.1.71
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 +14 -9
- package/dist/index.mjs +14 -9
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -13322,7 +13322,7 @@ function DepositHeader({
|
|
|
13322
13322
|
setShowBalanceSkeleton(false);
|
|
13323
13323
|
return;
|
|
13324
13324
|
}
|
|
13325
|
-
const supportedChainTypes = ["ethereum", "solana", "bitcoin", "n1"];
|
|
13325
|
+
const supportedChainTypes = ["ethereum", "solana", "bitcoin", "n1", "tron"];
|
|
13326
13326
|
if (!supportedChainTypes.includes(balanceChainType)) {
|
|
13327
13327
|
setBalance(null);
|
|
13328
13328
|
setIsLoadingBalance(false);
|
|
@@ -28013,7 +28013,7 @@ function CoinbaseConnect({
|
|
|
28013
28013
|
onClose,
|
|
28014
28014
|
showBalance: true,
|
|
28015
28015
|
balanceAddress: recipientAddress,
|
|
28016
|
-
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" ? destinationChainType : void 0,
|
|
28016
|
+
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "tron" ? destinationChainType : void 0,
|
|
28017
28017
|
balanceChainId: destinationChainId,
|
|
28018
28018
|
balanceTokenAddress: destinationTokenAddress,
|
|
28019
28019
|
projectName: projectConfig?.project_name,
|
|
@@ -29961,9 +29961,10 @@ function useDefaultToken({
|
|
|
29961
29961
|
}, [token, tokens, chain]);
|
|
29962
29962
|
return { token, chain, setToken, setChain, initialSelectionDone };
|
|
29963
29963
|
}
|
|
29964
|
-
var
|
|
29964
|
+
var STORAGE_KEY_BASE = "unifold_last_deposit_from_token";
|
|
29965
29965
|
function useDefaultSourceToken({
|
|
29966
29966
|
supportedTokens,
|
|
29967
|
+
externalUserId,
|
|
29967
29968
|
defaultSourceChainType,
|
|
29968
29969
|
defaultSourceChainId,
|
|
29969
29970
|
defaultSourceTokenAddress,
|
|
@@ -29975,7 +29976,7 @@ function useDefaultSourceToken({
|
|
|
29975
29976
|
defaultChainId: defaultSourceChainId,
|
|
29976
29977
|
defaultTokenAddress: defaultSourceTokenAddress,
|
|
29977
29978
|
defaultSymbol: defaultSourceSymbol,
|
|
29978
|
-
storageKey:
|
|
29979
|
+
storageKey: `${STORAGE_KEY_BASE}:${encodeURIComponent(externalUserId)}`
|
|
29979
29980
|
});
|
|
29980
29981
|
}
|
|
29981
29982
|
function DepositFooterLinks({ onGlossaryClick, leftElement }) {
|
|
@@ -30411,6 +30412,7 @@ function TransferCryptoSingleInput({
|
|
|
30411
30412
|
const supportedTokens = tokensResponse?.data ?? [];
|
|
30412
30413
|
const { token, chain, setToken, setChain, initialSelectionDone } = useDefaultSourceToken({
|
|
30413
30414
|
supportedTokens,
|
|
30415
|
+
externalUserId: userId,
|
|
30414
30416
|
defaultSourceChainType,
|
|
30415
30417
|
defaultSourceChainId,
|
|
30416
30418
|
defaultSourceTokenAddress,
|
|
@@ -31211,6 +31213,7 @@ function TransferCryptoDoubleInput({
|
|
|
31211
31213
|
const supportedTokens = tokensResponse?.data ?? [];
|
|
31212
31214
|
const { token, chain, setToken, setChain, initialSelectionDone } = useDefaultSourceToken({
|
|
31213
31215
|
supportedTokens,
|
|
31216
|
+
externalUserId: userId,
|
|
31214
31217
|
defaultSourceChainType,
|
|
31215
31218
|
defaultSourceChainId,
|
|
31216
31219
|
defaultSourceTokenAddress,
|
|
@@ -35373,7 +35376,7 @@ function DepositModal({
|
|
|
35373
35376
|
incident: activeIncident,
|
|
35374
35377
|
showBalance: showBalanceHeader,
|
|
35375
35378
|
balanceAddress: recipientAddress,
|
|
35376
|
-
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" ? destinationChainType : void 0,
|
|
35379
|
+
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" || destinationChainType === "tron" ? destinationChainType : void 0,
|
|
35377
35380
|
balanceChainId: destinationChainId,
|
|
35378
35381
|
balanceTokenAddress: destinationTokenAddress,
|
|
35379
35382
|
projectName: projectConfig?.project_name,
|
|
@@ -35393,7 +35396,7 @@ function DepositModal({
|
|
|
35393
35396
|
incident: activeIncident,
|
|
35394
35397
|
showBalance: showBalanceHeader,
|
|
35395
35398
|
balanceAddress: recipientAddress,
|
|
35396
|
-
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" ? destinationChainType : void 0,
|
|
35399
|
+
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" || destinationChainType === "tron" ? destinationChainType : void 0,
|
|
35397
35400
|
balanceChainId: destinationChainId,
|
|
35398
35401
|
balanceTokenAddress: destinationTokenAddress,
|
|
35399
35402
|
projectName: projectConfig?.project_name,
|
|
@@ -35488,7 +35491,7 @@ function DepositModal({
|
|
|
35488
35491
|
badge: cardView === "quotes" ? { count: quotesCount } : void 0,
|
|
35489
35492
|
showBalance: showBalanceHeader,
|
|
35490
35493
|
balanceAddress: recipientAddress,
|
|
35491
|
-
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" ? destinationChainType : void 0,
|
|
35494
|
+
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" || destinationChainType === "tron" ? destinationChainType : void 0,
|
|
35492
35495
|
balanceChainId: destinationChainId,
|
|
35493
35496
|
balanceTokenAddress: destinationTokenAddress,
|
|
35494
35497
|
projectName: projectConfig?.project_name,
|
|
@@ -36547,9 +36550,10 @@ function useSupportedDestinationTokens(publishableKey, enabled = true) {
|
|
|
36547
36550
|
enabled
|
|
36548
36551
|
});
|
|
36549
36552
|
}
|
|
36550
|
-
var
|
|
36553
|
+
var STORAGE_KEY_BASE2 = "unifold_last_withdraw_to_token";
|
|
36551
36554
|
function useDefaultDestinationToken({
|
|
36552
36555
|
destinationTokens,
|
|
36556
|
+
externalUserId,
|
|
36553
36557
|
defaultDestinationChainType,
|
|
36554
36558
|
defaultDestinationChainId,
|
|
36555
36559
|
defaultDestinationTokenAddress,
|
|
@@ -36561,7 +36565,7 @@ function useDefaultDestinationToken({
|
|
|
36561
36565
|
defaultChainId: defaultDestinationChainId,
|
|
36562
36566
|
defaultTokenAddress: defaultDestinationTokenAddress,
|
|
36563
36567
|
defaultSymbol: defaultDestinationSymbol,
|
|
36564
|
-
storageKey:
|
|
36568
|
+
storageKey: `${STORAGE_KEY_BASE2}:${encodeURIComponent(externalUserId)}`
|
|
36565
36569
|
});
|
|
36566
36570
|
}
|
|
36567
36571
|
function useSourceTokenValidation(params) {
|
|
@@ -38206,6 +38210,7 @@ function WithdrawModal({
|
|
|
38206
38210
|
initialSelectionDone
|
|
38207
38211
|
} = useDefaultDestinationToken({
|
|
38208
38212
|
destinationTokens,
|
|
38213
|
+
externalUserId,
|
|
38209
38214
|
defaultDestinationChainType,
|
|
38210
38215
|
defaultDestinationChainId,
|
|
38211
38216
|
defaultDestinationTokenAddress,
|
package/dist/index.mjs
CHANGED
|
@@ -13400,7 +13400,7 @@ function DepositHeader({
|
|
|
13400
13400
|
setShowBalanceSkeleton(false);
|
|
13401
13401
|
return;
|
|
13402
13402
|
}
|
|
13403
|
-
const supportedChainTypes = ["ethereum", "solana", "bitcoin", "n1"];
|
|
13403
|
+
const supportedChainTypes = ["ethereum", "solana", "bitcoin", "n1", "tron"];
|
|
13404
13404
|
if (!supportedChainTypes.includes(balanceChainType)) {
|
|
13405
13405
|
setBalance(null);
|
|
13406
13406
|
setIsLoadingBalance(false);
|
|
@@ -28091,7 +28091,7 @@ function CoinbaseConnect({
|
|
|
28091
28091
|
onClose,
|
|
28092
28092
|
showBalance: true,
|
|
28093
28093
|
balanceAddress: recipientAddress,
|
|
28094
|
-
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" ? destinationChainType : void 0,
|
|
28094
|
+
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "tron" ? destinationChainType : void 0,
|
|
28095
28095
|
balanceChainId: destinationChainId,
|
|
28096
28096
|
balanceTokenAddress: destinationTokenAddress,
|
|
28097
28097
|
projectName: projectConfig?.project_name,
|
|
@@ -30039,9 +30039,10 @@ function useDefaultToken({
|
|
|
30039
30039
|
}, [token, tokens, chain]);
|
|
30040
30040
|
return { token, chain, setToken, setChain, initialSelectionDone };
|
|
30041
30041
|
}
|
|
30042
|
-
var
|
|
30042
|
+
var STORAGE_KEY_BASE = "unifold_last_deposit_from_token";
|
|
30043
30043
|
function useDefaultSourceToken({
|
|
30044
30044
|
supportedTokens,
|
|
30045
|
+
externalUserId,
|
|
30045
30046
|
defaultSourceChainType,
|
|
30046
30047
|
defaultSourceChainId,
|
|
30047
30048
|
defaultSourceTokenAddress,
|
|
@@ -30053,7 +30054,7 @@ function useDefaultSourceToken({
|
|
|
30053
30054
|
defaultChainId: defaultSourceChainId,
|
|
30054
30055
|
defaultTokenAddress: defaultSourceTokenAddress,
|
|
30055
30056
|
defaultSymbol: defaultSourceSymbol,
|
|
30056
|
-
storageKey:
|
|
30057
|
+
storageKey: `${STORAGE_KEY_BASE}:${encodeURIComponent(externalUserId)}`
|
|
30057
30058
|
});
|
|
30058
30059
|
}
|
|
30059
30060
|
function DepositFooterLinks({ onGlossaryClick, leftElement }) {
|
|
@@ -30489,6 +30490,7 @@ function TransferCryptoSingleInput({
|
|
|
30489
30490
|
const supportedTokens = tokensResponse?.data ?? [];
|
|
30490
30491
|
const { token, chain, setToken, setChain, initialSelectionDone } = useDefaultSourceToken({
|
|
30491
30492
|
supportedTokens,
|
|
30493
|
+
externalUserId: userId,
|
|
30492
30494
|
defaultSourceChainType,
|
|
30493
30495
|
defaultSourceChainId,
|
|
30494
30496
|
defaultSourceTokenAddress,
|
|
@@ -31289,6 +31291,7 @@ function TransferCryptoDoubleInput({
|
|
|
31289
31291
|
const supportedTokens = tokensResponse?.data ?? [];
|
|
31290
31292
|
const { token, chain, setToken, setChain, initialSelectionDone } = useDefaultSourceToken({
|
|
31291
31293
|
supportedTokens,
|
|
31294
|
+
externalUserId: userId,
|
|
31292
31295
|
defaultSourceChainType,
|
|
31293
31296
|
defaultSourceChainId,
|
|
31294
31297
|
defaultSourceTokenAddress,
|
|
@@ -35451,7 +35454,7 @@ function DepositModal({
|
|
|
35451
35454
|
incident: activeIncident,
|
|
35452
35455
|
showBalance: showBalanceHeader,
|
|
35453
35456
|
balanceAddress: recipientAddress,
|
|
35454
|
-
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" ? destinationChainType : void 0,
|
|
35457
|
+
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" || destinationChainType === "tron" ? destinationChainType : void 0,
|
|
35455
35458
|
balanceChainId: destinationChainId,
|
|
35456
35459
|
balanceTokenAddress: destinationTokenAddress,
|
|
35457
35460
|
projectName: projectConfig?.project_name,
|
|
@@ -35471,7 +35474,7 @@ function DepositModal({
|
|
|
35471
35474
|
incident: activeIncident,
|
|
35472
35475
|
showBalance: showBalanceHeader,
|
|
35473
35476
|
balanceAddress: recipientAddress,
|
|
35474
|
-
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" ? destinationChainType : void 0,
|
|
35477
|
+
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" || destinationChainType === "tron" ? destinationChainType : void 0,
|
|
35475
35478
|
balanceChainId: destinationChainId,
|
|
35476
35479
|
balanceTokenAddress: destinationTokenAddress,
|
|
35477
35480
|
projectName: projectConfig?.project_name,
|
|
@@ -35566,7 +35569,7 @@ function DepositModal({
|
|
|
35566
35569
|
badge: cardView === "quotes" ? { count: quotesCount } : void 0,
|
|
35567
35570
|
showBalance: showBalanceHeader,
|
|
35568
35571
|
balanceAddress: recipientAddress,
|
|
35569
|
-
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" ? destinationChainType : void 0,
|
|
35572
|
+
balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" || destinationChainType === "tron" ? destinationChainType : void 0,
|
|
35570
35573
|
balanceChainId: destinationChainId,
|
|
35571
35574
|
balanceTokenAddress: destinationTokenAddress,
|
|
35572
35575
|
projectName: projectConfig?.project_name,
|
|
@@ -36625,9 +36628,10 @@ function useSupportedDestinationTokens(publishableKey, enabled = true) {
|
|
|
36625
36628
|
enabled
|
|
36626
36629
|
});
|
|
36627
36630
|
}
|
|
36628
|
-
var
|
|
36631
|
+
var STORAGE_KEY_BASE2 = "unifold_last_withdraw_to_token";
|
|
36629
36632
|
function useDefaultDestinationToken({
|
|
36630
36633
|
destinationTokens,
|
|
36634
|
+
externalUserId,
|
|
36631
36635
|
defaultDestinationChainType,
|
|
36632
36636
|
defaultDestinationChainId,
|
|
36633
36637
|
defaultDestinationTokenAddress,
|
|
@@ -36639,7 +36643,7 @@ function useDefaultDestinationToken({
|
|
|
36639
36643
|
defaultChainId: defaultDestinationChainId,
|
|
36640
36644
|
defaultTokenAddress: defaultDestinationTokenAddress,
|
|
36641
36645
|
defaultSymbol: defaultDestinationSymbol,
|
|
36642
|
-
storageKey:
|
|
36646
|
+
storageKey: `${STORAGE_KEY_BASE2}:${encodeURIComponent(externalUserId)}`
|
|
36643
36647
|
});
|
|
36644
36648
|
}
|
|
36645
36649
|
function useSourceTokenValidation(params) {
|
|
@@ -38284,6 +38288,7 @@ function WithdrawModal({
|
|
|
38284
38288
|
initialSelectionDone
|
|
38285
38289
|
} = useDefaultDestinationToken({
|
|
38286
38290
|
destinationTokens,
|
|
38291
|
+
externalUserId,
|
|
38287
38292
|
defaultDestinationChainType,
|
|
38288
38293
|
defaultDestinationChainId,
|
|
38289
38294
|
defaultDestinationTokenAddress,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unifold/connect-react",
|
|
3
|
-
"version": "0.1.71
|
|
3
|
+
"version": "0.1.71",
|
|
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",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@tanstack/react-query": "^5.90.11",
|
|
40
|
-
"@unifold/core": "0.1.71
|
|
41
|
-
"@unifold/react
|
|
42
|
-
"@unifold/
|
|
43
|
-
"@unifold/ui-react": "0.1.71
|
|
40
|
+
"@unifold/core": "0.1.71",
|
|
41
|
+
"@unifold/headless-react": "0.1.71",
|
|
42
|
+
"@unifold/react-provider": "0.1.71",
|
|
43
|
+
"@unifold/ui-react": "0.1.71"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/react": "^19.0.0",
|