@getpara/react-sdk 2.0.0-alpha.5 → 2.0.0-alpha.7
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.
|
@@ -31,8 +31,8 @@ const Account = ({ onClose }) => {
|
|
|
31
31
|
const { data: balance, isLoading: isBalanceLoading } = useWalletBalance();
|
|
32
32
|
const [isDisconnecting, setIsDisconnecting] = useState(false);
|
|
33
33
|
const isGuestMode = (account == null ? void 0 : account.isConnected) && account.isGuestMode;
|
|
34
|
+
const cantBuyAndWithdraw = para.externalWalletConnectionType === "CONNECTION_ONLY" && !para.userId;
|
|
34
35
|
const isOnRampLoaded = !!onRampConfig;
|
|
35
|
-
const canBuyAndWithdraw = !!para.userId;
|
|
36
36
|
const handleBuyClick = () => {
|
|
37
37
|
if (isGuestMode) {
|
|
38
38
|
setGuestAddFundsTab(EnabledFlow.BUY);
|
|
@@ -86,9 +86,9 @@ const Account = ({ onClose }) => {
|
|
|
86
86
|
)
|
|
87
87
|
] }),
|
|
88
88
|
/* @__PURE__ */ jsx(ButtonContainer, { children: isOnRampLoaded ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
89
|
-
|
|
89
|
+
onRampConfig.isBuyEnabled && !cantBuyAndWithdraw && /* @__PURE__ */ jsx(OptionButton, { icon: "creditCard", onClick: handleBuyClick, children: /* @__PURE__ */ jsx(CpslText, { variant: "bodyXS", color: "secondary", weight: "medium", children: "Buy Crypto" }) }),
|
|
90
90
|
onRampConfig.isReceiveEnabled && /* @__PURE__ */ jsx(OptionButton, { icon: "qrCode02", onClick: handleReceiveClick, children: /* @__PURE__ */ jsx(CpslText, { variant: "bodyXS", color: "secondary", weight: "medium", children: "Receive" }) }),
|
|
91
|
-
|
|
91
|
+
onRampConfig.isWithdrawEnabled && !cantBuyAndWithdraw && /* @__PURE__ */ jsx(OptionButton, { icon: "arrowCircleBrokenDownLeft", onClick: handleSellClick, children: /* @__PURE__ */ jsx(CpslText, { variant: "bodyXS", color: "secondary", weight: "medium", children: "Withdraw" }) })
|
|
92
92
|
] }) : /* @__PURE__ */ jsx(CpslSpinner, {}) }),
|
|
93
93
|
!isGuestMode && /* @__PURE__ */ jsx(DisconnectButton, { variant: "destructive", fullWidth: true, onClick: handleDisconnectClick, disabled: isDisconnecting, children: isDisconnecting ? /* @__PURE__ */ jsx(CpslSpinner, { size: 16 }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
94
94
|
hideWallets ? "Logout" : "Disconnect Wallet",
|
|
@@ -105,7 +105,7 @@ export type ExternalWalletConfig<chains extends readonly [Chain, ...Chain[]], tr
|
|
|
105
105
|
*
|
|
106
106
|
* NOTE: Any wallets that are detected as installed will be sorted first, followed by those that are not detected or not installed.
|
|
107
107
|
*/
|
|
108
|
-
wallets
|
|
108
|
+
wallets?: TExternalWallet[];
|
|
109
109
|
/**
|
|
110
110
|
* Which external wallets will include full verification and Para auth.
|
|
111
111
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/react-sdk",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"*.css"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@getpara/react-common": "2.0.0-alpha.
|
|
19
|
-
"@getpara/react-components": "2.0.0-alpha.
|
|
20
|
-
"@getpara/web-sdk": "2.0.0-alpha.
|
|
18
|
+
"@getpara/react-common": "2.0.0-alpha.7",
|
|
19
|
+
"@getpara/react-components": "2.0.0-alpha.7",
|
|
20
|
+
"@getpara/web-sdk": "2.0.0-alpha.7",
|
|
21
21
|
"date-fns": "^3.6.0",
|
|
22
22
|
"framer-motion": "11.3.28",
|
|
23
23
|
"libphonenumber-js": "^1.11.1",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"cli": "node ./dist/cli/cli.mjs"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@getpara/cosmos-wallet-connectors": "2.0.0-alpha.
|
|
37
|
-
"@getpara/evm-wallet-connectors": "2.0.0-alpha.
|
|
38
|
-
"@getpara/solana-wallet-connectors": "2.0.0-alpha.
|
|
36
|
+
"@getpara/cosmos-wallet-connectors": "2.0.0-alpha.7",
|
|
37
|
+
"@getpara/evm-wallet-connectors": "2.0.0-alpha.7",
|
|
38
|
+
"@getpara/solana-wallet-connectors": "2.0.0-alpha.7",
|
|
39
39
|
"@testing-library/dom": "^10.4.0",
|
|
40
40
|
"@testing-library/react": "^16.3.0",
|
|
41
41
|
"@testing-library/react-hooks": "^8.0.1",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"wagmi": "^2.14.16"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@getpara/cosmos-wallet-connectors": "^2.0.0-alpha.
|
|
52
|
-
"@getpara/evm-wallet-connectors": "^2.0.0-alpha.
|
|
53
|
-
"@getpara/solana-wallet-connectors": "^2.0.0-alpha.
|
|
51
|
+
"@getpara/cosmos-wallet-connectors": "^2.0.0-alpha.5",
|
|
52
|
+
"@getpara/evm-wallet-connectors": "^2.0.0-alpha.5",
|
|
53
|
+
"@getpara/solana-wallet-connectors": "^2.0.0-alpha.5",
|
|
54
54
|
"@tanstack/react-query": ">=5.0.0",
|
|
55
55
|
"react": "*",
|
|
56
56
|
"react-dom": "*"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"resolutions": {
|
|
64
64
|
"styled-components": "^6"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "0a6b297b70c7f9b7b93381944e3f5314252ad6a5"
|
|
67
67
|
}
|