add wallet reconnect logic to market page
This commit is contained in:
parent
780ef281eb
commit
e25d62eaa5
|
@ -32,6 +32,14 @@ const PerpMarket = () => {
|
|||
const marketConfig = useMangoStore((s) => s.selectedMarket.config)
|
||||
const router = useRouter()
|
||||
|
||||
useEffect(() => {
|
||||
// @ts-ignore
|
||||
if (window.solana) {
|
||||
// @ts-ignore
|
||||
window.solana.connect({ onlyIfTrusted: true })
|
||||
}
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
const name = decodeURIComponent(router.asPath).split('name=')[1]
|
||||
|
||||
|
|
Loading…
Reference in New Issue