@unifold/ui-web 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 CHANGED
@@ -54194,7 +54194,7 @@ function DepositHeader({
54194
54194
  setShowBalanceSkeleton(false);
54195
54195
  return;
54196
54196
  }
54197
- const supportedChainTypes = ["ethereum", "solana", "bitcoin", "n1"];
54197
+ const supportedChainTypes = ["ethereum", "solana", "bitcoin", "n1", "tron"];
54198
54198
  if (!supportedChainTypes.includes(balanceChainType)) {
54199
54199
  setBalance(null);
54200
54200
  setIsLoadingBalance(false);
@@ -68885,7 +68885,7 @@ function CoinbaseConnect({
68885
68885
  onClose,
68886
68886
  showBalance: true,
68887
68887
  balanceAddress: recipientAddress,
68888
- balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" ? destinationChainType : void 0,
68888
+ balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "tron" ? destinationChainType : void 0,
68889
68889
  balanceChainId: destinationChainId,
68890
68890
  balanceTokenAddress: destinationTokenAddress,
68891
68891
  projectName: projectConfig?.project_name,
@@ -70833,9 +70833,10 @@ function useDefaultToken({
70833
70833
  }, [token, tokens, chain]);
70834
70834
  return { token, chain, setToken, setChain, initialSelectionDone };
70835
70835
  }
70836
- var STORAGE_KEY2 = "unifold_last_deposit_from_token";
70836
+ var STORAGE_KEY_BASE = "unifold_last_deposit_from_token";
70837
70837
  function useDefaultSourceToken({
70838
70838
  supportedTokens,
70839
+ externalUserId,
70839
70840
  defaultSourceChainType,
70840
70841
  defaultSourceChainId,
70841
70842
  defaultSourceTokenAddress,
@@ -70847,7 +70848,7 @@ function useDefaultSourceToken({
70847
70848
  defaultChainId: defaultSourceChainId,
70848
70849
  defaultTokenAddress: defaultSourceTokenAddress,
70849
70850
  defaultSymbol: defaultSourceSymbol,
70850
- storageKey: STORAGE_KEY2
70851
+ storageKey: `${STORAGE_KEY_BASE}:${encodeURIComponent(externalUserId)}`
70851
70852
  });
70852
70853
  }
70853
70854
  function DepositFooterLinks({ onGlossaryClick, leftElement }) {
@@ -71283,6 +71284,7 @@ function TransferCryptoSingleInput({
71283
71284
  const supportedTokens = tokensResponse?.data ?? [];
71284
71285
  const { token, chain, setToken, setChain, initialSelectionDone } = useDefaultSourceToken({
71285
71286
  supportedTokens,
71287
+ externalUserId: userId,
71286
71288
  defaultSourceChainType,
71287
71289
  defaultSourceChainId,
71288
71290
  defaultSourceTokenAddress,
@@ -72083,6 +72085,7 @@ function TransferCryptoDoubleInput({
72083
72085
  const supportedTokens = tokensResponse?.data ?? [];
72084
72086
  const { token, chain, setToken, setChain, initialSelectionDone } = useDefaultSourceToken({
72085
72087
  supportedTokens,
72088
+ externalUserId: userId,
72086
72089
  defaultSourceChainType,
72087
72090
  defaultSourceChainId,
72088
72091
  defaultSourceTokenAddress,
@@ -76245,7 +76248,7 @@ function DepositModal({
76245
76248
  incident: activeIncident,
76246
76249
  showBalance: showBalanceHeader,
76247
76250
  balanceAddress: recipientAddress,
76248
- balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" ? destinationChainType : void 0,
76251
+ balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" || destinationChainType === "tron" ? destinationChainType : void 0,
76249
76252
  balanceChainId: destinationChainId,
76250
76253
  balanceTokenAddress: destinationTokenAddress,
76251
76254
  projectName: projectConfig?.project_name,
@@ -76265,7 +76268,7 @@ function DepositModal({
76265
76268
  incident: activeIncident,
76266
76269
  showBalance: showBalanceHeader,
76267
76270
  balanceAddress: recipientAddress,
76268
- balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" ? destinationChainType : void 0,
76271
+ balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" || destinationChainType === "tron" ? destinationChainType : void 0,
76269
76272
  balanceChainId: destinationChainId,
76270
76273
  balanceTokenAddress: destinationTokenAddress,
76271
76274
  projectName: projectConfig?.project_name,
@@ -76360,7 +76363,7 @@ function DepositModal({
76360
76363
  badge: cardView === "quotes" ? { count: quotesCount } : void 0,
76361
76364
  showBalance: showBalanceHeader,
76362
76365
  balanceAddress: recipientAddress,
76363
- balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" ? destinationChainType : void 0,
76366
+ balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" || destinationChainType === "tron" ? destinationChainType : void 0,
76364
76367
  balanceChainId: destinationChainId,
76365
76368
  balanceTokenAddress: destinationTokenAddress,
76366
76369
  projectName: projectConfig?.project_name,
@@ -77419,9 +77422,10 @@ function useSupportedDestinationTokens(publishableKey, enabled = true) {
77419
77422
  enabled
77420
77423
  });
77421
77424
  }
77422
- var STORAGE_KEY3 = "unifold_last_withdraw_to_token";
77425
+ var STORAGE_KEY_BASE2 = "unifold_last_withdraw_to_token";
77423
77426
  function useDefaultDestinationToken({
77424
77427
  destinationTokens,
77428
+ externalUserId,
77425
77429
  defaultDestinationChainType,
77426
77430
  defaultDestinationChainId,
77427
77431
  defaultDestinationTokenAddress,
@@ -77433,7 +77437,7 @@ function useDefaultDestinationToken({
77433
77437
  defaultChainId: defaultDestinationChainId,
77434
77438
  defaultTokenAddress: defaultDestinationTokenAddress,
77435
77439
  defaultSymbol: defaultDestinationSymbol,
77436
- storageKey: STORAGE_KEY3
77440
+ storageKey: `${STORAGE_KEY_BASE2}:${encodeURIComponent(externalUserId)}`
77437
77441
  });
77438
77442
  }
77439
77443
  function useSourceTokenValidation(params) {
@@ -79078,6 +79082,7 @@ function WithdrawModal({
79078
79082
  initialSelectionDone
79079
79083
  } = useDefaultDestinationToken({
79080
79084
  destinationTokens,
79085
+ externalUserId,
79081
79086
  defaultDestinationChainType,
79082
79087
  defaultDestinationChainId,
79083
79088
  defaultDestinationTokenAddress,
package/dist/index.mjs CHANGED
@@ -54181,7 +54181,7 @@ function DepositHeader({
54181
54181
  setShowBalanceSkeleton(false);
54182
54182
  return;
54183
54183
  }
54184
- const supportedChainTypes = ["ethereum", "solana", "bitcoin", "n1"];
54184
+ const supportedChainTypes = ["ethereum", "solana", "bitcoin", "n1", "tron"];
54185
54185
  if (!supportedChainTypes.includes(balanceChainType)) {
54186
54186
  setBalance(null);
54187
54187
  setIsLoadingBalance(false);
@@ -68872,7 +68872,7 @@ function CoinbaseConnect({
68872
68872
  onClose,
68873
68873
  showBalance: true,
68874
68874
  balanceAddress: recipientAddress,
68875
- balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" ? destinationChainType : void 0,
68875
+ balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "tron" ? destinationChainType : void 0,
68876
68876
  balanceChainId: destinationChainId,
68877
68877
  balanceTokenAddress: destinationTokenAddress,
68878
68878
  projectName: projectConfig?.project_name,
@@ -70820,9 +70820,10 @@ function useDefaultToken({
70820
70820
  }, [token, tokens, chain]);
70821
70821
  return { token, chain, setToken, setChain, initialSelectionDone };
70822
70822
  }
70823
- var STORAGE_KEY2 = "unifold_last_deposit_from_token";
70823
+ var STORAGE_KEY_BASE = "unifold_last_deposit_from_token";
70824
70824
  function useDefaultSourceToken({
70825
70825
  supportedTokens,
70826
+ externalUserId,
70826
70827
  defaultSourceChainType,
70827
70828
  defaultSourceChainId,
70828
70829
  defaultSourceTokenAddress,
@@ -70834,7 +70835,7 @@ function useDefaultSourceToken({
70834
70835
  defaultChainId: defaultSourceChainId,
70835
70836
  defaultTokenAddress: defaultSourceTokenAddress,
70836
70837
  defaultSymbol: defaultSourceSymbol,
70837
- storageKey: STORAGE_KEY2
70838
+ storageKey: `${STORAGE_KEY_BASE}:${encodeURIComponent(externalUserId)}`
70838
70839
  });
70839
70840
  }
70840
70841
  function DepositFooterLinks({ onGlossaryClick, leftElement }) {
@@ -71270,6 +71271,7 @@ function TransferCryptoSingleInput({
71270
71271
  const supportedTokens = tokensResponse?.data ?? [];
71271
71272
  const { token, chain, setToken, setChain, initialSelectionDone } = useDefaultSourceToken({
71272
71273
  supportedTokens,
71274
+ externalUserId: userId,
71273
71275
  defaultSourceChainType,
71274
71276
  defaultSourceChainId,
71275
71277
  defaultSourceTokenAddress,
@@ -72070,6 +72072,7 @@ function TransferCryptoDoubleInput({
72070
72072
  const supportedTokens = tokensResponse?.data ?? [];
72071
72073
  const { token, chain, setToken, setChain, initialSelectionDone } = useDefaultSourceToken({
72072
72074
  supportedTokens,
72075
+ externalUserId: userId,
72073
72076
  defaultSourceChainType,
72074
72077
  defaultSourceChainId,
72075
72078
  defaultSourceTokenAddress,
@@ -76232,7 +76235,7 @@ function DepositModal({
76232
76235
  incident: activeIncident,
76233
76236
  showBalance: showBalanceHeader,
76234
76237
  balanceAddress: recipientAddress,
76235
- balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" ? destinationChainType : void 0,
76238
+ balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" || destinationChainType === "tron" ? destinationChainType : void 0,
76236
76239
  balanceChainId: destinationChainId,
76237
76240
  balanceTokenAddress: destinationTokenAddress,
76238
76241
  projectName: projectConfig?.project_name,
@@ -76252,7 +76255,7 @@ function DepositModal({
76252
76255
  incident: activeIncident,
76253
76256
  showBalance: showBalanceHeader,
76254
76257
  balanceAddress: recipientAddress,
76255
- balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" ? destinationChainType : void 0,
76258
+ balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" || destinationChainType === "tron" ? destinationChainType : void 0,
76256
76259
  balanceChainId: destinationChainId,
76257
76260
  balanceTokenAddress: destinationTokenAddress,
76258
76261
  projectName: projectConfig?.project_name,
@@ -76347,7 +76350,7 @@ function DepositModal({
76347
76350
  badge: cardView === "quotes" ? { count: quotesCount } : void 0,
76348
76351
  showBalance: showBalanceHeader,
76349
76352
  balanceAddress: recipientAddress,
76350
- balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" ? destinationChainType : void 0,
76353
+ balanceChainType: destinationChainType === "ethereum" || destinationChainType === "solana" || destinationChainType === "bitcoin" || destinationChainType === "n1" || destinationChainType === "tron" ? destinationChainType : void 0,
76351
76354
  balanceChainId: destinationChainId,
76352
76355
  balanceTokenAddress: destinationTokenAddress,
76353
76356
  projectName: projectConfig?.project_name,
@@ -77406,9 +77409,10 @@ function useSupportedDestinationTokens(publishableKey, enabled = true) {
77406
77409
  enabled
77407
77410
  });
77408
77411
  }
77409
- var STORAGE_KEY3 = "unifold_last_withdraw_to_token";
77412
+ var STORAGE_KEY_BASE2 = "unifold_last_withdraw_to_token";
77410
77413
  function useDefaultDestinationToken({
77411
77414
  destinationTokens,
77415
+ externalUserId,
77412
77416
  defaultDestinationChainType,
77413
77417
  defaultDestinationChainId,
77414
77418
  defaultDestinationTokenAddress,
@@ -77420,7 +77424,7 @@ function useDefaultDestinationToken({
77420
77424
  defaultChainId: defaultDestinationChainId,
77421
77425
  defaultTokenAddress: defaultDestinationTokenAddress,
77422
77426
  defaultSymbol: defaultDestinationSymbol,
77423
- storageKey: STORAGE_KEY3
77427
+ storageKey: `${STORAGE_KEY_BASE2}:${encodeURIComponent(externalUserId)}`
77424
77428
  });
77425
77429
  }
77426
77430
  function useSourceTokenValidation(params) {
@@ -79065,6 +79069,7 @@ function WithdrawModal({
79065
79069
  initialSelectionDone
79066
79070
  } = useDefaultDestinationToken({
79067
79071
  destinationTokens,
79072
+ externalUserId,
79068
79073
  defaultDestinationChainType,
79069
79074
  defaultDestinationChainId,
79070
79075
  defaultDestinationTokenAddress,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unifold/ui-web",
3
- "version": "0.1.71-beta.2",
3
+ "version": "0.1.71",
4
4
  "description": "Unifold UI Web - Framework-agnostic deposit widget",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -44,10 +44,10 @@
44
44
  "prettier": "^3.2.5",
45
45
  "tsup": "^8.0.0",
46
46
  "typescript": "^5.0.0",
47
- "@unifold/connect-react": "0.1.71-beta.2",
48
- "@unifold/core": "0.1.71-beta.2",
49
- "@unifold/react-provider": "0.1.71-beta.2",
50
- "@unifold/ui-react": "0.1.71-beta.2"
47
+ "@unifold/connect-react": "0.1.71",
48
+ "@unifold/core": "0.1.71",
49
+ "@unifold/react-provider": "0.1.71",
50
+ "@unifold/ui-react": "0.1.71"
51
51
  },
52
52
  "keywords": [
53
53
  "unifold",