bigbuffet-rw/app/soapbox/features/crypto_donate/utils/coin_db.ts
2022-03-25 16:59:05 -05:00

13 lines
428 B
TypeScript

import { fromJS } from 'immutable';
import manifestMap from './manifest_map';
// All this does is converts the result from manifest_map.js into an ImmutableMap
const coinDB = fromJS(manifestMap);
export default coinDB;
/** Get title from CoinDB based on ticker symbol */
export const getTitle = (ticker: string): string => {
const title = coinDB.getIn([ticker, 'name']);
return typeof title === 'string' ? title : '';
};