remove phantom workaround for wallet connection issues in next.js
This commit is contained in:
parent
e72447ef28
commit
63adaad55d
|
@ -75,14 +75,6 @@ export default function Account() {
|
|||
setShowNameModal(false)
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
// @ts-ignore
|
||||
if (window.solana) {
|
||||
// @ts-ignore
|
||||
window.solana.connect({ onlyIfTrusted: true })
|
||||
}
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
async function loadUnownedMangoAccount() {
|
||||
try {
|
||||
|
|
|
@ -42,14 +42,6 @@ const PerpMarket = () => {
|
|||
const { width } = useViewport()
|
||||
const hideTips = width ? width < breakpoints.md : false
|
||||
|
||||
useEffect(() => {
|
||||
// @ts-ignore
|
||||
if (window.solana) {
|
||||
// @ts-ignore
|
||||
window.solana.connect({ onlyIfTrusted: true })
|
||||
}
|
||||
}, [marketConfig])
|
||||
|
||||
useEffect(() => {
|
||||
const name = decodeURIComponent(router.asPath).split('name=')[1]
|
||||
const mangoGroup = useMangoStore.getState().selectedMangoGroup.current
|
||||
|
|
|
@ -30,14 +30,6 @@ export default function Swap() {
|
|||
const wallet = useMangoStore(walletSelector)
|
||||
const actions = useMangoStore(actionsSelector)
|
||||
|
||||
useEffect(() => {
|
||||
// @ts-ignore
|
||||
if (window.solana) {
|
||||
// @ts-ignore
|
||||
window.solana.connect({ onlyIfTrusted: true })
|
||||
}
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
if (connected) {
|
||||
actions.fetchWalletTokens()
|
||||
|
|
Loading…
Reference in New Issue