Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch - Fixed the bug for MyDAOs #875

Merged
merged 3 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@types/react-paginate": "^7.1.2",
"@types/react-router-hash-link": "^2.4.5",
"@types/valid-url": "^1.0.4",
"@web3modal/wagmi": "^5.0.6",
"@wagmi/core": "2.13.4",
"assert": "^2.0.0",
"bignumber.js": "^9.0.1",
"blockies-ts": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/modules/creator/token/tezos/steps/Config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export const ConfigContract: React.FC = () => {
<Grid container direction="column">
<Grid>
<Title style={{ marginBottom: 32 }} color="textSecondary">
Configure Token ContractX
Configure Token Contract
</Title>
</Grid>

Expand Down
5 changes: 3 additions & 2 deletions src/modules/explorer/pages/DAOList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,12 @@ export const DAOList: React.FC = () => {
(formattedDao.symbol && formattedDao.symbol.toLowerCase().includes(searchText.toLowerCase()))
)
}
return formattedDAOs.filter(dao => dao.votingAddresses.includes(account))
const accountAddress = account || etherlink?.account?.address
return formattedDAOs.filter(dao => dao.votingAddresses.includes(accountAddress))
}

return []
}, [daos, searchText, account])
}, [daos, searchText, account, etherlink?.account?.address])

console.log({ daos, currentDAOs, myDAOs })

Expand Down
4 changes: 3 additions & 1 deletion src/modules/lite/explorer/components/DaoCardDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ const TermsText = styled(Link)(({ theme }) => ({
const CommunityText = styled(Typography)({
fontWeight: 500,
fontSize: 30,
lineHeight: "146.3%"
lineHeight: "146.3%",
margin: "auto",
textAlign: "center"
})

const CommunityDescription = styled(Typography)({
Expand Down
5 changes: 2 additions & 3 deletions src/modules/lite/explorer/components/DownloadCsvFile.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React, { useEffect, useState } from "react"
import { Button, Typography } from "@material-ui/core"
import { ReactComponent as DownloadCSVIcon } from "assets/img/download_csv.svg"
import { Choice, WalletAddress } from "models/Choice"
import { mkConfig, generateCsv, download, asString } from "export-to-csv"
import { writeFile } from "node:fs"
import { Choice } from "models/Choice"
import { mkConfig, generateCsv, download } from "export-to-csv"
import { useNotification } from "modules/lite/components/hooks/useNotification"

type DownloadCsvFileProps = {
Expand Down
2 changes: 0 additions & 2 deletions src/modules/lite/explorer/pages/ProposalDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ export const ProposalDetails: React.FC<{ id: string }> = ({ id }) => {
poll?.referenceBlock
)

console.log({ voteWeight })

const [votingPower, setVotingPower] = useState(poll?.isXTZ ? voteWeight?.votingXTZWeight : voteWeight?.votingWeight)

const choices = usePollChoices(poll, refresh)
Expand Down
10 changes: 1 addition & 9 deletions src/services/lite/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,7 @@ export const calculateProposalTotal = (choices: Choice[], decimals: any) => {
}

const getUsers = (options: Choice[]) => {
console.log("options", options)
const addresses: string[] = []

options.forEach(option => {
// TODO: ashutoshpw - Replace with wallet.address
option.walletAddresses.forEach(wallet => addresses.push((wallet as any)?._id))
})
// debugger

const addresses: string[] = options.flatMap(option => option.walletAddresses.map(wallet => (wallet as any)?.address))
return new Set(addresses)
}

Expand Down
Loading
Loading