Skip to content

Commit ad0e2dd

Browse files
Man-JainfabiolalombardimEightRice
authored
The Merge - Merge Develop to Master (#577)
* fix navigation on small devices * Proposals UI update (#556) * initial commit * new banner finished * updated filter ui * remove config tab * Revert "Proposals UI update (#556)" (#575) This reverts commit 96cfaae. Co-authored-by: Manank Patni <[email protected]> * The Merge (#536) * token deployment flow * clean & validations added * new design implemented * initial merge - lite creator added * Fetch lite homebase apps Signed-off-by: Manank Patni <[email protected]> * Remove unused data params from types and Token class Signed-off-by: Manank Patni <[email protected]> * imports upgrade * lite explorer components merged & formatted * lite explorer connected & working * merge with develop, banner removed & fixed paddings * Update App.tsx * Update App.tsx * Symbol optional * Fix lite env variables Signed-off-by: Manank Patni <[email protected]> * REfarctor lite queries Signed-off-by: Manank Patni <[email protected]> * Create Lite DAO with Full DAO Signed-off-by: Manank Patni <[email protected]> * Add deployment of lite dao Signed-off-by: Manank Patni <[email protected]> * Fix lint Signed-off-by: Manank Patni <[email protected]> * external link required & clean up (#573) * filter search fixed for mainnet (#572) * Fix voting system (#545) * initial commit * validation added * delete console.log * filters working again * removed unsed import * Add proposal form and proposal list to Full DAO (#553) Signed-off-by: Manank Patni <[email protected]> * Fix propsal creation not working for Lite only DAO Signed-off-by: Manank Patni <[email protected]> * Fix lite proposal modal Signed-off-by: Manank Patni <[email protected]> * Fix redirection and user polls posted Signed-off-by: Manank Patni <[email protected]> * Remove console.log Signed-off-by: Manank Patni <[email protected]> * Lite merge fixes Signed-off-by: Manank Patni <[email protected]> * Fix error message and revert unstake all pending Signed-off-by: Manank Patni <[email protected]> --------- Signed-off-by: Manank Patni <[email protected]> Co-authored-by: fabiolalombardim <[email protected]> Co-authored-by: fabiolalombardim <[email protected]> --------- Signed-off-by: Manank Patni <[email protected]> Co-authored-by: fabiolalombardim <[email protected]> Co-authored-by: fabiolalombardim <[email protected]> Co-authored-by: Andrei Taranu <[email protected]>
1 parent c406d51 commit ad0e2dd

File tree

165 files changed

+52200
-1166
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+52200
-1166
lines changed

package-lock.json

Lines changed: 44761 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@
1515
"prepare": "husky install"
1616
},
1717
"dependencies": {
18+
"@airgap/beacon-sdk": "^3.3.0",
19+
"@date-io/dayjs": "1.x",
20+
"@emotion/react": "^11.10.4",
21+
"@emotion/styled": "^11.10.4",
1822
"@craco/craco": "^7.1.0",
1923
"@hookform/resolvers": "^2.8.1",
2024
"@material-ui/core": "^4.11.3",
2125
"@material-ui/icons": "^4.9.1",
2226
"@material-ui/lab": "^4.0.0-alpha.57",
2327
"@microsoft/signalr": "^5.0.9",
28+
"@mui/material": "^5.10.6",
29+
"@mui/x-date-pickers": "^5.0.2",
2430
"@taquito/beacon-wallet": "^16.1.2",
2531
"@taquito/signer": "^16.1.2",
2632
"@taquito/taquito": "^16.1.2",
@@ -95,7 +101,8 @@
95101
"typescript": "^5.0.4"
96102
},
97103
"resolutions": {
98-
"@types/react": "~17.0.3"
104+
"@types/react": "~17.0.3",
105+
"react-error-overlay": "6.0.9"
99106
},
100107
"eslintConfig": {
101108
"extends": [
@@ -124,4 +131,4 @@
124131
"yarn lint:check"
125132
]
126133
}
127-
}
134+
}

src/App.tsx

Lines changed: 50 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ import { legacyTheme } from "theme/legacy"
2121
import { Footer } from "modules/common/Footer"
2222
import { FAQ } from "modules/home/FAQ"
2323
import { EnvKey, getEnv } from "services/config"
24+
import { DAOCreatorRouter } from "modules/creator/router"
25+
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider"
26+
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs"
27+
import { CommunityCreator } from "modules/lite/creator"
2428

2529
const queryClient = new QueryClient({
2630
defaultOptions: {
@@ -31,7 +35,7 @@ const queryClient = new QueryClient({
3135
refetchOnMount: false,
3236
refetchOnWindowFocus: true,
3337
staleTime: 5000,
34-
cacheTime: 30000
38+
cacheTime: 300000
3539
}
3640
}
3741
})
@@ -93,49 +97,56 @@ const App: React.FC = () => {
9397
>
9498
<QueryClientProvider client={queryClient}>
9599
<ActionSheetProvider>
96-
<Box bgcolor="primary.dark" position="absolute" width="100%">
97-
<Router>
98-
<ScrollToTop />
99-
<Switch>
100-
<Route path="/creator">
101-
<CreatorProvider>
102-
<ThemeProvider theme={legacyTheme}>
103-
<DAOCreate />
104-
</ThemeProvider>
105-
</CreatorProvider>
106-
{/* <WarningFooter
100+
<LocalizationProvider dateAdapter={AdapterDayjs}>
101+
<Box bgcolor="primary.dark" position="absolute" width="100%">
102+
<Router>
103+
<ScrollToTop />
104+
<Switch>
105+
<Route path="/creator">
106+
<CreatorProvider>
107+
<ThemeProvider theme={legacyTheme}>
108+
<DAOCreatorRouter />
109+
</ThemeProvider>
110+
</CreatorProvider>
111+
{/* <WarningFooter
107112
text={
108113
"The Homebase contract can't transfer FA1.2 tokens. Please make sure any and all tokens you send to the DAO treasury are implementing the FA2 standard."
109114
}
110115
/> */}
111-
</Route>
112-
<Route path="/explorer">
113-
<TZKTSubscriptionsProvider>
114-
<DAOExplorerRouter />
115-
</TZKTSubscriptionsProvider>
116+
</Route>
117+
<Route path="/lite">
118+
<ThemeProvider theme={legacyTheme}>
119+
<CommunityCreator />
120+
</ThemeProvider>
121+
</Route>
122+
<Route path="/explorer">
123+
<TZKTSubscriptionsProvider>
124+
<DAOExplorerRouter />
125+
</TZKTSubscriptionsProvider>
116126

117-
{window.location.href.indexOf("KT1PY9PXm8NMAgSEZg7bUtFjmV2Sj64bKuVV") !== -1 ? (
118-
<>
119-
{/* Special case for this DAO which was created before FA1.2 fix was created for the smart contract */}
120-
<WarningFooter
121-
text={
122-
"The Homebase contract can't transfer FA1.2 tokens. Please make sure any and all tokens you send to the DAO treasury are implementing the FA2 standard."
123-
}
124-
/>
125-
</>
126-
) : null}
127-
<Footer></Footer>
128-
</Route>
129-
<Route path="/faq">
130-
<FAQ />
131-
</Route>
132-
<Route path="/">
133-
<Landing />
134-
</Route>
135-
<Redirect to="/" />
136-
</Switch>
137-
</Router>
138-
</Box>
127+
{window.location.href.indexOf("KT1PY9PXm8NMAgSEZg7bUtFjmV2Sj64bKuVV") !== -1 ? (
128+
<>
129+
{/* Special case for this DAO which was created before FA1.2 fix was created for the smart contract */}
130+
<WarningFooter
131+
text={
132+
"The Homebase contract can't transfer FA1.2 tokens. Please make sure any and all tokens you send to the DAO treasury are implementing the FA2 standard."
133+
}
134+
/>
135+
</>
136+
) : null}
137+
<Footer></Footer>
138+
</Route>
139+
<Route path="/faq">
140+
<FAQ />
141+
</Route>
142+
<Route path="/">
143+
<Landing />
144+
</Route>
145+
<Redirect to="/" />
146+
</Switch>
147+
</Router>
148+
</Box>
149+
</LocalizationProvider>
139150
</ActionSheetProvider>
140151
</QueryClientProvider>
141152
</SnackbarProvider>

src/assets/img/full-dao.svg

Lines changed: 3 additions & 0 deletions
Loading

src/assets/img/link.svg

Lines changed: 3 additions & 0 deletions
Loading

src/assets/img/lite-dao.svg

Lines changed: 8 additions & 0 deletions
Loading

src/assets/img/share.svg

Lines changed: 5 additions & 0 deletions
Loading

src/models/Choice.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export interface Choice {
2+
_id?: string
3+
name: string
4+
pollID: string
5+
walletAddresses: WalletAddress[]
6+
selected?: boolean
7+
}
8+
9+
export interface WalletAddress {
10+
address: string
11+
balanceAtReferenceBlock: string
12+
}

src/models/Community.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
export interface Community {
2+
_id: string
3+
name: string
4+
description: string
5+
linkToTerms: string
6+
members: string[]
7+
tokenAddress: string
8+
polls: string[]
9+
tokenType?: string
10+
symbol: string
11+
tokenID: string
12+
picUri: string
13+
requiredTokenOwnership: boolean
14+
allowPublicAccess: boolean
15+
decimals?: string
16+
network: string
17+
}
18+
19+
export interface CommunityToken {
20+
_id?: string
21+
daoID: string
22+
tokenID: number
23+
symbol: string
24+
tokenAddress: string
25+
decimals: string
26+
}

src/models/Polls.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
export enum ProposalStatus {
2+
ACTIVE = "active",
3+
CLOSED = "closed"
4+
}
5+
export interface Poll {
6+
_id?: string
7+
daoID: string | undefined
8+
description: string
9+
name: string
10+
referenceBlock?: string
11+
startTime: string
12+
endTime: string
13+
totalSupplyAtReferenceBlock?: any
14+
choices: string[]
15+
externalLink: ""
16+
author: string
17+
isActive?: ProposalStatus
18+
timeFormatted?: string
19+
tokenSymbol?: string
20+
tokenAddress?: string
21+
tokenDecimals?: string
22+
votes?: number
23+
votingStrategy: number
24+
endTimeMinutes?: number | null
25+
endTimeHours?: number | null
26+
endTimeDays?: number | null
27+
}
28+
29+
export interface Vote {
30+
address: string
31+
balanceAtReferenceBlock: string
32+
}

0 commit comments

Comments
 (0)