* MP-2801: fund new credit account * tidy: cleanup * tidy: refactor * feat: replaced all possible BN(0) & BN(1) occurrences with constants * fix: adjusted according to feedback * fix: adjustments according to feedback * fix: PR comment updates * fix: reduced complexity * feat: animated the wallet balance for the demo * fix: enhanced wallet connection to select first account * fix: adjusted the calculations and added USD as displayCurrency * fix: adjusted according to feedback * feat: added TFM bridge * fix: changed forceFetchPrice --------- Co-authored-by: Yusuf Seyrek <yusuf@delphilabs.io>
25 lines
682 B
TypeScript
25 lines
682 B
TypeScript
import DisplayCurrency from 'components/DisplayCurrency'
|
|
import { FormattedNumber } from 'components/FormattedNumber'
|
|
import { BNCoin } from 'types/classes/BNCoin'
|
|
|
|
interface Props {
|
|
asset: Asset
|
|
amount: BigNumber
|
|
}
|
|
|
|
export default function AmountAndValue(props: Props) {
|
|
return (
|
|
<div className='flex flex-col gap-[0.5] text-xs'>
|
|
<FormattedNumber
|
|
amount={props.amount.toNumber()}
|
|
options={{ decimals: props.asset.decimals, abbreviated: true }}
|
|
animate
|
|
/>
|
|
<DisplayCurrency
|
|
className='justify-end text-xs text-white/50'
|
|
coin={BNCoin.fromDenomAndBigNumber(props.asset.denom, props.amount)}
|
|
/>
|
|
</div>
|
|
)
|
|
}
|