Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix broken wallet adapter in proposals app #2494

Merged
merged 1 commit into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions governance/xc_admin/packages/xc_admin_frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"@radix-ui/react-label": "^2.0.0",
"@radix-ui/react-tooltip": "^1.0.3",
"@solana/spl-token": "^0.3.7",
"@solana/wallet-adapter-base": "^0.9.20",
"@solana/wallet-adapter-react": "^0.15.28",
"@solana/wallet-adapter-react-ui": "^0.9.27",
"@solana/wallet-adapter-wallets": "0.19.10",
"@solana/wallet-adapter-base": "catalog:",
"@solana/wallet-adapter-react": "catalog:",
"@solana/wallet-adapter-react-ui": "catalog:",
"@solana/wallet-adapter-wallets": "catalog:",
"@solana/web3.js": "^1.73.0",
"@sqds/mesh": "^1.0.6",
"@tanstack/react-table": "^8.7.6",
Expand Down
6 changes: 0 additions & 6 deletions governance/xc_admin/packages/xc_admin_frontend/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ import {
import { WalletModalProvider } from '@solana/wallet-adapter-react-ui'
import '@solana/wallet-adapter-react-ui/styles.css'
import {
GlowWalletAdapter,
LedgerWalletAdapter,
PhantomWalletAdapter,
SolflareWalletAdapter,
SolletExtensionWalletAdapter,
SolletWalletAdapter,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi @guibescos these wallet adapters have been deprecated and no longer exist in the current version of the solana wallet adapter library.

TorusWalletAdapter,
WalletConnectWalletAdapter,
WalletConnectWalletAdapterConfig,
Expand Down Expand Up @@ -55,12 +52,9 @@ function MyApp({ Component, pageProps }: AppProps) {
const wallets = useMemo(
() => [
new PhantomWalletAdapter(),
new GlowWalletAdapter(),
new SolflareWalletAdapter(),
new TorusWalletAdapter(),
new LedgerWalletAdapter(),
new SolletWalletAdapter(),
new SolletExtensionWalletAdapter(),
new WalletConnectWalletAdapter(walletConnectConfig),
],
[]
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"pnpm": {
"overrides": {
"@solana/[email protected]>rpc-websockets": "7.11.0"
},
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this patch in #2489 and the proposals app works in prod without it, but I didn't test local dev mode, and there without this patch we get a syntax error in eccrypto, so I need to resurrect it.

}
}
}
12 changes: 12 additions & 0 deletions patches/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/index.js b/index.js
index a63218b73bb5cb1d566962fac9360689341fcae0..5f05762ce04ab0934973b02f04777a3bfa75d88f 100644
--- a/index.js
+++ b/index.js
@@ -21,6 +21,6 @@ try {
throw e;
} else {
console.info('secp256k1 unavailable, reverting to browser version');
- return (module.exports = require("./browser"));
+ module.exports = require("./browser");
}
}
Loading