5c01ec6872
* MP-2681: fixed and simplified fund and withdraw ;. : * MP-2352: created the CreditAccountComposition * fix: adjusted according to feedback * fix: fixed funding account max * fix: fix portfolio
29 lines
742 B
TypeScript
29 lines
742 B
TypeScript
'use client'
|
|
import BigNumber from 'bignumber.js'
|
|
|
|
import AccountHealth from 'components/Account/AccountHealth'
|
|
import DisplayCurrency from 'components/DisplayCurrency'
|
|
import useStore from 'store'
|
|
|
|
interface Props {
|
|
balance: BigNumber
|
|
risk: number
|
|
health: number
|
|
}
|
|
|
|
export default function AccountStats(props: Props) {
|
|
const baseCurrency = useStore((s) => s.baseCurrency)
|
|
|
|
return (
|
|
<div className='w-full flex-wrap'>
|
|
<DisplayCurrency
|
|
coin={{ amount: props.balance.toString(), denom: baseCurrency.denom }}
|
|
className='w-full text-xl'
|
|
/>
|
|
<div className='mt-1 flex w-full items-center'>
|
|
<AccountHealth health={props.health} classNames='w-[140px]' hasLabel />
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|