Skip to content

Commit ed61a4c

Browse files
authored
Merge pull request #80 from RealToken-Community/revert-77-preprod
Revert "merge preprod <> master"
2 parents 68daad5 + 158465f commit ed61a4c

File tree

6 files changed

+8
-100
lines changed

6 files changed

+8
-100
lines changed

src/components/assetsView/views/AssetTable.tsx

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const AssetTable: FC<{
3030
{props.realtokens.map((item, index) => {
3131
const isAProperty = item.hasOwnProperty('rentStatus')
3232
if (!isAProperty) {
33-
return <RWATableRow key={'0'} value={item as RWARealtoken} />
33+
return <AssetTableRow key={'0'} value={item as UserRealtoken} />
3434
}
3535
return <AssetTableRow key={index} value={item as UserRealtoken} />
3636
})}
@@ -159,62 +159,4 @@ const AssetTableRow: FC<{ value: UserRealtoken }> = (props) => {
159159
</Table.Tr>
160160
)
161161
}
162-
163-
const RWATableRow: FC<{ value: RWARealtoken }> = (props) => {
164-
const { t } = useTranslation('common', { keyPrefix: 'numbers' })
165-
const transfersIsLoaded = useSelector(selectTransfersIsLoaded)
166-
167-
const { shortName, value, unitPriceCost, amount, totalInvestment } =
168-
props.value
169-
170-
return (
171-
<Table.Tr>
172-
<Table.Td style={{ minWidth: '150px' }}>
173-
<Anchor>{shortName}</Anchor>
174-
</Table.Td>
175-
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
176-
{useCurrencyValue(value)}
177-
</Table.Td>
178-
{transfersIsLoaded ? (
179-
<>
180-
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
181-
{'-'}
182-
</Table.Td>
183-
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
184-
{'-'}
185-
</Table.Td>
186-
</>
187-
) : null}
188-
189-
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
190-
{useCurrencyValue(unitPriceCost)}
191-
</Table.Td>
192-
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
193-
{t('decimal', { value: amount })}
194-
</Table.Td>
195-
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
196-
{'-'}
197-
</Table.Td>
198-
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
199-
{'-'}
200-
</Table.Td>
201-
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
202-
{'-'}
203-
</Table.Td>
204-
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
205-
{'-'}
206-
</Table.Td>
207-
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
208-
{'-'}
209-
</Table.Td>
210-
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
211-
{useCurrencyValue(totalInvestment)}
212-
</Table.Td>
213-
<Table.Td style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
214-
{'-'}
215-
</Table.Td>
216-
</Table.Tr>
217-
)
218-
}
219-
220162
AssetTableRow.displayName = 'AssetTableRow'

src/components/layouts/Header.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,6 @@ export const Header: FC = () => {
113113
label={t('YAM')}
114114
leftSection={<IconExternalLink size={'1rem'} stroke={1.5} />}
115115
/>
116-
<NavLink
117-
component={'a'}
118-
href={'https://bridge.realtoken.network/'}
119-
target={'_blank'}
120-
label={t('Bridge')}
121-
leftSection={<IconExternalLink size={'1rem'} stroke={1.5} />}
122-
/>
123116
</Drawer>
124117
<div>
125118
<Box className={styles.container}>

src/hooks/useFullyRentedAPR.ts

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ import {
1111
} from 'src/types/RentCalculation'
1212

1313
const fullyRentedAPREstimation = (token: UserRealtoken) => {
14-
// VEFA properties
15-
if (isVEFA(token)) {
16-
return VEFAAPRs[token.shortName as keyof typeof VEFAAPRs]
17-
}
18-
1914
// Case of fully rented property
2015
if (token.rentedUnits === token.totalUnits) {
2116
return token.annualPercentageYield
@@ -63,7 +58,7 @@ export const useFullyRentedAPR = (token: UserRealtoken) => {
6358

6459
const fullyRentedAPR = useMemo(() => {
6560
const isDisabled = APRDisabled(rentCalculation, token)
66-
if (isDisabled && !isVEFA(token)) return 0
61+
if (isDisabled) return 0
6762
return fullyRentedAPREstimation(token)
6863
}, [token, rentCalculation])
6964

@@ -75,12 +70,12 @@ export const useGeneralFullyRentedAPR = (tokens: UserRealtoken[]) => {
7570
// Fully rented APR average using valuation ponderation
7671
const fullyRentedAPR = useMemo(() => {
7772
const totalValue = tokens.reduce((acc, token) => {
78-
const isDisabled = APRDisabled(rentCalculation, token) && !isVEFA(token)
73+
const isDisabled = APRDisabled(rentCalculation, token)
7974
if (isDisabled) return acc
8075
return acc + token.value
8176
}, 0)
8277
const totalAPR = tokens.reduce((acc, token) => {
83-
const isDisabled = APRDisabled(rentCalculation, token) && !isVEFA(token)
78+
const isDisabled = APRDisabled(rentCalculation, token)
8479
if (isDisabled) return acc
8580
return acc + token.value * fullyRentedAPREstimation(token)
8681
}, 0)
@@ -101,23 +96,3 @@ const APRDisabled = (
10196
rentStartDate > realtimeDate.toDate()
10297
return isDisabled
10398
}
104-
105-
export const isVEFA = (token: UserRealtoken) => {
106-
return (
107-
token.shortName === 'Playa Caracol Cottage 10' ||
108-
token.shortName === 'Playa Caracol 303300' ||
109-
token.shortName === 'Playa Caracol 303200' ||
110-
token.shortName === 'PH Pinoalto A002' ||
111-
token.shortName === 'PH Pinoalto A003' ||
112-
token.shortName === 'Vervana T1 '
113-
)
114-
}
115-
116-
const VEFAAPRs = {
117-
'Playa Caracol Cottage 10': 10.77,
118-
'Playa Caracol 303300': 10.69,
119-
'Playa Caracol 303200': 10.8,
120-
'PH Pinoalto A002': 10.11,
121-
'PH Pinoalto A003': 10.11,
122-
'Vervana T1 ': 11.33,
123-
}

src/i18next/locales/en/common.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"home": "Home",
99
"realt": "RealT",
1010
"RMM": "RMM",
11-
"YAM": "YAM",
12-
"Bridge": "Bridge"
11+
"YAM": "YAM"
1312
},
1413
"settings": {
1514
"title": "Language",

src/i18next/locales/fr/common.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"home": "Accueil",
99
"realt": "RealT",
1010
"RMM": "RMM",
11-
"YAM": "YAM",
12-
"Bridge": "Bridge"
11+
"YAM": "YAM"
1312
},
1413
"settings": {
1514
"title": "Langue",
@@ -396,6 +395,6 @@
396395
"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."
397396
},
398397
"disclaimer":{
399-
"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."
398+
"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."
400399
}
401400
}

src/pages/yamStatistics.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ const YamStatisticsPage = () => {
146146
<th>Token Price</th>
147147
<th>Yam Price</th>
148148
<th>Yam Difference (30 days)</th>
149-
<th>Yam Volume (30 days)</th>
149+
<th>Yam Volume</th>
150150
</tr>
151151
{paginationYamStatistics.map((statistics, index) => (
152152
<YamStatisticsRow

0 commit comments

Comments
 (0)