Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jfschwarz committed Jul 25, 2024
1 parent fa3deea commit 2114e7e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions extension/src/routes/RoutesDrawer/ConnectButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import { shortenAddress } from '../../../components/Address'
import { CHAIN_NAME } from '../../../chains'
import { useMetaMask, useWalletConnect } from '../../../providers'
import PUBLIC_PATH from '../../../publicPath'
import { ProviderType, Route } from '../../../types'
import { ProviderType } from '../../../types'
import { validateAddress } from '../../../utils'
import { useRoute, useRoutes } from '../../routeHooks'

import metamaskLogoUrl from './metamask-logo.svg'
import classes from './style.module.css'
import walletConnectLogoUrl from './wallet-connect-logo.png'
import { ChainId, formatPrefixedAddress, parsePrefixedAddress } from 'ser-kit'
import { ChainId, parsePrefixedAddress } from 'ser-kit'
import {
asLegacyConnection,
fromLegacyConnection,
Expand Down
2 changes: 0 additions & 2 deletions extension/src/routes/RoutesDrawer/Edit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ type ConnectionPatch = {
multisendCallOnly?: string
}

const ETH_ZERO_ADDRESS = 'eth:0x0000000000000000000000000000000000000000'

const EditConnection: React.FC<Props> = ({ connectionId, onLaunched }) => {
const [routes, setRoutes] = useRoutes()
const { route } = useRoute(connectionId)
Expand Down
1 change: 0 additions & 1 deletion extension/src/routes/legacyConnectionMigrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
queryRolesV2MultiSend,
} from '../integrations/zodiac/rolesMultisend'
import { Route, LegacyConnection, ProviderType } from '../types'
import { validateAddress } from '../utils'
import { ZeroAddress } from 'ethers'

type LegacyConnectionStateMigration = (
Expand Down
10 changes: 8 additions & 2 deletions extension/src/routes/routeHooks.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode, useCallback, useEffect, useState } from 'react'
import React, { ReactNode, useCallback, useEffect } from 'react'
import { createContext, useContext, useMemo } from 'react'

import { useMetaMask, useWalletConnect } from '../providers'
Expand Down Expand Up @@ -85,7 +85,13 @@ export const ProvideRoutes: React.FC<{ children: ReactNode }> = ({
}
)
}
}, [routesRevision, legacyConnections, setRoutes, setSelectedRouteId])
}, [
routesRevision,
legacyConnections,
setRoutes,
setRoutesRevision,
setSelectedRouteId,
])

const packedRoutesContext: RouteContextT = useMemo(
() => [routes, setRoutes],
Expand Down
7 changes: 1 addition & 6 deletions extension/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
ChainId,
PrefixedAddress,
Route as CompleteRoute,
StartingPoint,
} from 'ser-kit'
import { ChainId, PrefixedAddress, Route as CompleteRoute } from 'ser-kit'
import { SupportedModuleType } from './integrations/zodiac/types'

export enum ProviderType {
Expand Down

0 comments on commit 2114e7e

Please sign in to comment.