Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
77880df
fix: unchecked asset filters (#95)
NandyBa Dec 18, 2024
7f35422
merge master in develop (#103)
NandyBa Dec 18, 2024
68dfdcf
Merge branch 'master' into develop
NandyBa Dec 18, 2024
0d7f8fe
feat: restrict merges to preprod (#104)
NandyBa Dec 18, 2024
f81f456
merge develop into master (#102) (#107)
NandyBa Dec 19, 2024
db54874
feat: add workflow to restrict merges to master (#108)
NandyBa Dec 21, 2024
d31c2ab
feat: add product type filter (#94)
NandyBa Dec 21, 2024
e8d140e
Prevents settings menu from closing while clicking on calendar (#113)
BenoistP Jan 26, 2025
eb79909
fix: other asset balance by wallet (#112)
BenoistP Mar 1, 2025
ca743df
feat: optimize RPC calls (#114)
NandyBa Mar 24, 2025
8aa4fbe
73 feature add matomo analytics 2 (#110)
BenoistP Mar 24, 2025
f384bf1
deployment fix
BenoistP Mar 24, 2025
519c770
Merge branch 'preprod' into develop
BenoistP May 3, 2025
f605c36
Clean env
Sigri44 May 4, 2025
dff64f2
Update branch.yml
Sigri44 May 4, 2025
3e8137e
Fix spellcheck
Sigri44 May 4, 2025
6ad827c
Fix spellcheck
Sigri44 May 4, 2025
e23d166
Fix spellcheck
Sigri44 May 4, 2025
d79a793
Clean README
Sigri44 May 4, 2025
8f5b958
Fix spellcheck
Sigri44 May 4, 2025
e8823ef
Add id site for matomo
Sigri44 May 5, 2025
7a9050a
Fix matomo id
Sigri44 May 5, 2025
739f583
Factoring tokens added (#121)
BenoistP May 14, 2025
807f335
117 read only not working (#122)
BenoistP May 21, 2025
43afd49
Make yarn lockfile great again ... again
BenoistP May 21, 2025
f0350f7
Squashed commit of the following:
BenoistP May 24, 2025
2ef4334
Fix docker local build error
BenoistP Jun 13, 2025
5a06954
Docker: fixes
BenoistP Jun 13, 2025
3d3f7c2
Merge branch 'preprod' into develop
BenoistP Jun 13, 2025
5e12bdf
Fix CI/CD
Sigri44 Jun 13, 2025
19d9ce5
v2.4.2
Sigri44 Jun 13, 2025
5f529c3
Merge branch 'preprod' into develop
Sigri44 Jun 13, 2025
a393df5
Clean .env.sample
Sigri44 Jun 13, 2025
433bda2
fix: consume initializeProvidersQueue and add timout (#125)
Yohann76 Jun 20, 2025
5620fde
Include alternative apis (PitsBI actually) (#129)
BenoistP Aug 8, 2025
126ad8b
130 clicking on an asset and/or getting back to list/card view view c…
BenoistP Aug 8, 2025
9632a4e
Feat reusd sushiv3 (#134)
BenoistP Aug 8, 2025
03560ac
Update yarn.lock / fix for failed build
BenoistP Aug 8, 2025
5b5a5fc
Revert "Update yarn.lock / fix for failed build"
BenoistP Aug 8, 2025
cab7fa9
yarn: fix for failed build
BenoistP Aug 8, 2025
949a457
workflow: vercel
BenoistP Nov 14, 2025
7a1bcda
Update vercel.json
BenoistP Nov 14, 2025
2246999
Revert "Update vercel.json"
BenoistP Nov 14, 2025
9cc9937
Revert "workflow: vercel"
BenoistP Nov 14, 2025
a85c4a7
merge develop into master (#102) (#107)
NandyBa Dec 19, 2024
7805dd2
Revert "Update yarn.lock / fix for failed build"
BenoistP Aug 8, 2025
c548355
yarn: fix for failed build
BenoistP Aug 8, 2025
5ae1ab2
Fix merge conflicts with main
Sigri44 Feb 18, 2026
73e4fa8
Fix prettier
Sigri44 Feb 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
BUILD_ENV=
COMMUNITY_API_KEY=
REALTOKEN_COMMUNITY_API_KEY=
THEGRAPH_API_KEY=
REALTOKENAPI='https://api.realtoken.community/v1/token'
REALTOKENAPI_HISTORY='https://history.api.realtoken.community/'

REALTOKEN_COMMUNITY_API_BASE='https://api.realtoken.community/'
REALTOKEN_COMMUNITY_API_VERSION='v1'
REALTOKEN_COMMUNITY_API_GET_ALLTOKENS='token'
REALTOKEN_COMMUNITY_API_HISTORY_BASE='https://history.api.realtoken.community/'

PITSBI_API_BASE='https://api.pitsbi.io/'
PITSBI_API_VERSION='api'
PITSBI_API_GET_LASTUPDATE='last_get_realTokens_communityDashboard'
PITSBI_API_GET_ALLTOKENS='realTokens_communityDashboard'

MATOMO_URL='https://data.realtoken.community/'
MATOMO_SITE_ID=

Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
DOCKER_PASSWD: ${{ secrets.DOCKER_PASSWD }}
DOMAIN_URL: ${{ secrets.DOMAIN_URL }}
THEGRAPH_API_KEY: ${{ secrets.THEGRAPH_API_KEY }}
COMMUNITY_API_KEY: ${{ secrets.COMMUNITY_API_KEY }}
REALTOKEN_COMMUNITY_API_KEY: ${{ secrets.REALTOKEN_COMMUNITY_API_KEY }}
RPC_URLS_ETH_MAINNET: ${{ secrets.RPC_URLS_ETH_MAINNET }}
RPC_URLS_GNOSIS_MAINNET: ${{ secrets.RPC_URLS_GNOSIS_MAINNET }}
MATOMO_ID_PROD: ${{ secrets.MATOMO_ID_PROD }}
Expand Down Expand Up @@ -106,9 +106,15 @@ jobs:
docker login -u "$DOCKER_LOGIN" -p "$DOCKER_PASSWD" \$DOCKER_REGISTRY

THEGRAPH_API_KEY="$THEGRAPH_API_KEY" \
COMMUNITY_API_KEY="$COMMUNITY_API_KEY" \
REALTOKENAPI="https://api.$DOMAIN_URL/v1/token" \
REALTOKENAPI_HISTORY="https://history.api.$DOMAIN_URL/" \
REALTOKEN_COMMUNITY_API_KEY="$REALTOKEN_COMMUNITY_API_KEY" \
REALTOKEN_COMMUNITY_API_BASE="https://api.$DOMAIN_URL" \
REALTOKEN_COMMUNITY_API_VERSION='v1' \
REALTOKEN_COMMUNITY_API_GET_ALLTOKENS='token' \
REALTOKEN_COMMUNITY_API_HISTORY_BASE="https://history.api.$DOMAIN_URL/" \
PITSBI_API_BASE="https://api.pitsbi.io/" \
PITSBI_API_VERSION='api' \
PITSBI_API_GET_LASTUPDATE='last_get_realTokens_communityDashboard' \
PITSBI_API_GET_ALLTOKENS='realTokens_communityDashboard' \
MATOMO_URL="https://data.$DOMAIN_URL/" \
MATOMO_SITE_ID="$MATOMO_SITE_ID" \
RPC_URLS_ETH_MAINNET="$RPC_URLS_ETH_MAINNET" \
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

## TODO

- [x] Use Community API to get RealTokens data (and remove public/mock/realt.min.json)
- [x] Display assets in a table
- [x] Allow to sort assets
- [ ] Create Readme
Expand All @@ -16,7 +15,7 @@

To run the project you will need to set-up a `.env` file in the root folder, by copy/paste `.env.sample` file.

To get a `COMMUNITY_API_KEY`, join the dedicated [telegram dev channel](https://t.me/+XQyoaFfmN61yk7X0) then ask for.
To get a `REALTOKEN_COMMUNITY_API_KEY`, join the dedicated [telegram dev channel](https://t.me/+XQyoaFfmN61yk7X0) then ask for.

To get a `THEGRAPH_API_KEY`, you need to create an account on [thegraph](https://thegraph.com/docs/en/querying/managing-api-keys/)

Expand Down
13 changes: 10 additions & 3 deletions docker-compose-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ services:
container_name: ${DOCKER_BRANCH}-dashboard
environment:
- THEGRAPH_API_KEY=$THEGRAPH_API_KEY
- COMMUNITY_API_KEY=$COMMUNITY_API_KEY
- REALTOKENAPI=$REALTOKENAPI
- REALTOKENAPI_HISTORY=$REALTOKENAPI_HISTORY
- REALTOKEN_COMMUNITY_API_KEY=$REALTOKEN_COMMUNITY_API_KEY

- REALTOKEN_COMMUNITY_API_BASE=$REALTOKEN_COMMUNITY_API_BASE
- REALTOKEN_COMMUNITY_API_VERSION=$REALTOKEN_COMMUNITY_API_VERSION
- REALTOKEN_COMMUNITY_API_GET_ALLTOKENS=$REALTOKEN_COMMUNITY_API_GET_ALLTOKENS
- REALTOKEN_COMMUNITY_API_HISTORY_BASE=$REALTOKEN_COMMUNITY_API_HISTORY_BASE
- PITSBI_API_BASE
- PITSBI_API_VERSION
- PITSBI_API_GET_LASTUPDATE
- PITSBI_API_GET_ALLTOKENS
- MATOMO_URL=$MATOMO_URL
- MATOMO_SITE_ID=$MATOMO_SITE_ID
- RPC_URLS_ETH_MAINNET=$RPC_URLS_ETH_MAINNET
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@
"@realtoken/realt-commons": "1.4.20",
"@reduxjs/toolkit": "^2.8.2",
"@socialgouv/matomo-next": "^1.9.2",
"@tabler/icons": "^1.119.0",
"@uniswap/sdk-core": "^7.7.2",
"@uniswap/v3-sdk": "^3.25.2",
"@tabler/icons-react": "^3.34.1",
"@web3-react/core": "^8.2.3",
"cookies-next": "^2.1.2",
"date-fns": "^3.6.0",
"dayjs": "^1.11.13",
"del-cli": "^6.0.0",
"dexie": "^3.2.7",
"ethers": "^6.14.1",
"ethers": "^6.15.0",
"graphql": "^16.11.0",
"i18next": "^22.5.1",
"jotai": "^1.13.1",
Expand Down
62 changes: 62 additions & 0 deletions src/components/assetPage/assetPageIssuesTab.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { FC } from 'react'
import { useTranslation } from 'react-i18next'

import { UserRealtoken } from 'src/store/features/wallets/walletsSelector'
import { RealTokenToBeFixedStatus } from 'src/types/APIPitsBI'

import { AssetPageTable } from './assetPageTable'

export const AssetPageIssuesTab: FC<{
realtoken: UserRealtoken
}> = ({ realtoken }) => {
const { t } = useTranslation('common', { keyPrefix: 'assetPage.issues' })
const { t: tAssetIssues } = useTranslation('common', {
keyPrefix: 'assetIssues',
})

const statusLabel = () => {
switch (realtoken.extraData?.pitsBI?.actions?.realt_status) {
case RealTokenToBeFixedStatus.NoExhibit:
return tAssetIssues('status.noExhibit')
case RealTokenToBeFixedStatus.Scheduled:
return tAssetIssues('status.scheduled')
case RealTokenToBeFixedStatus.UpgradedAndReady:
return tAssetIssues('status.upgradedReady')
case undefined:
default:
return tAssetIssues('status.unknown')
}
}

return (
<>
<AssetPageTable
data={[
{
label: t('status'),
value: statusLabel(),
},
{
label: t('priority'),
value:
realtoken.extraData?.pitsBI?.actions?.priority === undefined
? tAssetIssues('priority.unknown')
: realtoken.extraData?.pitsBI?.actions?.priority !== 0
? `${realtoken.extraData?.pitsBI?.actions?.priority}`
: tAssetIssues('priority.na'),
},
{
label: t('lawsuit'),
value:
realtoken.extraData?.pitsBI?.actions?.exhibit_number &&
realtoken.extraData?.pitsBI?.actions?.volume
? `${tAssetIssues('lawsuit.exhibit')} ${tAssetIssues('lawsuit.exhibitNumber')} ${realtoken.extraData?.pitsBI?.actions?.exhibit_number} ${tAssetIssues('lawsuit.volumeNumber')} ${realtoken.extraData?.pitsBI?.actions?.volume}`
: tAssetIssues('lawsuit.na'),
},
]}
/>
</>
)
}

AssetPageIssuesTab.displayName = 'AssetPageIssuesTab'
20 changes: 20 additions & 0 deletions src/components/assetsView/filters/AssetsViewFilterModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ import {
assetsViewFilterAtom,
} from 'src/states'
import { selectUserIncludesOtherAssets } from 'src/store/features/settings/settingsSelector'
import { selectUserDisplayAdditionalData } from 'src/store/features/settings/settingsSelector'
import { userIncludesOtherAssetsChanged } from 'src/store/features/settings/settingsSlice'

import { AssetProductType } from '../types'
import { AssetsViewProductTypeFilter } from './AssetsViewFilterProductType'
import { AssetsViewIssuePriorityFilter } from './AssetsViewIssuePriorityFilter'
import { AssetsViewIssueStatusFilter } from './AssetsViewIssuesStatusFilter'
import { AssetsViewRentStatusFilter } from './AssetsViewRentStatusFilter'
import { AssetsViewRmmStatusFilter } from './AssetsViewRmmStatusFilter'
import { AssetsViewSort } from './AssetsViewSort'
Expand Down Expand Up @@ -59,6 +62,7 @@ export const AssetsViewFilterModal: FC<ContextModalProps> = ({
const dispatch = useDispatch()
const setUserIncludesOtherAssets = (value: boolean) =>
dispatch(userIncludesOtherAssetsChanged(value))
const userDisplayAdditionalData = useSelector(selectUserDisplayAdditionalData)

const onClose = useCallback(() => {
context.closeModal(id)
Expand Down Expand Up @@ -123,6 +127,22 @@ export const AssetsViewFilterModal: FC<ContextModalProps> = ({
setFilterModel({ ...filterModel, ...value })
}}
/>
{userDisplayAdditionalData && (
<>
<AssetsViewIssueStatusFilter
filter={filterModel}
onChange={(value) => {
setFilterModel({ ...filterModel, ...value })
}}
/>
<AssetsViewIssuePriorityFilter
filter={filterModel}
onChange={(value) => {
setFilterModel({ ...filterModel, ...value })
}}
/>
</>
)}
</Flex>
<Flex justify={'space-between'}>
<ResetFilterButton onClick={onClose} />
Expand Down
106 changes: 106 additions & 0 deletions src/components/assetsView/filters/AssetsViewIssuePriorityFilter.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import { FC } from 'react'
import { useTranslation } from 'react-i18next'

import { Select } from '@mantine/core'

import { assetsViewDefaultFilter } from 'src/states'
import {
OtherRealtoken,
UserRealtoken,
} from 'src/store/features/wallets/walletsSelector'
import { RealTokenToBeRepairedPriority } from 'src/types/APIPitsBI'

import { useInputStyles } from '../../inputs/useInputStyles'
import { AssetIssuePriorityType } from '../types'

interface AssetsViewIssuePriorityFilterModel {
issuePriority: AssetIssuePriorityType
}

interface AssetsViewIssuePriorityFilterProps {
filter: AssetsViewIssuePriorityFilterModel
onChange: (value: AssetsViewIssuePriorityFilterModel) => void
}
export const AssetsViewIssuePriorityFilter: FC<
AssetsViewIssuePriorityFilterProps
> = ({ filter, onChange }) => {
const { t } = useTranslation('common', { keyPrefix: 'assetIssuePriority' })
const { classes: inputClasses } = useInputStyles()

const viewOptions = [
{
value: AssetIssuePriorityType.ALL,
label: t('options.all'),
},
{
value: AssetIssuePriorityType.NONE,
label: t('options.none'),
},
{
value: AssetIssuePriorityType.HIGH,
label: t('options.high'),
},
{
value: AssetIssuePriorityType.MEDIUM,
label: t('options.medium'),
},
{
value: AssetIssuePriorityType.LOW,
label: t('options.low'),
},
]

return (
<Select
label={t('label')}
data={viewOptions}
value={filter.issuePriority}
onChange={(value) =>
onChange({
issuePriority:
(value as AssetIssuePriorityType) ??
assetsViewDefaultFilter.issuePriority,
})
}
classNames={inputClasses}
/>
)
}
AssetsViewIssuePriorityFilter.displayName = 'AssetsViewIssuePriorityFilter'

export function useAssetsViewIssuePriorityFilter(
filter: AssetsViewIssuePriorityFilterModel,
) {
function assetIssuePriorityFilterFunction(
asset: UserRealtoken | OtherRealtoken,
) {
const Asset = asset as UserRealtoken
switch (filter.issuePriority) {
case AssetIssuePriorityType.ALL:
return true
case AssetIssuePriorityType.NONE:
return (
Asset.extraData?.pitsBI?.actions?.priority ===
RealTokenToBeRepairedPriority.None ||
Asset.extraData?.pitsBI?.actions?.priority === undefined
)
case AssetIssuePriorityType.HIGH:
return (
Asset.extraData?.pitsBI?.actions?.priority ===
RealTokenToBeRepairedPriority.High
)
case AssetIssuePriorityType.MEDIUM:
return (
Asset.extraData?.pitsBI?.actions?.priority ===
RealTokenToBeRepairedPriority.Medium
)
case AssetIssuePriorityType.LOW:
return (
Asset.extraData?.pitsBI?.actions?.priority ===
RealTokenToBeRepairedPriority.Low
)
}
}

return { assetIssuePriorityFilterFunction }
}
Loading