Skip to content

Commit 0620911

Browse files
Sigri44Kurtisonejycssu-comAlexRLTNandyBa
authored
Merge all develop to preprod (#124)
* 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) * merge develop into master (#102) (#107) * Change NS for RealToken (#89) * chore: install required sharp dependency for production * chore(deps): bump body-parser from 1.20.2 to 1.20.3 (#87) Bumps [body-parser](https://github.com/expressjs/body-parser) from 1.20.2 to 1.20.3. - [Release notes](https://github.com/expressjs/body-parser/releases) - [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md) - [Commits](expressjs/body-parser@1.20.2...1.20.3) --- updated-dependencies: - dependency-name: body-parser dependency-type: indirect ... * feat: add new assets REG, REG Vote Power (#91) * first version : Assets as rows * 'other' assets display switch; 'other' assets shown in Summary 'other' assets = tokens others than RealTokens = RWA, REG, ... - Display switch for hiding 'other' assets in table rows - 'other' assets figures added to Summary section * contracts utils * use contract utils for fetching balances * Eth provider removed: REG Voting Power is not deployed on Eth * batchCallOneFunction not fully tested * error args * comments * wrong 'inheritance' * smol fix: properly throw 'User not found' error * style/comments * settings labels and icons * unitIcon: optional + alignment with other units * Filter 'other' assets in Grid view * Settings: switch icons, section names * fix: lint warning * fix: lint warning * fix: build error ? * fix: build error #2 ? * fix: build error #3 ? * fix: build error #4 ? * fix: build error #5 ? * Fix: existing filter error when filtering on "Owned on" * fix: avoid fetching others assets balances if user wallet was not set * feat: add other token price on cards and fix decimals rounds for total invest * fix: improve subsudy filter for exclude other realtokens * fix: fix last changes filter and use correct typing in filters for avoid futurs errors * feat: set initial launch date for RWA token * feat: initialize rpc provider only once * feat: include reg tokens locked inside the incentive vault * fix: fix eslint warnings and add missing translations * Update .gitignore exclude pnpm lockfile * Create .nvmrc add .nvmrc for switching between node versions * Update contract.ts optional parameters for customizing batch calls: batch max and min size, number of attempts before giving up * Regvotingpower: icon orange, size grows depending on amount * unused import * Usdc currency/rate * Voting power size & fill color depending on power amount * Voting power size & fill color depending on power amount * Fixes: token prices in USD, avoid fetching REG vault balances on Eth - Tokens values fix: Updated assets prices by using currenciesRates and user currency rate (previously considering usdc = usd and xdai = usd as well), now assets prices are converted from their respective currencies (e.g. usdc, xdai) to usd, then total value is priced in user choosen currency. - Smol fix: getAddressesLockedBalances was fetching vault balances on Eth, throwing errors as there is not such vault on Eth. Added parameters for fetching any number of vault by provider(s). * comment * Check Providers ability to handle requests - Check Providers ability to handle requests - Additionnal providers https://rpc.ankr.com/eth and https://eth-pokt.nodies.app currently fail to handle concurrent requests * Assets hooks moved in index for avoiding duplicate requests - Both SummaryCard and AssetsView use the same hooks for getting their data, leading to duplicate web3 requests Moving hooks in parent components prevents this form happening. * prettier * Avoid divide by zero in case asset.totalUnits is unknown/zero * "Clean" scripts * Assets filtering moved to the right place filter has to be in assetsView/AssetsView.tsx * Paging translation labels: placeholder, All * simplify pageSize handling * Assets filtering fix (causing pagination issues) OtherAssets filtering was improperly implemented into the map loops by skipping non "others assets" value, causing holes in display (missing cards). Filtering is now done in AssetsView where it should have been in the first place * Revert changes: realtime/global labels for rents calculation switch --------- * fix: API URLs issue #97 (#98) * addresses issue #97 Moves api urls to (.)ENV set utls to new api.realtoken.community domain (previously api.realt.community) * Update .env.sample missing update of sample .env * Update .env.sample * NEXT_PUBLIC_ prefix removed for REALTOKENAPI ENV vars * feat: update yarn lock (#99) * feat: add new API urls to deployment workflow (#100) * feat: pass new env variables to docker env (#101) * 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 --------- * 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 --------- * Revert "merge preprod <> master (#77)" This reverts commit 68daad5. * fix: APY fully rented for properties before start rent day (#85) * Change NS for RealToken (#89) (#90) --------- --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Sigri <[email protected]> Co-authored-by: Jycssu <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: BenoistP <[email protected]> Co-authored-by: Kurtisone <[email protected]> Co-authored-by: jycssu-com <[email protected]> Co-authored-by: alex <[email protected]> Co-authored-by: Yohann Durand <[email protected]> * feat: add workflow to restrict merges to master (#108) * feat: add product type filter (#94) * feat: add product type filter * refactor: change filter file name * feat: add product type i18n translations * feat: update REG and RWA type to support new filter * feat: automatically activate other assets fetch it equity token filter is selected * feat: add default value for product type filter if user un-checked it * Prevents settings menu from closing while clicking on calendar (#113) * Prevents settings menu from closing while clicking on calendar calendar is considered as "outside" of the settings menu - State added for watching calendar "display" state - Allow menu closing (on any click) when calendar is not opened and prevents it from closing when calendar is open * prettier * fix: other asset balance by wallet (#112) * tmp/test * debug removed * detailed balances by wallet type todo: - check amounts with vault - remove debug log - check types / interfaces * console.log debug removed * getChainId returns Provider's chain id used with getWalletChainName (wallets\walletsSelector.ts) * getWalletChainName returns "wallet" chain used with getChainId (repositories\RpcProvider.ts) * Sum's wallets token balances by chain (wallet type) returns addresses balances by "wallets" (chain) and sums all balances * prettier * feat: optimize RPC calls (#114) * feat: add address book lib * feat: add aave core lib * feat: add wallet balance provider provider ABI * feat: optimize getAddressesBalances to minimize RPC calls * fix: remove un-used lib * fix: erc20 abi * small enhancement fix: Balances details (by chain) missing #111 * fix: merge issue * useless console.dir --------- Co-authored-by: BenoistP <[email protected]> Co-authored-by: BenoistP <[email protected]> * 73 feature add matomo analytics 2 (#110) * merge develop into master (#102) * Change NS for RealToken (#89) * chore: install required sharp dependency for production * chore(deps): bump body-parser from 1.20.2 to 1.20.3 (#87) Bumps [body-parser](https://github.com/expressjs/body-parser) from 1.20.2 to 1.20.3. - [Release notes](https://github.com/expressjs/body-parser/releases) - [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md) - [Commits](expressjs/body-parser@1.20.2...1.20.3) --- updated-dependencies: - dependency-name: body-parser dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: add new assets REG, REG Vote Power (#91) * first version : Assets as rows * 'other' assets display switch; 'other' assets shown in Summary 'other' assets = tokens others than RealTokens = RWA, REG, ... - Display switch for hiding 'other' assets in table rows - 'other' assets figures added to Summary section * contracts utils * use contract utils for fetching balances * Eth provider removed: REG Voting Power is not deployed on Eth * batchCallOneFunction not fully tested * error args * comments * wrong 'inheritance' * smol fix: properly throw 'User not found' error * style/comments * settings labels and icons * unitIcon: optional + alignment with other units * Filter 'other' assets in Grid view * Settings: switch icons, section names * fix: lint warning * fix: lint warning * fix: build error ? * fix: build error #2 ? * fix: build error #3 ? * fix: build error #4 ? * fix: build error #5 ? * Fix: existing filter error when filtering on "Owned on" * fix: avoid fetching others assets balances if user wallet was not set * feat: add other token price on cards and fix decimals rounds for total invest * fix: improve subsudy filter for exclude other realtokens * fix: fix last changes filter and use correct typing in filters for avoid futurs errors * feat: set initial launch date for RWA token * feat: initialize rpc provider only once * feat: include reg tokens locked inside the incentive vault * fix: fix eslint warnings and add missing translations * Update .gitignore exclude pnpm lockfile * Create .nvmrc add .nvmrc for switching between node versions * Update contract.ts optional parameters for customizing batch calls: batch max and min size, number of attempts before giving up * Regvotingpower: icon orange, size grows depending on amount * unused import * Usdc currency/rate * Voting power size & fill color depending on power amount * Voting power size & fill color depending on power amount * Fixes: token prices in USD, avoid fetching REG vault balances on Eth - Tokens values fix: Updated assets prices by using currenciesRates and user currency rate (previously considering usdc = usd and xdai = usd as well), now assets prices are converted from their respective currencies (e.g. usdc, xdai) to usd, then total value is priced in user choosen currency. - Smol fix: getAddressesLockedBalances was fetching vault balances on Eth, throwing errors as there is not such vault on Eth. Added parameters for fetching any number of vault by provider(s). * comment * Check Providers ability to handle requests - Check Providers ability to handle requests - Additionnal providers https://rpc.ankr.com/eth and https://eth-pokt.nodies.app currently fail to handle concurrent requests * Assets hooks moved in index for avoiding duplicate requests - Both SummaryCard and AssetsView use the same hooks for getting their data, leading to duplicate web3 requests Moving hooks in parent components prevents this form happening. * prettier * Avoid divide by zero in case asset.totalUnits is unknown/zero * "Clean" scripts * Assets filtering moved to the right place filter has to be in assetsView/AssetsView.tsx * Paging translation labels: placeholder, All * simplify pageSize handling * Assets filtering fix (causing pagination issues) OtherAssets filtering was improperly implemented into the map loops by skipping non "others assets" value, causing holes in display (missing cards). Filtering is now done in AssetsView where it should have been in the first place * Revert changes: realtime/global labels for rents calculation switch --------- Co-authored-by: Jycssu <[email protected]> * fix: API URLs issue #97 (#98) * addresses issue #97 Moves api urls to (.)ENV set utls to new api.realtoken.community domain (previously api.realt.community) * Update .env.sample missing update of sample .env * Update .env.sample * NEXT_PUBLIC_ prefix removed for REALTOKENAPI ENV vars * feat: update yarn lock (#99) * feat: add new API urls to deployment workflow (#100) * feat: pass new env variables to docker env (#101) * 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]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Sigri <[email protected]> Co-authored-by: Jycssu <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: BenoistP <[email protected]> Co-authored-by: Kurtisone <[email protected]> Co-authored-by: jycssu-com <[email protected]> Co-authored-by: alex <[email protected]> Co-authored-by: Yohann Durand <[email protected]> * Matomo analytics * should work way better with this * fix: pushed old/wrong version * disable cookie set to true --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Nandy Bâ <[email protected]> Co-authored-by: Sigri <[email protected]> Co-authored-by: Jycssu <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kurtisone <[email protected]> Co-authored-by: jycssu-com <[email protected]> Co-authored-by: alex <[email protected]> Co-authored-by: Yohann Durand <[email protected]> * deployment fix ERROR: failed to solve: process "/bin/sh -c yarn --frozen-lockfile" did not complete successfully: exit code: 1 https://github.com/RealToken-Community/dashboard-v2/actions/runs/14044504299/job/39322225393 * Clean env * Update branch.yml * Fix spellcheck * Fix spellcheck Co-authored-by: Copilot <[email protected]> * Fix spellcheck * Clean README * Fix spellcheck * Add id site for matomo * Fix matomo id * Factoring tokens added (#121) - prefilter - advanced filter - labels * 117 read only not working (#122) * Upgrade to latest realt-commons * Explicitly set Gnosis as the default chain ... so current bug/freeze due to error on ETH won't show up (rpc error, bug in real-token\realt-interface-commons\packages\realt-commons\src\components\modals\WalletModal\WalletModal.tsx ?) when choosing read-only * Update _app.tsx * Packages upgrades & downgrades @mantine/* downgraded to ^7.13.4 for matching realt-interface-commons versions * Update package.json Co-authored-by: Copilot <[email protected]> * Update src/pages/_app.tsx Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * Make yarn lockfile great again ... again * Squashed commit of the following: commit 511597e Author: BenoistP <[email protected]> Date: Sat May 24 21:40:03 2025 +0200 typo commit 58c4546 Author: BenoistP <[email protected]> Date: Sat May 24 21:37:57 2025 +0200 useless import removed commit db039ff Author: BenoistP <[email protected]> Date: Sat May 24 21:34:57 2025 +0200 add realt-commons default rpc to dashboard default rpcs list commit 2c7a38f Author: BenoistP <[email protected]> Date: Sat May 24 21:28:51 2025 +0200 comment commit 9a94f4f Author: BenoistP <[email protected]> Date: Sat May 24 17:32:05 2025 +0200 Squashed commit of the following: commit 5755241 Author: BenoistP <[email protected]> Date: Sat May 24 17:12:45 2025 +0200 prettier commit 2b3703f Author: BenoistP <[email protected]> Date: Sat May 24 17:10:06 2025 +0200 RPC urls Additionnal rpc urls (codes defines default urls, thes additional ones (if setted) will prefix defaults) Env value is a string, urls are separated by commas. Duplicates, empty, nulls values are merged and removed valid values: RPC_URLS_ETH_MAINNET = https://rpc.eth.gateway.fm RPC_URLS_ETH_MAINNET = ,,https://rpc.eth.gateway.fm, commit 197dd98 Author: BenoistP <[email protected]> Date: Sat May 24 17:03:59 2025 +0200 Read-only fix Redefine realt-commons chain config using RpcProviders config commit 1759ad9 Author: BenoistP <[email protected]> Date: Sat May 24 14:49:43 2025 +0200 temporary commit commit 422ca84 Author: BenoistP <[email protected]> Date: Sat May 24 12:43:10 2025 +0200 restore previous version commit 24dbc43 Author: BenoistP <[email protected]> Date: Sat May 24 12:39:01 2025 +0200 restore previous version commit 35ecebf Author: BenoistP <[email protected]> Date: Fri May 23 19:36:31 2025 +0200 Update RpcProvider.ts commit 2726a2b Author: BenoistP <[email protected]> Date: Fri May 23 11:13:45 2025 +0200 temp commit for backup commit 22022e6 Author: BenoistP <[email protected]> Date: Wed May 21 21:01:28 2025 +0200 Make yarn lockfile great again commit b002698 Author: BenoistP <[email protected]> Date: Wed May 21 19:23:15 2025 +0200 Update src/pages/_app.tsx Co-authored-by: Copilot <[email protected]> commit 159ef85 Author: BenoistP <[email protected]> Date: Wed May 21 19:21:34 2025 +0200 Update package.json Co-authored-by: Copilot <[email protected]> commit 022c8b9 Author: BenoistP <[email protected]> Date: Wed May 21 19:15:37 2025 +0200 Packages upgrades & downgrades @mantine/* downgraded to ^7.13.4 for matching realt-interface-commons versions commit a2ec820 Author: BenoistP <[email protected]> Date: Wed May 21 18:03:46 2025 +0200 Update _app.tsx commit 70f02ec Author: BenoistP <[email protected]> Date: Wed May 21 17:58:22 2025 +0200 Explicitly set Gnosis as the default chain ... so current bug/freeze due to error on ETH won't show up (rpc error, bug in real-token\realt-interface-commons\packages\realt-commons\src\components\modals\WalletModal\WalletModal.tsx ?) when choosing read-only commit a09a916 Author: BenoistP <[email protected]> Date: Tue May 20 15:35:09 2025 +0200 Upgrade to latest realt-commons * Fix docker local build error => ERROR [app builder 4/5] COPY . . 14.2s ------ > [app builder 4/5] COPY . .: ------ failed to solve: cannot replace to directory /var/lib/docker/overlay2/np0icniix570dylxjdxatwyl7/merged/app/node_modules/@apollo/client with file  ELIFECYCLE  Command failed with exit code 1. * Docker: fixes docker-compose: version is obsolete upgrade build to node 18 * Fix CI/CD * v2.4.2 * Clean .env.sample * fix: consume initializeProvidersQueue and add timout (#125) * fix: consume initializeProvidersQueue and add timout * fix: resolve linting issues using Prettier * fix: fix type issue (GnosisRpcProvider property on unknown type) * fix: resolve type error in RpcProvider (assigning 'unknown' to 'ProvidersWithUrls') * feat: add page test-rpc for debug --------- Signed-off-by: dependabot[bot] <[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: Nandy Bâ <[email protected]> Co-authored-by: Yohann Durand <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: BenoistP <[email protected]> Co-authored-by: BenoistP <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 8343ad2 commit 0620911

File tree

5 files changed

+202
-35
lines changed

5 files changed

+202
-35
lines changed

.env.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ REALTOKENAPI_HISTORY='https://history.api.realtoken.community/'
66
MATOMO_URL='https://data.realtoken.community/'
77
MATOMO_SITE_ID=
88

9-
RPC_URLS_ETH_MAINNET = https://rpc.eth.gateway.fm,https://ethereum-rpc.publicnode.com,https://eth-mainnet.public.blastapi.io,https://ethereum.blockpi.network/v1/rpc/public,https://rpc.mevblocker.io/fast,https://rpc.mevblocker.io,https://0xrpc.io/eth
10-
RPC_URLS_GNOSIS_MAINNET = https://rpc.gnosischain.com,https://rpc.gnosis.gateway.fm,https://rpc.ap-southeast-1.gateway.fm/v4/gnosis/non-archival/mainnet,https://gnosis-rpc.publicnode.com,https://gnosis.oat.farm,https://0xrpc.io/gno
9+
RPC_URLS_ETH_MAINNET=https://rpc.eth.gateway.fm,https://ethereum-rpc.publicnode.com,https://eth-mainnet.public.blastapi.io,https://ethereum.blockpi.network/v1/rpc/public,https://rpc.mevblocker.io/fast,https://rpc.mevblocker.io,https://0xrpc.io/eth
10+
RPC_URLS_GNOSIS_MAINNET=https://rpc.gnosischain.com,https://rpc.gnosis.gateway.fm,https://rpc.ap-southeast-1.gateway.fm/v4/gnosis/non-archival/mainnet,https://gnosis-rpc.publicnode.com,https://gnosis.oat.farm,https://0xrpc.io/gno

.github/workflows/branch.yml

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,49 @@ jobs:
7070
SSH_PORT: ${{ secrets.SSH_PORT }}
7171

7272
- name: Update branch environment
73+
env:
74+
DOCKER_BRANCH: ${{ github.ref_name }}
75+
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
76+
DOCKER_LOGIN: ${{ secrets.DOCKER_LOGIN }}
77+
DOCKER_PASSWD: ${{ secrets.DOCKER_PASSWD }}
78+
DOMAIN_URL: ${{ secrets.DOMAIN_URL }}
79+
THEGRAPH_API_KEY: ${{ secrets.THEGRAPH_API_KEY }}
80+
COMMUNITY_API_KEY: ${{ secrets.COMMUNITY_API_KEY }}
81+
RPC_URLS_ETH_MAINNET: ${{ secrets.RPC_URLS_ETH_MAINNET }}
82+
RPC_URLS_GNOSIS_MAINNET: ${{ secrets.RPC_URLS_GNOSIS_MAINNET }}
83+
MATOMO_ID_PROD: ${{ secrets.MATOMO_ID_PROD }}
84+
MATOMO_ID_PREPROD: ${{ secrets.MATOMO_ID_PREPROD }}
85+
MATOMO_ID_DEVELOP: ${{ secrets.MATOMO_ID_DEVELOP }}
7386
run: |
74-
ssh staging 'export DOCKER_BRANCH=${{ github.ref_name }} DOCKER_REGISTRY=${{ secrets.DOCKER_REGISTRY }}
75-
cd /var/docker/dashboard-v2/${DOCKER_BRANCH}
76-
git pull origin ${DOCKER_BRANCH}
77-
docker compose --file docker-compose-branch.yml pull
78-
docker login -u ${{ secrets.DOCKER_LOGIN }} -p ${{ secrets.DOCKER_PASSWD }} ${DOCKER_REGISTRY}
79-
THEGRAPH_API_KEY=${{ secrets.THEGRAPH_API_KEY }} \
80-
COMMUNITY_API_KEY=${{ secrets.COMMUNITY_API_KEY }} \
81-
REALTOKENAPI=https://api.realtoken.community/v1/token \
82-
REALTOKENAPI_HISTORY=https://history.api.realtoken.community/ \
83-
MATOMO_URL=https://data.realtoken.community/ \
84-
MATOMO_SITE_ID=${{ github.ref_name == 'master' && secrets.MATOMO_ID_PROD || github.ref_name == 'preprod' && secrets.MATOMO_ID_PREPROD || secrets.MATOMO_ID_DEVELOP }} \
85-
RPC_URLS_ETH_MAINNET=${{ secrets.RPC_URLS_ETH_MAINNET }} \
86-
RPC_URLS_GNOSIS_MAINNET=${{ secrets.RPC_URLS_GNOSIS_MAINNET }} \
87-
HOSTNAME=${{ github.ref_name == 'master' && 'dashboard.realtoken.community' || 'dashboard.${DOCKER_BRANCH}.realtoken.community' }} \
88-
docker compose --project-name ${{ github.ref_name }}-dashboard --file docker-compose-branch.yml up -d'
87+
if [[ "$DOCKER_BRANCH" == "master" ]]; then
88+
export MATOMO_SITE_ID="$MATOMO_ID_PROD"
89+
export HOSTNAME="dashboard.$DOMAIN_URL"
90+
elif [[ "$DOCKER_BRANCH" == "preprod" ]]; then
91+
export MATOMO_SITE_ID="$MATOMO_ID_PREPROD"
92+
export HOSTNAME="dashboard.$DOCKER_BRANCH.$DOMAIN_URL"
93+
else
94+
export MATOMO_SITE_ID="$MATOMO_ID_DEVELOP"
95+
export HOSTNAME="dashboard.$DOCKER_BRANCH.$DOMAIN_URL"
96+
fi
97+
98+
ssh staging <<EOF
99+
set -euxo pipefail
100+
export DOCKER_BRANCH="$DOCKER_BRANCH"
101+
export DOCKER_REGISTRY="$DOCKER_REGISTRY"
102+
103+
cd /var/docker/dashboard-v2/\$DOCKER_BRANCH
104+
git pull origin \$DOCKER_BRANCH
105+
docker compose --file docker-compose-branch.yml pull
106+
docker login -u "$DOCKER_LOGIN" -p "$DOCKER_PASSWD" \$DOCKER_REGISTRY
107+
108+
THEGRAPH_API_KEY="$THEGRAPH_API_KEY" \
109+
COMMUNITY_API_KEY="$COMMUNITY_API_KEY" \
110+
REALTOKENAPI="https://api.$DOMAIN_URL/v1/token" \
111+
REALTOKENAPI_HISTORY="https://history.api.$DOMAIN_URL/" \
112+
MATOMO_URL="https://data.$DOMAIN_URL/" \
113+
MATOMO_SITE_ID="$MATOMO_SITE_ID" \
114+
RPC_URLS_ETH_MAINNET="$RPC_URLS_ETH_MAINNET" \
115+
RPC_URLS_GNOSIS_MAINNET="$RPC_URLS_GNOSIS_MAINNET" \
116+
HOSTNAME="$HOSTNAME" \
117+
docker compose --project-name \$DOCKER_BRANCH-dashboard --file docker-compose-branch.yml up -d
118+
EOF

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "realtoken-dashboard-v2",
3-
"version": "2.4.1",
3+
"version": "2.4.2",
44
"scripts": {
55
"dev": "next dev",
66
"build": "next build",

src/pages/test-rpc.tsx

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
// src/pages/test-rpc.tsx
2+
import { useEffect, useState } from 'react'
3+
4+
import { initializeProviders } from 'src/repositories/RpcProvider'
5+
6+
interface TestResults {
7+
success: boolean
8+
duration?: number
9+
providers?: {
10+
gnosisUrl: string
11+
ethereumUrl: string
12+
}
13+
error?: {
14+
message: string
15+
stack: string
16+
}
17+
}
18+
19+
export default function TestRpcPage() {
20+
const [results, setResults] = useState<TestResults | null>(null)
21+
const [loading, setLoading] = useState(true)
22+
23+
useEffect(() => {
24+
testInitializeProviders()
25+
}, [])
26+
27+
const testInitializeProviders = async () => {
28+
try {
29+
console.log('🚀 Test de initializeProviders...')
30+
31+
const startTime = Date.now()
32+
const providers = await initializeProviders()
33+
const duration = Date.now() - startTime
34+
35+
setResults({
36+
success: true,
37+
duration,
38+
providers: {
39+
gnosisUrl: providers.GnosisRpcUrl,
40+
ethereumUrl: providers.EthereumRpcUrl,
41+
},
42+
})
43+
44+
console.log('✅ initializeProviders réussi:', providers)
45+
} catch (error) {
46+
console.error('❌ initializeProviders échoué:', error)
47+
setResults({
48+
success: false,
49+
error: {
50+
message: error instanceof Error ? error.message : 'Erreur inconnue',
51+
stack: error instanceof Error ? error.stack || '' : '',
52+
},
53+
})
54+
} finally {
55+
setLoading(false)
56+
}
57+
}
58+
59+
if (loading) {
60+
return (
61+
<div style={{ padding: '20px' }}>
62+
<h1>Test RPC - Chargement...</h1>
63+
<p>Test de initializeProviders en cours...</p>
64+
</div>
65+
)
66+
}
67+
68+
if (!results?.success) {
69+
return (
70+
<div style={{ padding: '20px' }}>
71+
<h1>Test RPC - Erreur</h1>
72+
<h2>❌ initializeProviders a échoué</h2>
73+
<p>
74+
<strong>Message:</strong> {results?.error?.message}
75+
</p>
76+
<details>
77+
<summary>Stack trace</summary>
78+
<pre
79+
style={{ background: '#f5f5f5', padding: '10px', overflow: 'auto' }}
80+
>
81+
{results?.error?.stack}
82+
</pre>
83+
</details>
84+
</div>
85+
)
86+
}
87+
88+
return (
89+
<div style={{ padding: '20px' }}>
90+
<h1>Test RPC - Succès</h1>
91+
<h2>✅ initializeProviders réussi</h2>
92+
<p>
93+
<strong>Durée:</strong> {results.duration}ms
94+
</p>
95+
<p>
96+
<strong>Gnosis RPC:</strong> {results.providers?.gnosisUrl}
97+
</p>
98+
<p>
99+
<strong>Ethereum RPC:</strong> {results.providers?.ethereumUrl}
100+
</p>
101+
</div>
102+
)
103+
}

src/repositories/RpcProvider.ts

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ interface Providers {
252252
// PolygonRpcProvider?: JsonRpcProvider // TODO: add Polygon provider
253253
}
254254

255-
interface ProvidersWithUrls extends Providers {
255+
export interface ProvidersWithUrls extends Providers {
256256
GnosisRpcUrl: string
257257
EthereumRpcUrl: string
258258
// PolygonRpcUrl?: string // TODO: add Polygon provider
@@ -261,27 +261,61 @@ interface ProvidersWithUrls extends Providers {
261261
let initializeProvidersQueue: WaitingQueue<ProvidersWithUrls> | null = null
262262
let providers: ProvidersWithUrls | undefined = undefined
263263

264-
export const initializeProviders = async () => {
264+
export const initializeProviders = async (): Promise<ProvidersWithUrls> => {
265265
if (initializeProvidersQueue) {
266-
return initializeProvidersQueue.wait()
266+
const timeoutPromise = new Promise<never>((_, reject) =>
267+
setTimeout(() => reject(new Error('RPC timeout')), 10000),
268+
)
269+
270+
try {
271+
return await Promise.race<ProvidersWithUrls>([
272+
initializeProvidersQueue.wait(),
273+
timeoutPromise,
274+
])
275+
} catch (error) {
276+
initializeProvidersQueue = null
277+
providers = undefined
278+
// Relaunch directly without queue
279+
return await initializeProvidersDirect()
280+
}
267281
}
282+
268283
initializeProvidersQueue = new WaitingQueue()
269284

270-
const [GnosisRpcProviderWithUrl, EthereumRpcProviderWithUrl] =
271-
await Promise.all([
272-
getWorkingRpc(CHAIN_ID_GNOSIS_XDAI),
273-
getWorkingRpc(CHAIN_ID_ETHEREUM),
274-
])
275-
providers = {
276-
GnosisRpcProvider: GnosisRpcProviderWithUrl.provider,
277-
EthereumRpcProvider: EthereumRpcProviderWithUrl.provider,
278-
GnosisRpcUrl: GnosisRpcProviderWithUrl.url,
279-
EthereumRpcUrl: EthereumRpcProviderWithUrl.url,
280-
// PolygonRpcProvider: undefined, // TODO: add Polygon provider
281-
// PolygonRpcUrl: undefined, // TODO: add Polygon provider
285+
try {
286+
const result = await initializeProvidersDirect()
287+
initializeProvidersQueue.resolve(result)
288+
return result
289+
} catch (error) {
290+
initializeProvidersQueue.reject(error)
291+
throw error
292+
}
293+
}
294+
295+
async function initializeProvidersDirect(): Promise<ProvidersWithUrls> {
296+
try {
297+
const [GnosisRpcProviderWithUrl, EthereumRpcProviderWithUrl] =
298+
await Promise.all([
299+
getWorkingRpc(CHAIN_ID_GNOSIS_XDAI),
300+
getWorkingRpc(CHAIN_ID_ETHEREUM),
301+
])
302+
303+
return {
304+
GnosisRpcProvider: GnosisRpcProviderWithUrl.provider,
305+
EthereumRpcProvider: EthereumRpcProviderWithUrl.provider,
306+
GnosisRpcUrl: GnosisRpcProviderWithUrl.url,
307+
EthereumRpcUrl: EthereumRpcProviderWithUrl.url,
308+
}
309+
} catch (error) {
310+
console.log('fallback to default RPC URLs')
311+
312+
return {
313+
GnosisRpcProvider: new JsonRpcProvider('https://rpc.gnosischain.com'),
314+
EthereumRpcProvider: new JsonRpcProvider('https://rpc.eth.gateway.fm'),
315+
GnosisRpcUrl: 'https://rpc.gnosischain.com',
316+
EthereumRpcUrl: 'https://rpc.eth.gateway.fm',
317+
}
282318
}
283-
initializeProvidersQueue.resolve(providers)
284-
return providers
285319
}
286320

287321
/**

0 commit comments

Comments
 (0)