Skip to content

Commit

Permalink
feat: implement growth treasury rewards ux
Browse files Browse the repository at this point in the history
  • Loading branch information
LordCheta committed Oct 27, 2024
1 parent 95c09f1 commit 26e3172
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/app/treasury/TreasurySection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ export const TreasurySection = () => {
return (
<div>
<HeaderTitle className="mb-4">Treasury</HeaderTitle>
<div className="grid grid-cols-2 xl:grid-cols-4 gap-[24px]">
<div className="grid grid-cols-2 xl:grid-cols-5 gap-[24px]">
{/* RIF Holdings */}
{treasuryContracts.map((contract, index) => (
<MetricsCard
key={`${contract.name}-RIF`}
title={`${contract.name} RIF Holdings`}
amount={`${toFixed(buckets[index].RIF.amount)} RIF`}
fiatAmount={`= USD ${buckets[index].RIF.fiatAmount}`}
title={`${contract.name} RIF`}
amount={`${buckets[index]?.RIF?.amount ? toFixed(buckets[index].RIF.amount) : 0} RIF`}
fiatAmount={`= USD ${buckets[index]?.RIF?.fiatAmount ? buckets[index].RIF.fiatAmount : 0}`}
contractAddress={contract.address}
data-testid={`${contract.name}-RIF`}
borderless
Expand All @@ -26,9 +26,10 @@ export const TreasurySection = () => {
{treasuryContracts.map((contract, index) => (
<MetricsCard
key={`${contract.name}-RBTC`}
title={`${contract.name} RBTC Holdings`}
amount={toFixed(buckets[index].RBTC.amount)}
fiatAmount={`= USD ${buckets[index].RBTC.fiatAmount}`}
title={`${contract.name} RBTC`}
amount={`${buckets[index]?.RBTC?.amount ? toFixed(buckets[index].RBTC.amount) : 0}`}
fiatAmount={`= USD ${buckets[index]?.RBTC?.fiatAmount ? buckets[index].RBTC.fiatAmount : 0}`}
contractAddress={contract.address}
data-testid={`${contract.name}-RBTC`}
borderless
/>
Expand Down
1 change: 1 addition & 0 deletions src/lib/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const treasuryContracts = [
{ name: 'Grants - Active', address: GRANTS_ACTIVE_BUCKET_ADDRESS },
{ name: 'Growth', address: GROWTH_BUCKET_ADDRESS },
{ name: 'General', address: GENERAL_BUCKET_ADDRESS },
{ name: 'Growth - Rewards', address: SIMPLIFIED_REWARD_DISTRIBUTOR_ADDRESS },
]

const GovernorAddress = GOVERNOR_ADDRESS
Expand Down

0 comments on commit 26e3172

Please sign in to comment.