Skip to content

Commit

Permalink
chore: bump walletconnect, remove requiredChains as stated in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
L03TJ3 committed Dec 7, 2023
1 parent 75598f6 commit e9d6901
Show file tree
Hide file tree
Showing 3 changed files with 851 additions and 153 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@
},
"dependencies": {
"@babel/runtime": "^7.18.9",
"@gooddollar/good-design": "^0.1.26",
"@gooddollar/good-design": "^0.1.27",
"@gooddollar/goodprotocol": "^2.0.22",
"@gooddollar/web3sdk": "^0.1.26",
"@gooddollar/web3sdk-v2": "^0.2.8",
"@gooddollar/web3sdk-v2": "^0.2.9",
"@headlessui/react": "1.5.0",
"@kimafinance/kima-transaction-widget": "^1.1.42-beta.1",
"@lingui/format-json": "^4.0.0",
Expand All @@ -224,7 +224,7 @@
"@web3-onboard/core": "^2.20.5",
"@web3-onboard/injected-wallets": "^2.10.1",
"@web3-onboard/react": "^2.8.10",
"@web3-onboard/walletconnect": "^2.4.7",
"@web3-onboard/walletconnect": "^2.5.1",
"@web3-onboard/walletlink": "^2.1.7",
"amplitude-js": "^8.21.2",
"dotenv": "^16.3.1",
Expand Down
4 changes: 1 addition & 3 deletions src/components/BlockNativeOnboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import useSendAnalyticsData from '../../hooks/useSendAnalyticsData'

import { connectOptions, torus } from 'connectors'
import { getNetworkEnv } from 'utils/env'
import { useSelectedChain } from 'state/application/hooks'

/**
* Just a button to trigger the onboard connect modal.
Expand Down Expand Up @@ -79,13 +78,12 @@ export const OnboardConnectButton: FC = () => {

// wrapper so we can pass the selected chain
export const OnboardProviderWrapper = ({ children }) => {
const { selectedChain } = useSelectedChain()
const network = getNetworkEnv()
return (
<OnboardProvider
options={connectOptions}
wallets={{ custom: [torus] }}
wc2Options={{ requiredChains: [selectedChain] }}
// wc2Options={{ requiredChains: [selectedChain] }} // advised not to use this option. ref: https://docs.walletconnect.com/advanced/migration-from-v1.x/namespaces#technical-implementation-guide-for-apps
gdEnv={network}
>
{children}
Expand Down
Loading

0 comments on commit e9d6901

Please sign in to comment.