Skip to content

Commit

Permalink
fix: disconnect on undefined wallets
Browse files Browse the repository at this point in the history
  • Loading branch information
nick134-bit committed May 15, 2024
1 parent 20fabc3 commit ba595b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion components/Pages/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export type DashboardData = {
}
export const Dashboard: FC = () => {
const [dashboardState, setDashboardDataState] = useRecoilState(dashboardDataState)
useChain('migaloo') // force wallet connect status
const { data: dashboardData, isLoading } = useGetDashboardDataAPI()
const chains = useChainInfos()
const prices = usePrices()
Expand Down
4 changes: 4 additions & 0 deletions components/Wallet/Wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ const Wallet = () => {
setCurrentConnectedChainIds(snapChainIds)
} else if (walletType === WalletType.terraExtension || walletType === WalletType.keplrExtension || walletType === WalletType.galaxyStationExtension) {
const walletWindowConnection = walletType === WalletType.terraExtension ? (window.station?.keplr) : walletType === WalletType.galaxyStationExtension ? (window.galaxyStation?.keplr) : (window?.keplr)
if (!walletWindowConnection) {
localStorage.clear()
return
}
const getAddedStationChainsIds = async () => {
const chainInfos = await walletWindowConnection?.getChainInfosWithoutEndpoints()
if (!chainInfos) {
Expand Down

0 comments on commit ba595b2

Please sign in to comment.