Skip to content

Commit

Permalink
update preprod with filter unchecked fix and preprod branch protection (
Browse files Browse the repository at this point in the history
#105)

* Revert "Master"

* merge preprod <> master (#67)

* add dropdown

* simplify selector and add all token option

* feat: change allPage value to Infinity

* feat: estimate the fully rented rent

* feat: add fully rented estimation to asset cards

* refactor: move hook calls to top of the page

* fix: propInfo definition

* fix: last rent condition

* feat: add estimation for property with not fully rented history

* feat: get fully rented APR

* apply max APR method

* rename variable and functions

* feat: add RWA token

* feat: re-enable property onClick

* feat: add rwa valuation on the rwa card

* fix: missing property

* feat: add rwa to summary card

* define useRWA

* take into account user currency

* feat: add RWA value to net value calculation

* remove comment

* refactor: clean imports

* feat: include RWA on Ethereum

* fix: en communs

* feat: update filter to support RWA token

* fix: prettier

* fix: other prettier errors

* let prettier add strange semi-column

* fix: imports

* use hook

* add fallback

* switch for a useMemo

* feat: add real time fully rented APR

* feat: add gloabl metric fully rented APR

* feat: add disclaimer

* feat: add disclaimer

* feat: update disclaimer message

* fix: disclaimer message

* improve message

* feat: create yam statics stics page

* feat: add yam statistics for all RealT Tokens on Gnosis (who have Gnosis chain contract prop)

* feat: mask tokens with no volume

* fix: add token name

* feat: add pagination

* feat: improve style

* feat: change token per page to 100

* feat: add fully rented APR to asset grid

* refactor: remove logs

* feat: add fully rented APR to property details

* fix: reset current page when tokens changed

* fix: reset current page when user change page size

* feat: add translation for YAM statistics hearder label

* fix: yamStatistics: use selected currency for token price

* feat: yamStatistics: add owned | all filter

* feat: yamStatistics: add subsidized, fullySubsidized and notSubsidized filters

* add additional fallbacks RPC URLs

* fix: RPC initialization on currencies file

---------

Co-authored-by: Nandy Bâ <[email protected]>

* merge preprod <> master (#77)

* add dropdown

* simplify selector and add all token option

* feat: change allPage value to Infinity

* feat: estimate the fully rented rent

* feat: add fully rented estimation to asset cards

* refactor: move hook calls to top of the page

* fix: propInfo definition

* fix: last rent condition

* feat: add estimation for property with not fully rented history

* feat: get fully rented APR

* apply max APR method

* rename variable and functions

* feat: add RWA token

* feat: re-enable property onClick

* feat: add rwa valuation on the rwa card

* fix: missing property

* feat: add rwa to summary card

* define useRWA

* take into account user currency

* feat: add RWA value to net value calculation

* remove comment

* refactor: clean imports

* feat: include RWA on Ethereum

* fix: en communs

* feat: update filter to support RWA token

* fix: prettier

* fix: other prettier errors

* let prettier add strange semi-column

* fix: imports

* use hook

* add fallback

* switch for a useMemo

* feat: add real time fully rented APR

* feat: add gloabl metric fully rented APR

* feat: add disclaimer

* feat: add disclaimer

* feat: update disclaimer message

* fix: disclaimer message

* improve message

* feat: create yam statics stics page

* feat: add yam statistics for all RealT Tokens on Gnosis (who have Gnosis chain contract prop)

* feat: mask tokens with no volume

* fix: add token name

* feat: add pagination

* feat: improve style

* feat: change token per page to 100

* feat: add fully rented APR to asset grid

* refactor: remove logs

* feat: add fully rented APR to property details

* fix: reset current page when tokens changed

* fix: reset current page when user change page size

* feat: add translation for YAM statistics hearder label

* fix: yamStatistics: use selected currency for token price

* feat: yamStatistics: add owned | all filter

* feat: yamStatistics: add subsidized, fullySubsidized and notSubsidized filters

* add additional fallbacks RPC URLs

* fix: RPC initialization on currencies file

* feat: YamStatistic: add Yamp Volume's number of days

* fix: fullyRentedAPR: fix french disclaimer text

* fix: second disclaimer text small error

* feat: fullyRentedAPR: manage VEFA properties

* refactore: improve comment

* feat: show VEFA properties forced fully rented APR only if property do not have tenants

* fix: RWA table view

* feat: add bridge link on header (#74)

* fix: VEFA Realtime  APR

---------

Co-authored-by: Nandy Bâ <[email protected]>
Co-authored-by: Yohann Durand <[email protected]>

* Revert "merge preprod <> master (#77)"

This reverts commit 68daad5.

* fix: APY fully rented for properties before start rent day (#85)

Co-authored-by: alex <[email protected]>

* Change NS for RealToken (#89) (#90)

* fix: unchecked asset filters (#95)

* merge master in develop (#103)

* Revert "Master"

* merge preprod <> master (#67)

* add dropdown

* simplify selector and add all token option

* feat: change allPage value to Infinity

* feat: estimate the fully rented rent

* feat: add fully rented estimation to asset cards

* refactor: move hook calls to top of the page

* fix: propInfo definition

* fix: last rent condition

* feat: add estimation for property with not fully rented history

* feat: get fully rented APR

* apply max APR method

* rename variable and functions

* feat: add RWA token

* feat: re-enable property onClick

* feat: add rwa valuation on the rwa card

* fix: missing property

* feat: add rwa to summary card

* define useRWA

* take into account user currency

* feat: add RWA value to net value calculation

* remove comment

* refactor: clean imports

* feat: include RWA on Ethereum

* fix: en communs

* feat: update filter to support RWA token

* fix: prettier

* fix: other prettier errors

* let prettier add strange semi-column

* fix: imports

* use hook

* add fallback

* switch for a useMemo

* feat: add real time fully rented APR

* feat: add gloabl metric fully rented APR

* feat: add disclaimer

* feat: add disclaimer

* feat: update disclaimer message

* fix: disclaimer message

* improve message

* feat: create yam statics stics page

* feat: add yam statistics for all RealT Tokens on Gnosis (who have Gnosis chain contract prop)

* feat: mask tokens with no volume

* fix: add token name

* feat: add pagination

* feat: improve style

* feat: change token per page to 100

* feat: add fully rented APR to asset grid

* refactor: remove logs

* feat: add fully rented APR to property details

* fix: reset current page when tokens changed

* fix: reset current page when user change page size

* feat: add translation for YAM statistics hearder label

* fix: yamStatistics: use selected currency for token price

* feat: yamStatistics: add owned | all filter

* feat: yamStatistics: add subsidized, fullySubsidized and notSubsidized filters

* add additional fallbacks RPC URLs

* fix: RPC initialization on currencies file

---------

Co-authored-by: Nandy Bâ <[email protected]>

* merge preprod <> master (#77)

* add dropdown

* simplify selector and add all token option

* feat: change allPage value to Infinity

* feat: estimate the fully rented rent

* feat: add fully rented estimation to asset cards

* refactor: move hook calls to top of the page

* fix: propInfo definition

* fix: last rent condition

* feat: add estimation for property with not fully rented history

* feat: get fully rented APR

* apply max APR method

* rename variable and functions

* feat: add RWA token

* feat: re-enable property onClick

* feat: add rwa valuation on the rwa card

* fix: missing property

* feat: add rwa to summary card

* define useRWA

* take into account user currency

* feat: add RWA value to net value calculation

* remove comment

* refactor: clean imports

* feat: include RWA on Ethereum

* fix: en communs

* feat: update filter to support RWA token

* fix: prettier

* fix: other prettier errors

* let prettier add strange semi-column

* fix: imports

* use hook

* add fallback

* switch for a useMemo

* feat: add real time fully rented APR

* feat: add gloabl metric fully rented APR

* feat: add disclaimer

* feat: add disclaimer

* feat: update disclaimer message

* fix: disclaimer message

* improve message

* feat: create yam statics stics page

* feat: add yam statistics for all RealT Tokens on Gnosis (who have Gnosis chain contract prop)

* feat: mask tokens with no volume

* fix: add token name

* feat: add pagination

* feat: improve style

* feat: change token per page to 100

* feat: add fully rented APR to asset grid

* refactor: remove logs

* feat: add fully rented APR to property details

* fix: reset current page when tokens changed

* fix: reset current page when user change page size

* feat: add translation for YAM statistics hearder label

* fix: yamStatistics: use selected currency for token price

* feat: yamStatistics: add owned | all filter

* feat: yamStatistics: add subsidized, fullySubsidized and notSubsidized filters

* add additional fallbacks RPC URLs

* fix: RPC initialization on currencies file

* feat: YamStatistic: add Yamp Volume's number of days

* fix: fullyRentedAPR: fix french disclaimer text

* fix: second disclaimer text small error

* feat: fullyRentedAPR: manage VEFA properties

* refactore: improve comment

* feat: show VEFA properties forced fully rented APR only if property do not have tenants

* fix: RWA table view

* feat: add bridge link on header (#74)

* fix: VEFA Realtime  APR

---------

Co-authored-by: Nandy Bâ <[email protected]>
Co-authored-by: Yohann Durand <[email protected]>

* Revert "merge preprod <> master (#77)"

This reverts commit 68daad5.

* fix: APY fully rented for properties before start rent day (#85)

Co-authored-by: alex <[email protected]>

* Change NS for RealToken (#89) (#90)

---------

Co-authored-by: Sigri <[email protected]>
Co-authored-by: Kurtisone <[email protected]>
Co-authored-by: jycssu-com <[email protected]>
Co-authored-by: alex <[email protected]>
Co-authored-by: Jycssu <[email protected]>
Co-authored-by: Yohann Durand <[email protected]>

* feat: restrict merges to preprod (#104)

---------

Co-authored-by: Sigri <[email protected]>
Co-authored-by: Kurtisone <[email protected]>
Co-authored-by: jycssu-com <[email protected]>
Co-authored-by: alex <[email protected]>
Co-authored-by: Jycssu <[email protected]>
Co-authored-by: Yohann Durand <[email protected]>
  • Loading branch information
7 people authored Dec 18, 2024
1 parent 029f199 commit aba6e08
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 7 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/branch-check-preprod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Restrict merges to preprod

on:
pull_request:
branches:
- preprod

jobs:
check-branch:
runs-on: ubuntu-latest
steps:
- name: Check if the source branch is develop
run: |
if [ "${{ github.event.pull_request.head.ref }}" != "develop" ]; then
echo "Pull requests to preprod must come from develop branch."
exit 1
fi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next'

import { Select } from '@mantine/core'

import { assetsViewDefaultFilter } from 'src/states'
import {
OtherRealtoken,
UserRealtoken,
Expand Down Expand Up @@ -50,7 +51,11 @@ export const AssetsViewRentStatusFilter: FC<
data={viewOptions}
value={filter.rentStatus}
onChange={(value) =>
onChange({ rentStatus: value as AssetRentStatusType })
onChange({
rentStatus:
(value as AssetRentStatusType) ??
assetsViewDefaultFilter.rentStatus,
})
}
classNames={inputClasses}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next'

import { Select } from '@mantine/core'

import { assetsViewDefaultFilter } from 'src/states'
import {
OtherRealtoken,
UserRealtoken,
Expand Down Expand Up @@ -46,7 +47,12 @@ export const AssetsViewRmmStatusFilter: FC<AssetsViewRmmStatusFilterProps> = ({
label={t('label')}
data={viewOptions}
value={filter.rmmStatus}
onChange={(value) => onChange({ rmmStatus: value as AssetRmmStatusType })}
onChange={(value) =>
onChange({
rmmStatus:
(value as AssetRmmStatusType) ?? assetsViewDefaultFilter.rmmStatus,
})
}
classNames={inputClasses}
/>
)
Expand Down
7 changes: 6 additions & 1 deletion src/components/assetsView/filters/AssetsViewSort.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useSelector } from 'react-redux'

import { Grid, Select, Switch } from '@mantine/core'

import { assetsViewDefaultFilter } from 'src/states'
import { selectTransfersIsLoaded } from 'src/store/features/transfers/transfersSelector'
import {
OtherRealtoken,
Expand Down Expand Up @@ -73,7 +74,11 @@ export const AssetsViewSort: FC<AssetsViewSortProps> = ({
data={sortOptions}
value={filter.sortBy}
onChange={(value) =>
onChange({ ...filter, sortBy: value as AssetSortType })
onChange({
...filter,
sortBy:
(value as AssetSortType) ?? assetsViewDefaultFilter.sortBy,
})
}
classNames={inputClasses}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next'

import { Select } from '@mantine/core'

import { assetsViewDefaultFilter } from 'src/states'
import {
OtherRealtoken,
UserRealtoken,
Expand Down Expand Up @@ -66,7 +67,12 @@ export const AssetsViewSubsidyFilter: FC<AssetsViewSubsidyFilterProps> = ({
label={t('label')}
data={viewOptions}
value={filter.subsidy}
onChange={(value) => onChange({ subsidy: value as AssetSubsidyType })}
onChange={(value) =>
onChange({
subsidy:
(value as AssetSubsidyType) ?? assetsViewDefaultFilter.subsidy,
})
}
classNames={inputClasses}
/>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next'

import { Select } from '@mantine/core'

import { assetsViewDefaultFilter } from 'src/states'
import {
OtherRealtoken,
UserRealtoken,
Expand Down Expand Up @@ -54,7 +55,11 @@ export const AssetsViewUserProtocolFilter: FC<
data={viewOptions}
value={filter.userProtocol}
onChange={(value) =>
onChange({ userProtocol: value as AssetUserProtocolType })
onChange({
userProtocol:
(value as AssetUserProtocolType) ??
assetsViewDefaultFilter.userProtocol,
})
}
classNames={inputClasses}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next'

import { Select } from '@mantine/core'

import { assetsViewDefaultFilter } from 'src/states'
import {
OtherRealtoken,
UserRealtoken,
Expand Down Expand Up @@ -58,7 +59,11 @@ export const AssetsViewUserStatusFilter: FC<
data={viewOptions}
value={filter.userStatus}
onChange={(value) =>
onChange({ userStatus: value as AssetUserStatusType })
onChange({
userStatus:
(value as AssetUserStatusType) ??
assetsViewDefaultFilter.userStatus,
})
}
classNames={inputClasses}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useFullyRentedAPR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const fullyRentedAPREstimation = (
return getVEFAFullRentedAPR(token, rentCalculation)
}

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

Expand Down

0 comments on commit aba6e08

Please sign in to comment.