From 2678efeeb52cc43093cb9774eb1fc44198ad251f Mon Sep 17 00:00:00 2001 From: Scott Date: Thu, 9 Feb 2023 06:22:18 +0800 Subject: [PATCH] Fix Loadable wallet connection for mui-design (#86) * fix: mui design connect Loadable wallet * chore: add changeset --- .changeset/eight-radios-worry.md | 5 +++++ apps/nextjs-example/next.config.js | 4 ++++ packages/wallet-adapter-mui-design/src/WalletModel.tsx | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/eight-radios-worry.md diff --git a/.changeset/eight-radios-worry.md b/.changeset/eight-radios-worry.md new file mode 100644 index 00000000..763d91cc --- /dev/null +++ b/.changeset/eight-radios-worry.md @@ -0,0 +1,5 @@ +--- +"@aptos-labs/wallet-adapter-mui-design": patch +--- + +Fix Loadable wallet connection for mui design diff --git a/apps/nextjs-example/next.config.js b/apps/nextjs-example/next.config.js index 27a2eb58..85ac1c11 100644 --- a/apps/nextjs-example/next.config.js +++ b/apps/nextjs-example/next.config.js @@ -8,4 +8,8 @@ module.exports = { experimental: { transpilePackages: ["wallet-adapter-react", "wallet-adapter-plugin"], }, + webpack: (config) => { + config.resolve.fallback = { "@solana/web3.js": false }; + return config; + }, }; diff --git a/packages/wallet-adapter-mui-design/src/WalletModel.tsx b/packages/wallet-adapter-mui-design/src/WalletModel.tsx index 2da021f2..b8dbfbc9 100644 --- a/packages/wallet-adapter-mui-design/src/WalletModel.tsx +++ b/packages/wallet-adapter-mui-design/src/WalletModel.tsx @@ -44,7 +44,7 @@ export default function WalletsModal({ const icon = option.icon; return ( - {wallet.readyState === "Installed" ? ( + {wallet.readyState === "Installed" || wallet.readyState === "Loadable" ? (