import exchanges from 'common-fe/constants/exchanges'

const SUPPORTED_EXCHANGES = Object.values(exchanges)

/**
 * Returns true if the exchange provided is one that we support.
 * @return {Boolean}
 */
export const isValidExchange = (exchange) => {
    if (typeof exchange !== 'string') {
        return false
    }

    return SUPPORTED_EXCHANGES.includes(exchange)
}
