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 walletconnect issues #151

Merged
merged 4 commits into from
Dec 25, 2024
Merged

Fix walletconnect issues #151

merged 4 commits into from
Dec 25, 2024

Conversation

Lbqds
Copy link
Member

@Lbqds Lbqds commented Dec 25, 2024

No description provided.

@@ -23,7 +23,7 @@
"@solana/web3.js": "^1.35.1",
"@terra-money/wallet-provider": "^3.8.0",
"@alephium/walletconnect-qrcode-modal": "0.1.0",
"@alephium/walletconnect-ethereum-provider": "0.1.1",
"@walletconnect/ethereum-provider": "2.17.2",
Copy link
Member Author

Choose a reason for hiding this comment

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

In the latest WalletConnect, we will separate the WalletConnect storage for Alephium and Ethereum. So we no longer need to maintain a custom Ethereum provider.

@@ -219,8 +221,9 @@ export const EthereumProviderProvider = ({
EthereumProvider.init({
projectId: WALLET_CONNECT_PROJECT_ID,
showQrModal: false,
chains: [getEvmChainId(wormholeChainId) as number],
rpcMap: EVM_RPC_MAP
chains: [getEvmChainId(CHAIN_ID_ETH) as number, getEvmChainId(CHAIN_ID_BSC) as number],
Copy link
Member Author

Choose a reason for hiding this comment

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

In the latest WalletConnect, switching chains does not require user approval but instead requires specifying all chain ids when initializing.

Copy link
Member

@polarker polarker left a comment

Choose a reason for hiding this comment

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

LGTM 👍

import { CLUSTER, ALEPHIUM_BRIDGE_GROUP_INDEX } from "./utils/consts";

const connectors = {
walletConnect: createWalletConnectConnector({customStoragePrefix: 'alephium'}),
desktopWallet: createDesktopWalletConnector({customStoragePrefix: 'alephium'})
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should enable this by default in our walletconnect provider? There could be Other projects need to use multiple connectors.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good, will update

@Lbqds Lbqds merged commit ede8552 into fix-dependencies Dec 25, 2024
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants