Skip to content

Commit

Permalink
Merge pull request #71 from RealToken-Community/develop
Browse files Browse the repository at this point in the history
merge preprod <> develop
  • Loading branch information
AlexRLT authored Aug 26, 2024
2 parents 9e00655 + ddedfb8 commit 8ba6b9a
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 4 deletions.
60 changes: 59 additions & 1 deletion src/components/assetsView/views/AssetTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const AssetTable: FC<{
{props.realtokens.map((item, index) => {
const isAProperty = item.hasOwnProperty('rentStatus')
if (!isAProperty) {
return <AssetTableRow key={'0'} value={item as UserRealtoken} />
return <RWATableRow key={'0'} value={item as RWARealtoken} />
}
return <AssetTableRow key={index} value={item as UserRealtoken} />
})}
Expand Down Expand Up @@ -159,4 +159,62 @@ const AssetTableRow: FC<{ value: UserRealtoken }> = (props) => {
</Table.Tr>
)
}

const RWATableRow: FC<{ value: RWARealtoken }> = (props) => {
const { t } = useTranslation('common', { keyPrefix: 'numbers' })
const transfersIsLoaded = useSelector(selectTransfersIsLoaded)

const { shortName, value, unitPriceCost, amount, totalInvestment } =
props.value

return (
<Table.Tr>
<Table.Td style={{ minWidth: '150px' }}>
<Anchor>{shortName}</Anchor>
</Table.Td>
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
{useCurrencyValue(value)}
</Table.Td>
{transfersIsLoaded ? (
<>
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
{'-'}
</Table.Td>
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
{'-'}
</Table.Td>
</>
) : null}

<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
{useCurrencyValue(unitPriceCost)}
</Table.Td>
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
{t('decimal', { value: amount })}
</Table.Td>
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
{'-'}
</Table.Td>
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
{'-'}
</Table.Td>
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
{'-'}
</Table.Td>
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
{'-'}
</Table.Td>
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
{'-'}
</Table.Td>
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
{useCurrencyValue(totalInvestment)}
</Table.Td>
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
{'-'}
</Table.Td>
</Table.Tr>
)
}

AssetTableRow.displayName = 'AssetTableRow'
15 changes: 14 additions & 1 deletion src/hooks/useFullyRentedAPR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,21 @@ import {
} from 'src/types/RentCalculation'

const fullyRentedAPREstimation = (token: UserRealtoken) => {
// Case of fully rented property
// VEFA properties
if (token.shortName === 'Playa Caracol Cottage 10' && !token.hasTenants)
return 10.77
else if (token.shortName === 'Playa Caracol 303300' && !token.hasTenants)
return 10.69
else if (token.shortName === 'Playa Caracol 303200' && !token.hasTenants)
return 10.8
else if (token.shortName === 'PH Pinoalto A002' && !token.hasTenants)
return 10.11
else if (token.shortName === 'PH Pinoalto A003' && !token.hasTenants)
return 10.11
else if (token.shortName === 'Vervana T1 ' && !token.hasTenants) return 11.33

if (token.rentedUnits === token.totalUnits) {
// Case of fully rented property
return token.annualPercentageYield
}

Expand Down
2 changes: 1 addition & 1 deletion src/i18next/locales/fr/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,6 @@
"description": "Récupération de vos transactions en cours. Ce chargement peut prendre un certain temps en fonction du nombre de transactions effecutées (10-20 secondes / 1000 transactions). Lors de vos prochaines visites, seul les nouvelles transactions seront récupérées."
},
"disclaimer":{
"fullyRentedAPR": "Cette estimation est en phase bêta et a été développée par la communauté RealT. Nous vous invitons à signaler tout problème éventuel. Les informations fournies sont à titre indicatif uniquement. La communauté RealT ou RealT ne peut être tenu responsable en cas de décision prise à partir de données inexactites."
"fullyRentedAPR": "Cette estimation est en phase bêta et a été développée par la communauté RealT. Nous vous invitons à signaler tout problème éventuel. Les informations fournies sont à titre indicatif uniquement. La communauté RealT ou RealT ne peut être tenue responsable en cas de décision prise à partir de données inexactes."
}
}
2 changes: 1 addition & 1 deletion src/pages/yamStatistics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const YamStatisticsPage = () => {
<th>Token Price</th>
<th>Yam Price</th>
<th>Yam Difference (30 days)</th>
<th>Yam Volume</th>
<th>Yam Volume (30 days)</th>
</tr>
{paginationYamStatistics.map((statistics, index) => (
<YamStatisticsRow
Expand Down

0 comments on commit 8ba6b9a

Please sign in to comment.