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

Improved copies #23

Merged
merged 2 commits into from
Jul 30, 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 components/proposalActions/proposalActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { decodeCamelCase } from "@/utils/case";
import { formatEther } from "viem";

const DEFAULT_DESCRIPTION =
"When the proposal passes the community vote, the following actions will be executable on the DAO.";
"When the proposal passes the community vote, the following actions will be executable by the DAO.";
const DEFAULT_EMPTY_LIST_DESCRIPTION = "The proposal has no actions defined, it will behave as a signaling poll.";

interface IProposalActionsProps {
Expand Down
8 changes: 4 additions & 4 deletions plugins/emergency-multisig/hooks/useCreateProposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,27 @@ export function useCreateProposal() {
// Check metadata
if (!title.trim()) {
return addAlert("Invalid proposal details", {
description: "Please, enter a title",
description: "Please enter a title",
type: "error",
});
}

if (!summary.trim()) {
return addAlert("Invalid proposal details", {
description: "Please, enter a summary of what the proposal is about",
description: "Please enter a summary of what the proposal is about",
type: "error",
});
}

for (const item of resources) {
if (!item.name.trim()) {
return addAlert("Invalid resource name", {
description: "Please, enter a name for all the resources",
description: "Please enter a name for all the resources",
type: "error",
});
} else if (!UrlRegex.test(item.url.trim())) {
return addAlert("Invalid resource URL", {
description: "Please, enter valid URL for all the resources",
description: "Please enter valid URL for all the resources",
type: "error",
});
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/emergency-multisig/hooks/useProposal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function useProposal(proposalId: string, autoRefresh = false) {
const [proposalCreationEvent, setProposalCreationEvent] = useState<ProposalCreatedLogResponse["args"]>();
const { data: blockNumber } = useBlockNumber({ watch: true });

// Proposal on-chain data
// Proposal onchain data
const {
data: proposalResult,
error: proposalError,
Expand Down
10 changes: 5 additions & 5 deletions plugins/emergency-multisig/pages/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ export default function Create() {
</div>
<div className="mb-6">
<TextAreaRichText
label="Description"
label="Body"
className="pt-2"
value={description}
onChange={setDescription}
placeholder="A description for what the proposal is all about"
placeholder="A description of what the proposal is all about"
/>
</div>

Expand Down Expand Up @@ -223,7 +223,7 @@ export default function Create() {
<div className="mt-6 flex w-full flex-col items-center">
<div>
<span className="text-md mb-2 block font-normal text-neutral-700 ">
{signersWithPubKey || 0} signer(s) registered the public key
{signersWithPubKey || 0} signer(s) registered their public key
</span>
</div>
<Button
Expand Down Expand Up @@ -279,7 +279,7 @@ const PlaceHolderOr = ({
<ElseIf condition={!selfAddress || !isConnected}>
{/* Not connected */}
<MissingContentView callToAction="Connect wallet" onClick={() => open()}>
Please, connect your Ethereum wallet to continue.
Please connect your wallet to continue.
</MissingContentView>
</ElseIf>
<ElseIf condition={selfAddress && !hasPubKeyRegistered}>
Expand All @@ -297,7 +297,7 @@ const PlaceHolderOr = ({
<ElseIf condition={!publicKey}>
{/* Not signed in */}
<MissingContentView callToAction="Sign in to continue" onClick={() => requestSignature()}>
Please, sign in with your Ethereum wallet to decrypt the private proposal data.
Please sign in with your wallet to decrypt the private proposal data.
</MissingContentView>
</ElseIf>
<ElseIf condition={!canCreate}>
Expand Down
11 changes: 4 additions & 7 deletions plugins/emergency-multisig/pages/proposal-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,19 @@ export default function Proposals() {
<If condition={!isConnected}>
<Then>
<MissingContentView callToAction="Connect wallet" onClick={() => open()}>
Please, connect your Ethereum wallet to access the emergency proposals section.
Please connect your wallet to access the emergency proposals section.
</MissingContentView>
</Then>
<ElseIf condition={!publicKey}>
<MissingContentView callToAction="Sign in to continue" onClick={() => requestSignature()}>
Please, sign in with your Ethereum wallet to decrypt the private proposal data.
Please sign in with your wallet to decrypt the private proposal data.
</MissingContentView>
</ElseIf>
<ElseIf condition={!proposalCount}>
<MissingContentView>
No proposals have been created yet. <br />
Here you will see the proposals created by the Security Council before they can be submitted to the{" "}
<Link href="/plugins/community-proposals/#/" className="underline">
community voting stage
</Link>
. <If condition={canCreate}>Create your first proposal.</If>
Here you will see the proposals created by the Security Council before a super majority can enact an
emergency execution on the DAO. <If condition={canCreate}>Create your first proposal.</If>
</MissingContentView>
</ElseIf>
<Else>
Expand Down
6 changes: 3 additions & 3 deletions plugins/emergency-multisig/pages/proposal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ export default function ProposalDetail({ id: proposalId }: { id: string }) {
<Then>
<div className="mt-12">
<MissingContentView callToAction="Connect wallet" onClick={() => open()}>
Please, connect your Ethereum wallet to access the emergency proposals section.
Please connect your wallet to access the emergency proposals section.
</MissingContentView>
</div>
</Then>
<ElseIf condition={!publicKey}>
<div className="mt-12">
<MissingContentView callToAction="Sign in to continue" onClick={() => requestSignature()}>
Please, sign in with your Ethereum wallet to decrypt the private proposal data.
Please sign in with your wallet to decrypt the private proposal data.
</MissingContentView>
</div>
</ElseIf>
Expand All @@ -109,7 +109,7 @@ export default function ProposalDetail({ id: proposalId }: { id: string }) {
<BodySection body={proposal.description || "No description was provided"} />
<ProposalVoting
stages={proposalStage}
description="The on-chain emergency multisig flow allows its members to create proposals that, if approved by a super majority, will be executed directly on the DAO."
description="The onchain emergency multisig flow allows its members to create proposals that, if approved by a super majority, will be executed directly by the DAO."
/>
<ProposalActions actions={proposal.actions} />
</div>
Expand Down
8 changes: 4 additions & 4 deletions plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ export const plugins: PluginItem[] = [
pluginAddress: PUB_DUAL_GOVERNANCE_PLUGIN_ADDRESS,
},
{
id: "multisig-proposals",
id: "taiko-council",
folderName: "multisig",
title: "Security Council Multisig",
title: "Taiko Council",
// icon: IconType.BLOCKCHAIN_BLOCKCHAIN,
pluginAddress: PUB_MULTISIG_PLUGIN_ADDRESS,
hiddenIfNotSigner: true,
},
{
id: "emergency-proposals",
id: "security-council",
folderName: "emergency-multisig",
title: "Emergency Multisig",
title: "Security Council",
// icon: IconType.BLOCKCHAIN_BLOCKCHAIN,
pluginAddress: PUB_EMERGENCY_MULTISIG_PLUGIN_ADDRESS,
hiddenIfNotSigner: true,
Expand Down
2 changes: 1 addition & 1 deletion plugins/members/components/DelegateAnnouncementDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export const DelegateAnnouncementDialog: React.FC<IDelegateAnnouncementDialogPro
<div key={field.id} className="flex flex-col gap-y-3 py-3 md:py-4">
<div className="flex items-end gap-x-3">
<InputText
label="Description"
label="Body"
readOnly={isConfirming}
placeholder="GitHub, Twitter, etc."
{...register(`${DELEGATE_RESOURCES}.${index}.name` as const)}
Expand Down
9 changes: 5 additions & 4 deletions plugins/members/components/DelegateMemberList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,18 @@ function NoDelegatesView({ verified, filtered }: { verified?: boolean; filtered?
if (filtered) {
if (verified) {
message =
"There are no verified candidates matching the current filter. Please, try entering a different search term.";
"There are no verified delegate profiles matching the current filter. Please try entering a different search term.";
} else {
message = "There are no candidates matching the current filter. Please, try entering a different search term.";
message =
"There are no delegate profiles matching the current filter. Please try entering a different search term.";
}
} else {
if (verified) {
message =
"There are no verified candidates with a public an announcement yet. Here you will see the addresses of members who have posted their candidacy. Be the first to post an announcement.";
"There are no verified delegate profiles with a public an announcement yet. Here you will see the addresses of members who have posted their candidacy. Be the first to post an announcement.";
} else {
message =
"No candidates posted an announcement yet. Here you will see the addresses of members who have posted their candidacy. Be the first to post an announcement.";
"No delegate profiles posted an announcement yet. Here you will see the addresses of members who have posted their candidacy. Be the first to post an announcement.";
}
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/members/components/MultisigMemberList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const MultisigMemberList: React.FC<IMultisigMemberListProps> = () => {
function NoMembersView({ filtered }: { filtered?: boolean }) {
let message: string;
if (filtered) {
message = "There are no members matching the current filter. Please, try entering a different search term.";
message = "There are no members matching the current filter. Please try entering a different search term.";
} else {
message = "There are no multisig members yet. Here you will see the addresses of members who can create proposals.";
}
Expand Down
17 changes: 11 additions & 6 deletions plugins/members/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { useMultisigMembers } from "../hooks/useMultisigMembers";
const DELEGATION_DESCRIPTION =
"Proposals submitted to the community can be vetoed by token holders. Additionally, token holders can opt to delegate their voting power to delegates.";
const SECURITY_COUNCIL_DESCRIPTION =
"Proposals are created by the Security Council. When its members approve one, the proposal is forwarded to the Community Vote phase for ratification.";
"Proposals are created by the Security Council. When its members approve one, the proposal is forwarded to the community veto phase for ratification.";

export default function MembersList() {
const { open } = useWeb3Modal();
Expand All @@ -38,7 +38,7 @@ export default function MembersList() {
<MainSection>
<div className="flex w-full max-w-[1280] flex-col gap-x-10 gap-y-8 lg:flex-row">
<div className="flex flex-1 flex-col gap-y-6">
<div className="flex items-center justify-between">
<div className="flex items-start justify-between">
<If condition={toggleValue === "all" || toggleValue === "verified"}>
<Then>
<Heading size="h1">Delegates</Heading>
Expand All @@ -48,10 +48,15 @@ export default function MembersList() {
</Else>
</If>

<ToggleGroup isMultiSelect={false} onChange={onToggleChange} value={toggleValue}>
<Toggle value="all" label="Registered" />
<Toggle value="verified" label="Verified" />
<Toggle value="multisig" label="Security council" />
<ToggleGroup
isMultiSelect={false}
onChange={onToggleChange}
value={toggleValue}
className="flex justify-end"
>
<Toggle value="all" label="Registered" className="rounded-lg" />
<Toggle value="verified" label="Verified" className="rounded-lg" />
<Toggle value="multisig" label="Security council" className="rounded-lg" />
</ToggleGroup>
</div>
<If condition={toggleValue === "all" || toggleValue === "verified"}>
Expand Down
8 changes: 4 additions & 4 deletions plugins/multisig/hooks/useCreateProposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,27 @@ export function useCreateProposal() {
// Check metadata
if (!title.trim()) {
return addAlert("Invalid proposal details", {
description: "Please, enter a title",
description: "Please enter a title",
type: "error",
});
}

if (!summary.trim()) {
return addAlert("Invalid proposal details", {
description: "Please, enter a summary of what the proposal is about",
description: "Please enter a summary of what the proposal is about",
type: "error",
});
}

for (const item of resources) {
if (!item.name.trim()) {
return addAlert("Invalid resource name", {
description: "Please, enter a name for all the resources",
description: "Please enter a name for all the resources",
type: "error",
});
} else if (!UrlRegex.test(item.url.trim())) {
return addAlert("Invalid resource URL", {
description: "Please, enter valid URL for all the resources",
description: "Please enter valid URL for all the resources",
type: "error",
});
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/multisig/hooks/useProposal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function useProposal(proposalId: string, autoRefresh = false) {
const [proposalCreationEvent, setProposalCreationEvent] = useState<ProposalCreatedLogResponse["args"]>();
const { data: blockNumber } = useBlockNumber({ watch: true });

// Proposal on-chain data
// Proposal onchain data
const {
data: proposalResult,
error: proposalError,
Expand Down
6 changes: 3 additions & 3 deletions plugins/multisig/pages/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ export default function Create() {
</div>
<div className="mb-6">
<TextAreaRichText
label="Description"
label="Body"
className="pt-2"
value={description}
onChange={setDescription}
placeholder="A description for what the proposal is all about"
placeholder="A description of what the proposal is all about"
/>
</div>

Expand Down Expand Up @@ -247,7 +247,7 @@ const PlaceHolderOr = ({
<Then>
{/* Not connected */}
<MissingContentView callToAction="Connect wallet" onClick={() => open()}>
Please, connect your Ethereum wallet to continue.
Please connect your wallet to continue.
</MissingContentView>
</Then>
<ElseIf condition={!canCreate}>
Expand Down
6 changes: 3 additions & 3 deletions plugins/multisig/pages/proposal-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ export default function Proposals() {
<If condition={!isConnected}>
<Then>
<MissingContentView callToAction="Connect wallet" onClick={() => open()}>
Please, connect your Ethereum wallet to access the proposals section.
Please connect your wallet to access the proposals section.
</MissingContentView>
</Then>
<ElseIf condition={!proposalCount}>
<MissingContentView>
No proposals have been created yet. <br />
Here you will see the proposals created by the Security Council before they can be submitted to the{" "}
Here you will see the proposals created by the Taiko Council before they can be submitted to the{" "}
<Link href="/plugins/community-proposals/#/" className="underline">
community voting stage
community veto stage
</Link>
. <If condition={canCreate}>Create your first proposal.</If>
</MissingContentView>
Expand Down
2 changes: 1 addition & 1 deletion plugins/multisig/pages/proposal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default function ProposalDetail({ id: proposalId }: { id: string }) {
<BodySection body={proposal.description || "No description was provided"} />
<ProposalVoting
stages={proposalStage}
description="The on-chain multisig flow allows its members to create proposals that, if approved, will be moved to the Optimistic Proposal stage."
description="The onchain multisig flow allows its members to create proposals that, if approved, will be moved to the Optimistic Proposal stage."
/>
<ProposalActions actions={proposal.actions} />
</div>
Expand Down
2 changes: 1 addition & 1 deletion plugins/optimistic-proposals/hooks/useProposal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function useProposal(proposalId?: bigint, autoRefresh = false) {
const [proposalCreationEvent, setProposalCreationEvent] = useState<ProposalCreatedLogResponse["args"]>();
const { data: blockNumber } = useBlockNumber({ watch: true });

// Proposal on-chain data
// Proposal onchain data
const {
data: proposalResult,
error: proposalError,
Expand Down
3 changes: 1 addition & 2 deletions plugins/optimistic-proposals/pages/proposal-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ export default function Proposals() {
<MissingContentView>
No proposals have been created yet.
<br />
Here you will see the list of proposals approved by the Security Council which need to be ratified by the
community.
Here you will see the list of proposals initiated by the Security Council.
</MissingContentView>
</Else>
</If>
Expand Down
2 changes: 1 addition & 1 deletion plugins/optimistic-proposals/pages/proposal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default function ProposalDetail({ index: proposalIdx }: { index: number }
</If>
<ProposalVoting
stages={proposalStage}
description="The optimistic voting flow allows token holders to veto proposals to which they object. If not enough voting power has vetoed for a given period of time, the proposal will become executable on the DAO."
description="Proposals approved by the Security Council become eventually executable, unless the community reaches the veto threshold during the community veto stage."
/>
<ProposalActions actions={proposal.actions} />
</div>
Expand Down
Loading