mars-v2-frontend/utils/tokens.ts
Gustavo Mauricio bbbdca6950
MP-1227: Borrow Page (#24)
* added icon for atom and tokenInfo data update

* borrow page initial commit

* feat: borrow funds to ca and wallet

* close borrow module on tx success

* feat: repay funds initial setup

* repay funds action hook

* repay slider. module state on borrow page component

* styling: minor tweak to text colors

* limit manual input on repay to max value

* borrow funds component slider initial

* style: max button typography

* AssetRow extracted to separate file. organize imports

* ContainerSecondary component added

* loading indicator for pending actions

* style: progress bar colors

* tanstack table added

* tanstack react-table dependency missing

* table cleanup and layout adjustments

* fix account stats formula and update market data to match spreadsheet

* calculate max borrow amount hook

* reset borrow and repay components on account change

* max borrow amount decimals. memorized return

* hook tanstack data with real data

* redefine borrowedAssetsMap to map

* update max borrow amount formulas

* remove unnecessary table component. refactor borrow table
2022-10-20 16:39:21 +01:00

18 lines
396 B
TypeScript

import tokenInfo from 'config/tokenInfo'
export const getTokenSymbol = (denom: string) => {
return tokenInfo[denom]?.symbol ?? denom
}
export const getTokenDecimals = (denom: string) => {
return tokenInfo[denom]?.decimals ?? 6
}
export const getTokenIcon = (denom: string) => {
return tokenInfo[denom].icon
}
export const getTokenInfo = (denom: string) => {
return tokenInfo[denom]
}