Skip to content

Commit

Permalink
Merge branch 'staging' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanbenoit-richez committed Feb 9, 2024
2 parents be3204f + 8bab3d6 commit a05be84
Show file tree
Hide file tree
Showing 158 changed files with 7,085 additions and 12,646 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"i18n-ally.localesPaths": [
"src/i18next/locales"
]
],
"i18n-ally.keystyle": "nested"
}
8 changes: 3 additions & 5 deletions gql/gql.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* eslint-disable */
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';

import * as types from './graphql';
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';

const documents: never[] = [];
const documents = [];
/**
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*
Expand All @@ -22,5 +21,4 @@ export function gql(source: string) {
return (documents as any)[source] ?? {};
}

export type DocumentType<TDocumentNode extends DocumentNode<any, any>> =
TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;
export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;
13,630 changes: 3,775 additions & 9,855 deletions gql/graphql.ts

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,22 @@
},
"dependencies": {
"@apollo/client": "^3.7.3",
"@emotion/react": "^11.10.5",
"@emotion/server": "^11.10.0",
"@ethersproject/abi": "^5.6.4",
"@ethersproject/bytes": "^5.6.1",
"@ethersproject/constants": "^5.6.1",
"@ethersproject/contracts": "^5.6.2",
"@ethersproject/providers": "^5.6.8",
"@gnosis.pm/safe-apps-sdk": "^7.8.0",
"@mantine/next": "^5.7.1",
"@mantine/notifications": "^5.7.1",
"@realtoken/realt-commons": "^1.3.3",
"@reduxjs/toolkit": "^1.9.1",
"@mantine/notifications": "^7.3.1",
"@realtoken/realt-commons": "^1.4.6",
"@tabler/icons": "^1.74.0",
"@tanstack/react-table": "^8.7.9",
"@types/react-redux": "^7.1.24",
"@types/redux": "^3.6.0",
"axios": "^1.5.1",
"bignumber.js": "^9.0.2",
"clsx": "^1.2.1",
"cookies-next": "^2.0.5",
"csv-stringify": "^6.4.5",
"dotenv": "^16.0.3",
"file-saver": "^2.0.5",
"graphql": "^16.6.0",
"i18next": "^21.8.11",
"image-exists": "^1.1.0",
Expand All @@ -46,9 +41,10 @@
"react-dom": "18.2.0",
"react-i18next": "^11.17.3",
"react-query": "^3.39.2",
"react-redux": "^8.0.5",
"redux": "^4.2.0",
"swr": "^1.3.0"
"react-query-devtools": "^2.6.3",
"styled-components": "^6.1.1",
"swr": "^1.3.0",
"zustand": "^4.4.7"
},
"devDependencies": {
"@babel/core": "^7.18.5",
Expand All @@ -62,6 +58,7 @@
"@radix-ui/react-scroll-area": "^0.1.5-rc.44",
"@trivago/prettier-plugin-sort-imports": "^3.2.0",
"@typechain/ethers-v5": "^10.1.0",
"@types/file-saver": "^2.0.7",
"@types/lodash": "^4.14.191",
"@types/node": "18.0.0",
"@types/react": "18.0.14",
Expand All @@ -75,6 +72,9 @@
"ethereum-abi-types-generator": "^1.3.2",
"ethers": "^5.6.9",
"patch-package": "^6.4.7",
"postcss": "^8.4.31",
"postcss-preset-mantine": "^1.11.0",
"postcss-simple-vars": "^7.0.1",
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.7.1",
"typechain": "^8.1.0",
Expand Down
67 changes: 43 additions & 24 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import type { AppProps as NextAppProps } from 'next/app';
import { ColorScheme } from '@mantine/core';
import store from 'src/store/store';
import 'src/i18next';
import InitStoreProvider from 'src/providers/InitStoreProvider';
import { Provider as JotaiProvider} from 'jotai';
import { Provider as ReduxProvide } from 'react-redux';
import { QueryClient, QueryClientProvider } from "react-query";
import {
ChainSelectConfig,
Expand All @@ -29,13 +26,20 @@ import { resources } from 'src/i18next';
import { CHAINS, Chain as CustomChain, ChainsID } from '../src/constants';
import { modals } from '../src/components';
import { HeaderNav } from '../src/components/HeaderNav';
import { modalStyles } from '../src/theme';
import { modalStyles, theme } from '../src/theme';
import { ReactQueryDevtools } from 'react-query/devtools'
import { FooterLinks } from '../src/components/footer/FooterLinks';

import '@mantine/core/styles.css';
import '@mantine/notifications/styles.css';
import { Banners } from '../src/components/header/Banners';

export const i18n = initLanguage(resources);

const customChains: ChainSelectConfig<CustomChain> = {
allowedChains: parseAllowedChain(ChainsID),
chainsConfig: CHAINS
chainsConfig: CHAINS,
defaultChainId: ChainsID.Gnosis
}

const showAllNetworks = true;
Expand All @@ -54,32 +58,47 @@ const libraryConnectors = getConnectors({
readOnly: [readOnly, readOnlyHooks]
});

type AppProps = NextAppProps & { colorScheme: ColorScheme; locale: string };
type AppProps = NextAppProps;

const queryClient = new QueryClient({});
const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
refetchOnMount: false,
}
}
});

const App = ({ Component, pageProps }: AppProps) => {
return (
<QueryClientProvider client={queryClient}>
<JotaiProvider>
<RealtProvider value={{ env, showAllNetworks }}>
<ReduxProvide store={store}>
<Web3Providers libraryConnectors={libraryConnectors}>
<InitStoreProvider>
<MantineProviders modals={modals} modalStyles={modalStyles}>
<LanguageInit i={i18n} />
<Layout
currentWebsite={Websites.YAM}
chains={customChains}
head={<Head title='Realtoken YAM (You And Me)' description='Realtoken YAM (You And Me)'/>}
headerNav={<HeaderNav/>}
>
<Component {...pageProps} />
</Layout>
</MantineProviders>
</InitStoreProvider>
</Web3Providers>
</ReduxProvide>
<Web3Providers libraryConnectors={libraryConnectors}>
<InitStoreProvider>
<MantineProviders
modals={modals}
modalStyles={modalStyles}
theme={theme}
notificationsProps={{
position: "bottom-right"
}}
>
<LanguageInit i={i18n} />
<Layout
currentWebsite={Websites.YAM}
chains={customChains}
head={<Head title='Realtoken YAM (You And Me)' description='Realtoken YAM (You And Me)'/>}
headerNav={<HeaderNav/>}
footerCustomLinks={<FooterLinks/>}
headerBanner={<Banners/>}
>
<ReactQueryDevtools/>
<Component {...pageProps} />
</Layout>
</MantineProviders>
</InitStoreProvider>
</Web3Providers>
</RealtProvider>
</JotaiProvider>
</QueryClientProvider>
Expand Down
4 changes: 0 additions & 4 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { default as NextDocument } from 'next/document';

import { createGetInitialProps } from '@mantine/next';

const getInitialProps = createGetInitialProps();

export default class _Document extends NextDocument {
static getInitialProps = getInitialProps;
}
4 changes: 2 additions & 2 deletions pages/admin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ export const Admin = () => {
>
<Tabs color={"brand"} variant={"pills"} defaultValue={'adminMarketTable'}>
<Tabs.List>
<Tabs.Tab value={'adminMarketTable'} icon={<IconList size={18} />}>
<Tabs.Tab value={'adminMarketTable'} rightSection={<IconList size={18} />}>
{t('adminMarketTable')}
</Tabs.Tab>
<Tabs.Tab value={'adminActions'} icon={<IconClick size={18} />}>
<Tabs.Tab value={'adminActions'} rightSection={<IconClick size={18} />}>
{t('adminActions')}
</Tabs.Tab>
</Tabs.List>
Expand Down
24 changes: 24 additions & 0 deletions pages/api/properties/[chainId].ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,30 @@ const getTokens = (chainId: number, communityProperties: APIPropertiesToken[], w
marketplaceLink: "",
netRentYearPerToken: 5.8627777777778,
tokenIdRules: 100049
},
{
uuid: "15039 Ward",
shortName: "15039 Ward",
fullName: "RealToken S 15039 Ward Ave Detroit MI",
contractAddress: "0xc89bff212a860f2d888a748636eabe8b18069922",
officialPrice: 52.13,
currency: "USDC",
imageLink: [],
marketplaceLink: "",
netRentYearPerToken: 6.44,
tokenIdRules: 100052
},
{
uuid: "19311 Keystone",
shortName: "19311 Keystone",
fullName: "RealToken S 19311 Keystone St Detroit MI",
contractAddress: "0xd5fe60558266675a6b02ec61176054ae0de8178f",
officialPrice: 52.13,
currency: "USDC",
imageLink: [],
marketplaceLink: "",
netRentYearPerToken: 5.54,
tokenIdRules: 100051
}
]
propertiesGoerli.forEach((token) => token.annualYield = token.officialPrice ? token.netRentYearPerToken/token.officialPrice : 0)
Expand Down
3 changes: 2 additions & 1 deletion pages/api/rmm-properties/[chainId].ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const getTokenFromCommunityAPI = new Promise<APIPropertiesToken[]>( async (resol
console.log("Failed to fetch properties from community")
reject(err);
}
})
});

const getContractAddressFromChainId = (propertyToken: APIPropertiesToken, chainId: number): string|undefined => {
switch(chainId){
Expand Down Expand Up @@ -184,6 +184,7 @@ const getTokens = (chainId: number, communityProperties: APIPropertiesToken[]):
tokenIdRules: propertyToken.tokenIdRules
});
// }

});
}

Expand Down
Loading

0 comments on commit a05be84

Please sign in to comment.