synapsecns/sanguine

View on GitHub
packages/widget/src/utils/flattenPausedTokens.ts

Summary

Maintainability
A
3 hrs
Test Coverage
import { PAUSED_TOKENS_BY_CHAIN } from '@/constants/pausedTokens'

export const flattenPausedTokens = () => {
  const flatList = []

  for (const chainId in PAUSED_TOKENS_BY_CHAIN) {
    if (PAUSED_TOKENS_BY_CHAIN.hasOwnProperty(chainId)) {
      PAUSED_TOKENS_BY_CHAIN[chainId].forEach((token) => {
        flatList.push(`${token}-${chainId}`)
      })
    }
  }

  return flatList
}