@getpara/react-sdk-lite 2.1.0 → 2.2.0

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.
@@ -95,7 +95,15 @@ const Account = () => {
95
95
  ] }),
96
96
  /* @__PURE__ */ jsx(ButtonContainer, { children: isOnRampLoaded ? /* @__PURE__ */ jsxs(Fragment, { children: [
97
97
  (onRampConfig.isBuyEnabled || onRampConfig.isReceiveEnabled) && !cantBuyAndWithdraw && /* @__PURE__ */ jsx(OptionButton, { icon: "plusCircle", onClick: handleBuyClick, children: /* @__PURE__ */ jsx(CpslText, { variant: "bodyXS", color: "secondary", weight: "medium", children: "Add Funds" }) }),
98
- /* @__PURE__ */ jsx(OptionButton, { icon: "send", onClick: handleSendClick, disabled: !profileBalance, children: /* @__PURE__ */ jsx(CpslText, { variant: "bodyXS", color: "secondary", weight: "medium", children: "Send" }) }),
98
+ /* @__PURE__ */ jsx(
99
+ OptionButton,
100
+ {
101
+ icon: "send",
102
+ onClick: handleSendClick,
103
+ disabled: !profileBalance || embedded.authType === "externalWallet",
104
+ children: /* @__PURE__ */ jsx(CpslText, { variant: "bodyXS", color: "secondary", weight: "medium", children: "Send" })
105
+ }
106
+ ),
99
107
  onRampConfig.isWithdrawEnabled && !cantBuyAndWithdraw && /* @__PURE__ */ jsx(OptionButton, { icon: "arrowCircleDown", onClick: handleSellClick, children: /* @__PURE__ */ jsx(CpslText, { variant: "bodyXS", color: "secondary", weight: "medium", children: "Withdraw" }) }),
100
108
  /* @__PURE__ */ jsx(OptionButton, { icon: "user01", onClick: handleProfileClick, children: /* @__PURE__ */ jsx(CpslText, { variant: "bodyXS", color: "secondary", weight: "medium", children: isEnabled ? "Profile" : "Settings" }) })
101
109
  ] }) : /* @__PURE__ */ jsx(CpslSpinner, {}) })
@@ -22,7 +22,6 @@ import { useAccountLinking } from "../../../provider/providers/AccountLinkProvid
22
22
  import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
23
23
  const AccountProfileEntry = ({
24
24
  icon,
25
- key,
26
25
  text,
27
26
  textSecondary,
28
27
  textTertiary,
@@ -57,7 +56,7 @@ const AccountProfileEntry = ({
57
56
  textTertiary && /* @__PURE__ */ jsx(CpslText, { variant: "bodyM", color: "contrast", children: textTertiary }),
58
57
  accessory,
59
58
  onSelect && /* @__PURE__ */ jsx(CpslIcon, { color: "var(--cpsl-color-foreground-32)", icon: "chevronRight", size: "16px" })
60
- ] }, key);
59
+ ] });
61
60
  };
62
61
  const WalletEntry = ({
63
62
  wallet,
@@ -26,12 +26,15 @@ const getDefaultSendMetadata = (balances, wallet) => {
26
26
  return { asset: null, network: null };
27
27
  }
28
28
  const walletBalance = balances.wallets.find(({ address }) => address === (wallet == null ? void 0 : wallet.address));
29
- if (!walletBalance) {
29
+ if (!walletBalance || walletBalance.assets.length === 0) {
30
30
  return { asset: null, network: null };
31
31
  }
32
- const defaultAsset = walletBalance.assets.find(
32
+ let defaultAsset = walletBalance.assets.find(
33
33
  ({ metadata }) => (metadata == null ? void 0 : metadata.symbol) === ((wallet == null ? void 0 : wallet.type) === "EVM" ? "ETH" : "SOL")
34
34
  );
35
+ if (!defaultAsset) {
36
+ defaultAsset = walletBalance.assets[0];
37
+ }
35
38
  if (!defaultAsset) {
36
39
  return { asset: null, network: null };
37
40
  }
@@ -38,7 +38,7 @@ const Header = () => {
38
38
  return /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", initial: false, custom: stepDirection, children: /* @__PURE__ */ jsx(
39
39
  Container,
40
40
  {
41
- isVisible: !isControls,
41
+ $isVisible: !isControls,
42
42
  custom: stepDirection,
43
43
  variants: BODY_MOTION_VARIANTS,
44
44
  initial: "enter",
@@ -61,7 +61,7 @@ const Container = safeStyled(motion.div)`
61
61
  gap: 8px;
62
62
  flex-wrap: wrap;
63
63
  height: 24px;
64
- visibility: ${({ isVisible }) => isVisible ? "visible" : "hidden"};
64
+ visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
65
65
  `;
66
66
  const AuthDisplay = safeStyled.div`
67
67
  display: flex;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@getpara/react-sdk-lite",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "bin": {
5
5
  "setup-para": "dist/cli/cli.mjs"
6
6
  },
7
7
  "dependencies": {
8
- "@getpara/react-common": "2.1.0",
9
- "@getpara/react-components": "2.1.0",
10
- "@getpara/web-sdk": "2.1.0",
8
+ "@getpara/react-common": "2.2.0",
9
+ "@getpara/react-components": "2.2.0",
10
+ "@getpara/web-sdk": "2.2.0",
11
11
  "date-fns": "^3.6.0",
12
12
  "framer-motion": "^11.3.31",
13
13
  "libphonenumber-js": "^1.11.7",
@@ -16,9 +16,9 @@
16
16
  "zustand-sync-tabs": "^0.2.2"
17
17
  },
18
18
  "devDependencies": {
19
- "@getpara/cosmos-wallet-connectors": "2.1.0",
20
- "@getpara/evm-wallet-connectors": "2.1.0",
21
- "@getpara/solana-wallet-connectors": "2.1.0",
19
+ "@getpara/cosmos-wallet-connectors": "2.2.0",
20
+ "@getpara/evm-wallet-connectors": "2.2.0",
21
+ "@getpara/solana-wallet-connectors": "2.2.0",
22
22
  "@tanstack/react-query": "^5.74.0",
23
23
  "@testing-library/dom": "^10.4.0",
24
24
  "@testing-library/react": "^16.3.0",
@@ -38,7 +38,7 @@
38
38
  "package.json",
39
39
  "styles.css"
40
40
  ],
41
- "gitHead": "3ae7f836324a3a2a8a57156e16304aeaf0d37b42",
41
+ "gitHead": "51765cf39b1667e0283b3906a8f8ef91e447e347",
42
42
  "main": "dist/index.js",
43
43
  "peerDependencies": {
44
44
  "@tanstack/react-query": ">=5.0.0",