@aptos-labs/wallet-adapter-mui-design 2.3.6 → 2.4.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @aptos-labs/wallet-adapter-mui-design
2
2
 
3
+ ## 2.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [4832532]
8
+ - @aptos-labs/wallet-adapter-react@2.5.0
9
+
10
+ ## 2.4.0
11
+
12
+ ### Minor Changes
13
+
14
+ - ef53f38: AIP-62 standard compatible wallet registry list
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [ef53f38]
19
+ - @aptos-labs/wallet-adapter-react@2.4.0
20
+
3
21
  ## 2.3.6
4
22
 
5
23
  ### Patch Changes
package/dist/index.js CHANGED
@@ -328,7 +328,6 @@ function WalletsModal({
328
328
  };
329
329
  const renderWalletsList = () => {
330
330
  return wallets == null ? void 0 : wallets.map((wallet) => {
331
- const hasMobileSupport = Boolean(wallet.deeplinkProvider);
332
331
  const isWalletReady = wallet.readyState === import_wallet_adapter_react3.WalletReadyState.Installed || wallet.readyState === import_wallet_adapter_react3.WalletReadyState.Loadable;
333
332
  const Container = ({ children }) => {
334
333
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material3.Grid, {
@@ -339,6 +338,7 @@ function WalletsModal({
339
338
  });
340
339
  };
341
340
  if (!isWalletReady && (0, import_wallet_adapter_react3.isRedirectable)()) {
341
+ const hasMobileSupport = Boolean(wallet.deeplinkProvider);
342
342
  if (hasMobileSupport) {
343
343
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Container, {
344
344
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConnectWalletRow, {
package/dist/index.mjs CHANGED
@@ -326,7 +326,6 @@ function WalletsModal({
326
326
  };
327
327
  const renderWalletsList = () => {
328
328
  return wallets == null ? void 0 : wallets.map((wallet) => {
329
- const hasMobileSupport = Boolean(wallet.deeplinkProvider);
330
329
  const isWalletReady = wallet.readyState === WalletReadyState.Installed || wallet.readyState === WalletReadyState.Loadable;
331
330
  const Container = ({ children }) => {
332
331
  return /* @__PURE__ */ jsx3(Grid, {
@@ -337,6 +336,7 @@ function WalletsModal({
337
336
  });
338
337
  };
339
338
  if (!isWalletReady && isRedirectable()) {
339
+ const hasMobileSupport = Boolean(wallet.deeplinkProvider);
340
340
  if (hasMobileSupport) {
341
341
  return /* @__PURE__ */ jsx3(Container, {
342
342
  children: /* @__PURE__ */ jsx3(ConnectWalletRow, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptos-labs/wallet-adapter-mui-design",
3
- "version": "2.3.6",
3
+ "version": "2.4.1",
4
4
  "description": "Aptos Wallet Adapter mui design",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -41,7 +41,7 @@
41
41
  "@emotion/styled": "^11.10.5",
42
42
  "@mui/icons-material": "^5.11.0",
43
43
  "@mui/material": "^5.11.6",
44
- "@aptos-labs/wallet-adapter-react": "2.3.7"
44
+ "@aptos-labs/wallet-adapter-react": "2.5.0"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": "^18",
@@ -18,6 +18,7 @@ import {
18
18
  Wallet,
19
19
  WalletReadyState,
20
20
  WalletName,
21
+ AptosStandardSupportedWallet,
21
22
  } from "@aptos-labs/wallet-adapter-react";
22
23
  import { grey } from "./aptosColorPalette";
23
24
  // reported bug with loading mui icons with esm, therefore need to import like this https://github.com/mui/material-ui/issues/35233
@@ -26,7 +27,7 @@ import { Close as CloseIcon } from "@mui/icons-material";
26
27
  import { PropsWithChildren } from "react";
27
28
 
28
29
  const ConnectWalletRow: React.FC<{
29
- wallet: Wallet;
30
+ wallet: Wallet | AptosStandardSupportedWallet;
30
31
  onClick(): void;
31
32
  }> = ({ wallet, onClick }) => {
32
33
  const theme = useTheme();
@@ -78,7 +79,9 @@ const ConnectWalletRow: React.FC<{
78
79
  );
79
80
  };
80
81
 
81
- const InstallWalletRow: React.FC<{ wallet: Wallet }> = ({ wallet }) => {
82
+ const InstallWalletRow: React.FC<{
83
+ wallet: Wallet | AptosStandardSupportedWallet;
84
+ }> = ({ wallet }) => {
82
85
  const theme = useTheme();
83
86
 
84
87
  return (
@@ -151,7 +154,6 @@ export default function WalletsModal({
151
154
 
152
155
  const renderWalletsList = () => {
153
156
  return wallets?.map((wallet) => {
154
- const hasMobileSupport = Boolean(wallet.deeplinkProvider);
155
157
  const isWalletReady =
156
158
  wallet.readyState === WalletReadyState.Installed ||
157
159
  wallet.readyState === WalletReadyState.Loadable;
@@ -166,6 +168,7 @@ export default function WalletsModal({
166
168
 
167
169
  // The user is on a mobile device
168
170
  if (!isWalletReady && isRedirectable()) {
171
+ const hasMobileSupport = Boolean((wallet as Wallet).deeplinkProvider);
169
172
  // If the user has a deep linked app, show the wallet
170
173
  if (hasMobileSupport) {
171
174
  return (