Skip to content

Commit

Permalink
The Merge - Merge Develop to Master (#577)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
4 people authored May 24, 2023
1 parent c406d51 commit ad0e2dd
Show file tree
Hide file tree
Showing 165 changed files with 52,200 additions and 1,166 deletions.
44,761 changes: 44,761 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@
"prepare": "husky install"
},
"dependencies": {
"@airgap/beacon-sdk": "^3.3.0",
"@date-io/dayjs": "1.x",
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@craco/craco": "^7.1.0",
"@hookform/resolvers": "^2.8.1",
"@material-ui/core": "^4.11.3",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.57",
"@microsoft/signalr": "^5.0.9",
"@mui/material": "^5.10.6",
"@mui/x-date-pickers": "^5.0.2",
"@taquito/beacon-wallet": "^16.1.2",
"@taquito/signer": "^16.1.2",
"@taquito/taquito": "^16.1.2",
Expand Down Expand Up @@ -95,7 +101,8 @@
"typescript": "^5.0.4"
},
"resolutions": {
"@types/react": "~17.0.3"
"@types/react": "~17.0.3",
"react-error-overlay": "6.0.9"
},
"eslintConfig": {
"extends": [
Expand Down Expand Up @@ -124,4 +131,4 @@
"yarn lint:check"
]
}
}
}
89 changes: 50 additions & 39 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ import { legacyTheme } from "theme/legacy"
import { Footer } from "modules/common/Footer"
import { FAQ } from "modules/home/FAQ"
import { EnvKey, getEnv } from "services/config"
import { DAOCreatorRouter } from "modules/creator/router"
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider"
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs"
import { CommunityCreator } from "modules/lite/creator"

const queryClient = new QueryClient({
defaultOptions: {
Expand All @@ -31,7 +35,7 @@ const queryClient = new QueryClient({
refetchOnMount: false,
refetchOnWindowFocus: true,
staleTime: 5000,
cacheTime: 30000
cacheTime: 300000
}
}
})
Expand Down Expand Up @@ -93,49 +97,56 @@ const App: React.FC = () => {
>
<QueryClientProvider client={queryClient}>
<ActionSheetProvider>
<Box bgcolor="primary.dark" position="absolute" width="100%">
<Router>
<ScrollToTop />
<Switch>
<Route path="/creator">
<CreatorProvider>
<ThemeProvider theme={legacyTheme}>
<DAOCreate />
</ThemeProvider>
</CreatorProvider>
{/* <WarningFooter
<LocalizationProvider dateAdapter={AdapterDayjs}>
<Box bgcolor="primary.dark" position="absolute" width="100%">
<Router>
<ScrollToTop />
<Switch>
<Route path="/creator">
<CreatorProvider>
<ThemeProvider theme={legacyTheme}>
<DAOCreatorRouter />
</ThemeProvider>
</CreatorProvider>
{/* <WarningFooter
text={
"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."
}
/> */}
</Route>
<Route path="/explorer">
<TZKTSubscriptionsProvider>
<DAOExplorerRouter />
</TZKTSubscriptionsProvider>
</Route>
<Route path="/lite">
<ThemeProvider theme={legacyTheme}>
<CommunityCreator />
</ThemeProvider>
</Route>
<Route path="/explorer">
<TZKTSubscriptionsProvider>
<DAOExplorerRouter />
</TZKTSubscriptionsProvider>

{window.location.href.indexOf("KT1PY9PXm8NMAgSEZg7bUtFjmV2Sj64bKuVV") !== -1 ? (
<>
{/* Special case for this DAO which was created before FA1.2 fix was created for the smart contract */}
<WarningFooter
text={
"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."
}
/>
</>
) : null}
<Footer></Footer>
</Route>
<Route path="/faq">
<FAQ />
</Route>
<Route path="/">
<Landing />
</Route>
<Redirect to="/" />
</Switch>
</Router>
</Box>
{window.location.href.indexOf("KT1PY9PXm8NMAgSEZg7bUtFjmV2Sj64bKuVV") !== -1 ? (
<>
{/* Special case for this DAO which was created before FA1.2 fix was created for the smart contract */}
<WarningFooter
text={
"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."
}
/>
</>
) : null}
<Footer></Footer>
</Route>
<Route path="/faq">
<FAQ />
</Route>
<Route path="/">
<Landing />
</Route>
<Redirect to="/" />
</Switch>
</Router>
</Box>
</LocalizationProvider>
</ActionSheetProvider>
</QueryClientProvider>
</SnackbarProvider>
Expand Down
3 changes: 3 additions & 0 deletions src/assets/img/full-dao.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/img/link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/assets/img/lite-dao.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/img/share.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/models/Choice.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export interface Choice {
_id?: string
name: string
pollID: string
walletAddresses: WalletAddress[]
selected?: boolean
}

export interface WalletAddress {
address: string
balanceAtReferenceBlock: string
}
26 changes: 26 additions & 0 deletions src/models/Community.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export interface Community {
_id: string
name: string
description: string
linkToTerms: string
members: string[]
tokenAddress: string
polls: string[]
tokenType?: string
symbol: string
tokenID: string
picUri: string
requiredTokenOwnership: boolean
allowPublicAccess: boolean
decimals?: string
network: string
}

export interface CommunityToken {
_id?: string
daoID: string
tokenID: number
symbol: string
tokenAddress: string
decimals: string
}
32 changes: 32 additions & 0 deletions src/models/Polls.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
export enum ProposalStatus {
ACTIVE = "active",
CLOSED = "closed"
}
export interface Poll {
_id?: string
daoID: string | undefined
description: string
name: string
referenceBlock?: string
startTime: string
endTime: string
totalSupplyAtReferenceBlock?: any
choices: string[]
externalLink: ""
author: string
isActive?: ProposalStatus
timeFormatted?: string
tokenSymbol?: string
tokenAddress?: string
tokenDecimals?: string
votes?: number
votingStrategy: number
endTimeMinutes?: number | null
endTimeHours?: number | null
endTimeDays?: number | null
}

export interface Vote {
address: string
balanceAtReferenceBlock: string
}
15 changes: 15 additions & 0 deletions src/models/Proposal.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export interface Proposal {
id?: string
title: string
description: string
externalLink: string
choices: string[]
startTime: number
endTime: number
daoID: string
}

interface Choice {
index: number
description: string
}
3 changes: 0 additions & 3 deletions src/models/Token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Network } from "services/beacon"
interface TokenParams {
id: string
contract: string
level: number
token_id: number
symbol: string
name: string
Expand Down Expand Up @@ -43,7 +42,6 @@ interface NFTParams extends TokenParams {
export class Token {
id: string
contract: string
level: number
token_id: number
symbol: string
name: string
Expand All @@ -55,7 +53,6 @@ export class Token {
constructor(params: TokenParams) {
this.id = params.id
this.contract = params.contract
this.level = params.level
this.token_id = params.token_id
this.symbol = params.symbol
this.name = params.name
Expand Down
12 changes: 12 additions & 0 deletions src/modules/common/GridContainer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Grid, styled } from "@material-ui/core"

export const GridContainer = styled(Grid)(({ theme }) => ({
minHeight: 145,
borderRadius: 8,
cursor: "pointer",
padding: "32px 46px",
background: theme.palette.primary.main,
[theme.breakpoints.down("sm")]: {
padding: "35px 25px"
}
}))
1 change: 1 addition & 0 deletions src/modules/common/MainButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const MainButton = styled(Button)(({ theme }) => ({
"boxShadow": "0px 0px 7px -2px rgba(0, 0, 0, 0.2)",
"transition": ".15s ease-in",
"background": theme.palette.secondary.main,
"textTransform": "none",

"&$disabled": {
boxShadow: "none"
Expand Down
1 change: 1 addition & 0 deletions src/modules/common/SmallButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const SmallButton = styled(Button)({
"fontSize": "16px",
"boxShadow": "0px 0px 7px -2px rgba(0, 0, 0, 0.2)",
"transition": ".15s ease-out",
"textTransform": "capitalize",

"&$disabled": {
boxShadow: "none"
Expand Down
4 changes: 2 additions & 2 deletions src/modules/common/TitleBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ export const TitleBlock: React.FC<Props> = ({ title = "", description, tooltip =
{" "}
{description}
</Typography>
) : (
) : description ? (
<CustomTypography variant="subtitle1" color="textSecondary">
{description}
</CustomTypography>
)}
) : null}
</Grid>
<Grid item xs={12}></Grid>
</StyledGrid>
Expand Down
1 change: 0 additions & 1 deletion src/modules/common/WarningFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export const WarningFooter: React.FC<{ text: string }> = ({ text }) => {

const closeButton = () => {
localStorage.setItem("warning-closed", "true")
console.log("warning-closed")
setOpen(false)
}

Expand Down
Loading

0 comments on commit ad0e2dd

Please sign in to comment.