remove phantom workaround for wallet connection issues in next.js

This commit is contained in:
Tyler Shipe 2021-12-31 11:51:50 -05:00
parent e72447ef28
commit 63adaad55d
3 changed files with 0 additions and 24 deletions

View File

@ -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 {

View File

@ -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

View File

@ -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()