bigbuffet-rw/app/soapbox/features/crypto-donate/utils/coin-db.ts
2022-11-15 12:23:36 -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 : '';
};