2021-06-09 15:11:37 -07:00
|
|
|
import { fromJS } from 'immutable';
|
2022-01-10 14:25:06 -08:00
|
|
|
|
2022-11-15 09:23:36 -08:00
|
|
|
import manifestMap from './manifest-map';
|
2021-06-09 15:11:37 -07:00
|
|
|
|
|
|
|
// All this does is converts the result from manifest_map.js into an ImmutableMap
|
|
|
|
const coinDB = fromJS(manifestMap);
|
|
|
|
export default coinDB;
|
2022-03-25 14:55:48 -07:00
|
|
|
|
|
|
|
/** 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 : '';
|
|
|
|
};
|