[task] add LTV to vault tables (#381)
This commit is contained in:
parent
179400fe08
commit
e76a5dfc96
@ -1,2 +1,3 @@
|
|||||||
src/utils/charting_library
|
src/utils/charting_library
|
||||||
src/utils/datafeeds
|
src/utils/datafeeds
|
||||||
|
src/types/generated
|
@ -1,2 +1,3 @@
|
|||||||
src/utils/charting_library
|
src/utils/charting_library
|
||||||
src/utils/datafeeds
|
src/utils/datafeeds
|
||||||
|
src/types/generated
|
@ -25,7 +25,7 @@ import useStore from 'store'
|
|||||||
import { BNCoin } from 'types/classes/BNCoin'
|
import { BNCoin } from 'types/classes/BNCoin'
|
||||||
import { VaultStatus } from 'types/enums/vault'
|
import { VaultStatus } from 'types/enums/vault'
|
||||||
import { getAssetByDenom } from 'utils/assets'
|
import { getAssetByDenom } from 'utils/assets'
|
||||||
import { produceCountdown } from 'utils/formatters'
|
import { formatPercent, produceCountdown } from 'utils/formatters'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
data: Vault[] | DepositedVault[]
|
data: Vault[] | DepositedVault[]
|
||||||
@ -178,6 +178,20 @@ export const VaultTable = (props: Props) => {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
accessorKey: 'ltv.max',
|
||||||
|
header: 'Max LTV',
|
||||||
|
cell: ({ row }) => {
|
||||||
|
return <Text className='text-xs'>{formatPercent(row.original.ltv.max)}</Text>
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
accessorKey: 'ltv.liq',
|
||||||
|
header: 'Liq. LTV',
|
||||||
|
cell: ({ row }) => {
|
||||||
|
return <Text className='text-xs'>{formatPercent(row.original.ltv.liq)}</Text>
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
accessorKey: 'details',
|
accessorKey: 'details',
|
||||||
enableSorting: false,
|
enableSorting: false,
|
||||||
@ -188,6 +202,7 @@ export const VaultTable = (props: Props) => {
|
|||||||
},
|
},
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
const vault = row.original as DepositedVault
|
const vault = row.original as DepositedVault
|
||||||
|
|
||||||
function enterVaultHandler() {
|
function enterVaultHandler() {
|
||||||
useStore.setState({
|
useStore.setState({
|
||||||
vaultModal: {
|
vaultModal: {
|
||||||
@ -230,7 +245,7 @@ export const VaultTable = (props: Props) => {
|
|||||||
<thead className='bg-black/20'>
|
<thead className='bg-black/20'>
|
||||||
{table.getHeaderGroups().map((headerGroup) => (
|
{table.getHeaderGroups().map((headerGroup) => (
|
||||||
<tr key={headerGroup.id}>
|
<tr key={headerGroup.id}>
|
||||||
{headerGroup.headers.map((header, index) => {
|
{headerGroup.headers.map((header) => {
|
||||||
return (
|
return (
|
||||||
<th
|
<th
|
||||||
key={header.id}
|
key={header.id}
|
||||||
|
Loading…
Reference in New Issue
Block a user