Skip to content

Commit a5d7938

Browse files
committed
Rename getSymbolicChainName to getChainKey
1 parent 6ebebfe commit a5d7938

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/components/ChainSelector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import UnstyledNetworkIcon from '~/shared/components/NetworkIcon'
99
import SvgIcon from '~/shared/components/SvgIcon'
1010
import { COLORS, LAPTOP } from '~/shared/utils/styled'
1111
import { StreamDraft } from '~/stores/streamDraft'
12-
import { getSymbolicChainName, useCurrentChain } from '~/utils/chains'
12+
import { getChainKey, useCurrentChain } from '~/utils/chains'
1313

1414
type MenuItemProps = {
1515
chain: Chain
@@ -45,7 +45,7 @@ const Menu = ({ chains, selectedChain, toggle }: MenuProps) => {
4545
onClick={() => {
4646
toggle(false)
4747

48-
const chainName = getSymbolicChainName(c.id)
48+
const chainName = getChainKey(c.id)
4949

5050
setSearchParams((prev) => {
5151
const { chain: _, ...rest } = Object.fromEntries(prev)

src/utils/chains.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function useCurrentChainId() {
4848
}
4949

5050
export function useCurrentChainKey() {
51-
return getSymbolicChainName(useCurrentChainId())
51+
return getChainKey(useCurrentChainId())
5252
}
5353

5454
/**
@@ -146,7 +146,7 @@ export function getChainConfig(chainIdOrSymbolicName: string | number): Chain {
146146
return getChainEntry(chainIdOrSymbolicName).config
147147
}
148148

149-
export function getSymbolicChainName(chainId: number) {
149+
export function getChainKey(chainId: number) {
150150
return getChainEntry(chainId).symbolicName
151151
}
152152

src/utils/routes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import queryString from 'query-string'
22
import { defaultChainKey } from '~/consts'
3-
import { getSymbolicChainName } from './chains'
3+
import { getChainKey } from './chains'
44

55
interface RouteOptions {
66
search?: Record<'chain', string> & Record<string, any>
@@ -15,7 +15,7 @@ export function routeOptions(
1515
return {
1616
search: {
1717
...search,
18-
chain: typeof chain === 'string' ? chain : getSymbolicChainName(chain),
18+
chain: typeof chain === 'string' ? chain : getChainKey(chain),
1919
},
2020
hash,
2121
}

0 commit comments

Comments
 (0)