-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
@@ -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", |
There was a problem hiding this comment.
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], |
There was a problem hiding this comment.
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.
There was a problem hiding this 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'}) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, will update
No description provided.