fix: fixes some minor stuff (#285)

* fix: fixes some minor stuff

* fix: used the right icon for lend
This commit is contained in:
Linkie Link 2023-07-05 15:09:15 +02:00 committed by GitHub
parent cd8fa35b76
commit 21c8d04824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 6 deletions

View File

@ -74,6 +74,7 @@ export default function FundAccount(props: Props) {
className='h-8 w-8'
iconClassName='h-2 w-2'
color='tertiary'
size='xs'
/>
</div>
<div className='relative z-10 w-full p-4'>

View File

@ -1,12 +1,11 @@
import { ColumnDef, Row, Table } from '@tanstack/react-table'
import classNames from 'classnames'
import Image from 'next/image'
import { useMemo } from 'react'
import LendingActionButtons from 'components/Earn/Lend/LendingActionButtons'
import LendingDetails from 'components/Earn/Lend/LendingDetails'
import { FormattedNumber } from 'components/FormattedNumber'
import { ChevronDown, ChevronRight } from 'components/Icons'
import { ChevronDown, ChevronUp } from 'components/Icons'
import AssetListTable from 'components/MarketAssetTable'
import MarketAssetTableRow from 'components/MarketAssetTable/MarketAssetTableRow'
import Text from 'components/Text'
@ -118,9 +117,7 @@ function LendingMarketsTable(props: Props) {
header: 'Manage',
cell: ({ row }) => (
<div className='flex items-center justify-end'>
<div className={classNames('w-4')}>
{row.getIsExpanded() ? <ChevronDown /> : <ChevronRight />}
</div>
<div className='w-4'>{row.getIsExpanded() ? <ChevronUp /> : <ChevronDown />}</div>
</div>
),
},

View File

@ -31,7 +31,8 @@ export const calculateAccountDebt = (
if (!account.debts) return BN(0)
return account.debts.reduce((acc, debt) => {
const price = prices.find((price) => price.denom === debt.denom)?.amount ?? 0
const debtValue = debt.amount.multipliedBy(price)
const debtAmount = BN(debt.amount)
const debtValue = debtAmount.multipliedBy(price)
return acc.plus(debtValue)
}, BN(0))
}