Compare commits
3 Commits
bdfd9ff466
...
3e30fe0eb1
Author | SHA1 | Date |
---|---|---|
Adrian Brzeziński | 3e30fe0eb1 | |
Adrian Brzeziński | e1f791b5e8 | |
Finn | fb23b86b7c |
|
@ -55,7 +55,7 @@ const CollateralFeeWarningModal = ({ isOpen }: WarningProps) => {
|
|||
<thead>
|
||||
<TrHead>
|
||||
<Th className="text-left">{t('collateral')}</Th>
|
||||
<Th className="text-right">{t('funding-rate')} (APR)</Th>
|
||||
<Th className="text-right">{t('funding-rate')} Per Day</Th>
|
||||
<Th>
|
||||
<div className="flex justify-end">{t('daily-fee')}</div>
|
||||
</Th>
|
||||
|
@ -72,10 +72,7 @@ const CollateralFeeWarningModal = ({ isOpen }: WarningProps) => {
|
|||
</Td>
|
||||
<Td>
|
||||
<p className="text-right">
|
||||
{(ltvRatio * bank.collateralFeePerDay * 365 * 100).toFixed(
|
||||
2,
|
||||
)}
|
||||
%
|
||||
{(ltvRatio * bank.collateralFeePerDay * 100).toFixed(4)}%
|
||||
</p>
|
||||
</Td>
|
||||
<Td>
|
||||
|
|
|
@ -188,7 +188,7 @@ const DashboardSuggestedValues = ({
|
|||
null,
|
||||
getNullOrVal(fieldsToChange.tokenConditionalSwapTakerFeeRate),
|
||||
getNullOrVal(fieldsToChange.tokenConditionalSwapMakerFeeRate),
|
||||
getNullOrVal(fieldsToChange.flashLoanSwapFeeRate),
|
||||
null,
|
||||
//do not edit of interest curve scaling
|
||||
null,
|
||||
getNullOrVal(fieldsToChange.interestTargetUtilization),
|
||||
|
@ -206,7 +206,7 @@ const DashboardSuggestedValues = ({
|
|||
fieldsToChange.disableAssetLiquidation === undefined
|
||||
? null
|
||||
: fieldsToChange.disableAssetLiquidation,
|
||||
getNullOrVal(fieldsToChange.collateralFeePerDay),
|
||||
getNullOrVal(0.000904109589041),
|
||||
null,
|
||||
)
|
||||
.accounts({
|
||||
|
@ -328,7 +328,11 @@ const DashboardSuggestedValues = ({
|
|||
)
|
||||
|
||||
return (
|
||||
<Modal panelClassNames="!max-w-[800px]" isOpen={isOpen} onClose={onClose}>
|
||||
<Modal
|
||||
panelClassNames="!max-w-[800px] !max-h-[700px] overflow-auto"
|
||||
isOpen={isOpen}
|
||||
onClose={onClose}
|
||||
>
|
||||
<h3 className="mb-6">
|
||||
<span>
|
||||
{bank.name} - Suggested tier: {PRESETS[suggestedTierKey].preset_name}{' '}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
"@blockworks-foundation/mango-feeds": "0.1.7",
|
||||
"@blockworks-foundation/mango-mints-redemption": "^0.0.10",
|
||||
"@blockworks-foundation/mango-v4": "0.24.0",
|
||||
"@blockworks-foundation/mango-v4-settings": "0.14.21",
|
||||
"@blockworks-foundation/mango-v4-settings": "0.14.22",
|
||||
"@blockworks-foundation/mangolana": "0.0.16",
|
||||
"@headlessui/react": "1.6.6",
|
||||
"@heroicons/react": "2.0.18",
|
||||
|
|
|
@ -74,6 +74,33 @@ const Prospective: NextPage = () => {
|
|||
return []
|
||||
}, [tokensList])
|
||||
|
||||
const downloadTokens = () => {
|
||||
let csvContent = 'data:text/csv;charset=utf-8,'
|
||||
const filteredTokens = tokensList.filter(
|
||||
(token) => !bankNames.includes(token.symbol.toUpperCase()),
|
||||
)
|
||||
|
||||
if (filteredTokens.length > 0) {
|
||||
const headers = Object.keys(filteredTokens[0]).join(',')
|
||||
const rows = filteredTokens.map((token) =>
|
||||
Object.values(token)
|
||||
.map(
|
||||
(value) => `"${value?.toString().replace(/"/g, '""')}"`, // Handle quotes in data
|
||||
)
|
||||
.join(','),
|
||||
)
|
||||
csvContent += headers + '\n' + rows.join('\n')
|
||||
}
|
||||
|
||||
const encodedUri = encodeURI(csvContent)
|
||||
const link = document.createElement('a')
|
||||
link.setAttribute('href', encodedUri)
|
||||
link.setAttribute('download', 'non_bank_tokens.csv')
|
||||
document.body.appendChild(link) // Required for FF
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="col-span-12 w-full lg:col-span-8 lg:col-start-3">
|
||||
<DashboardNavbar />
|
||||
|
@ -82,6 +109,12 @@ const Prospective: NextPage = () => {
|
|||
<p className="flex items-center space-x-4 text-th-fgd-4">
|
||||
<span>Hidden Gems to Prospect On</span>
|
||||
</p>
|
||||
<button
|
||||
onClick={downloadTokens}
|
||||
className="rounded bg-blue-500 px-4 py-2 text-white hover:bg-blue-600"
|
||||
>
|
||||
Download
|
||||
</button>
|
||||
</div>
|
||||
<div className="w-full overflow-scroll" style={{ maxHeight: '70vh' }}>
|
||||
<Table className="h-full">
|
||||
|
|
|
@ -350,10 +350,10 @@
|
|||
bn.js "^5.2.1"
|
||||
eslint-config-prettier "^9.0.0"
|
||||
|
||||
"@blockworks-foundation/mango-v4-settings@0.14.21":
|
||||
version "0.14.21"
|
||||
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-v4-settings/-/mango-v4-settings-0.14.21.tgz#d7aeb3bc827acd7d558bfba5d8ec1b48c590a746"
|
||||
integrity sha512-QbveR8YSH4DI7sskeYBpEBHREWF2bCh/rJ7WymSlqmsIYR1DOvsk+ZqUdrDCtGEjZZb+3jrP77jjc3XMe1jZig==
|
||||
"@blockworks-foundation/mango-v4-settings@0.14.22":
|
||||
version "0.14.22"
|
||||
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-v4-settings/-/mango-v4-settings-0.14.22.tgz#7d7c9759b73d2c8166cf5f0871969e3764ea4139"
|
||||
integrity sha512-YSJrCgeI6aC/RsL8dRyJmpKYB2CkY9YaiZ9PVjNWrQOcgQkp/DNaaI1CBFpZshtg6VtpFraQh6IrOmXzaAvglA==
|
||||
dependencies:
|
||||
bn.js "^5.2.1"
|
||||
eslint-config-prettier "^9.0.0"
|
||||
|
|
Loading…
Reference in New Issue