Skip to content

Commit

Permalink
Merge pull request 0xBootleggers#96 from 0xBootleggers/develop
Browse files Browse the repository at this point in the history
If you gonna pop it you might as well mainline.
  • Loading branch information
earth2travis authored Sep 6, 2023
2 parents 63cdb67 + 2704a6b commit 0bb2718
Show file tree
Hide file tree
Showing 9 changed files with 1,133 additions and 593 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
"preview": "vite preview"
},
"dependencies": {
"@daohaus/connect": "^0.2.0-alpha.5",
"@daohaus/contract-utils": "^0.2.0-alpha.5",
"@daohaus/form-builder": "^0.2.0-alpha.5",
"@daohaus/tx-builder": "^0.2.0-alpha.5",
"@daohaus/ui": "^0.2.0-alpha.5",
"@daohaus/utils": "^0.2.0-alpha.5",
"@daohaus/moloch-v3-fields": "^0.2.0-alpha.5",
"@daohaus/moloch-v3-legos": "^0.2.0-alpha.5",
"@daohaus/moloch-v3-hooks": "^0.2.0-alpha.5",
"@daohaus/moloch-v3-macro-ui": "^0.2.0-alpha.5",
"@daohaus/connect": "^0.2.2",
"@daohaus/contract-utils": "^0.2.2",
"@daohaus/form-builder": "^0.2.2",
"@daohaus/tx-builder": "^0.2.2",
"@daohaus/ui": "^0.2.2",
"@daohaus/utils": "^0.2.2",
"@daohaus/moloch-v3-fields": "^0.2.2",
"@daohaus/moloch-v3-legos": "^0.2.2",
"@daohaus/moloch-v3-hooks": "^0.2.2",
"@daohaus/moloch-v3-macro-ui": "^0.2.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-query": "^3.39.3",
Expand Down
12 changes: 6 additions & 6 deletions src/components/ButtonRouterLink.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { ComponentProps } from "react";
import { Link as RouterLink } from "react-router-dom";
import styled from "styled-components";
import { Button } from "@daohaus/ui";
import React, { ComponentProps } from 'react';
import { Link as RouterLink } from 'react-router-dom';
import styled from 'styled-components';
import { Button } from '@daohaus/ui';

type ProfileLinkProps = {
href?: string;
to: string;
selected?: boolean;
disabled?: boolean;
linkType?: "internal" | "external" | "no-icon-external";
linkType?: 'internal' | 'external' | 'no-icon-external';
hideIcon?: boolean;
target?: string;
rel?: string;
Expand All @@ -33,7 +33,7 @@ export const ButtonRouterLink = ({
...buttonProps
}: ProfileLinkProps) => {
return (
<StyledRouterLink to={to} target={target} className="button-link" rel={rel}>
<StyledRouterLink to={to} target={target} className='button-link' rel={rel}>
<Button disabled={disabled} {...buttonProps}>
{children}
</Button>
Expand Down
12 changes: 6 additions & 6 deletions src/components/NewProposalList.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Link as RouterLink } from "react-router-dom";
import { RiArrowRightSLine } from "react-icons/ri/index.js";
import styled from "styled-components";
import { Bold, DataSm, ParMd } from "@daohaus/ui";
import { CustomFormLego } from "../legos/fieldConfig";
import { useCurrentDao } from "@daohaus/moloch-v3-hooks";
import { Link as RouterLink } from 'react-router-dom';
import { RiArrowRightSLine } from 'react-icons/ri/index.js';
import styled from 'styled-components';
import { Bold, DataSm, ParMd } from '@daohaus/ui';
import { CustomFormLego } from '../legos/fieldConfig';
import { useCurrentDao } from '@daohaus/moloch-v3-hooks';

const ListContainer = styled.div`
margin-top: 2.5rem;
Expand Down
10 changes: 0 additions & 10 deletions src/components/customFields/BufficornTributeInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,22 +100,12 @@ const fetchUserERC20 = async ({
return setFetchState(TokenFetchStates.NotValidNetwork);

const spenderAddress = CONTRACT_KEYCHAINS.TRIBUTE_MINION[chainId];
// const contract = createContract({
// address: tokenAddress,
// chainId,
// abi: LOCAL_ABI.ERC20,
// });

const client = createViemClient({
chainId,
});

try {
// const balance = await contract.balanceOf(userAddress);
// const decimals = await contract.decimals();
// const tokenName = await contract.name();
// const tokenSymbol = await contract.symbol();
// const allowance = await contract.allowance(userAddress, spenderAddress);
const balance = (await client.readContract({
abi: LOCAL_ABI.ERC20,
address: tokenAddress,
Expand Down
14 changes: 7 additions & 7 deletions src/pages/Member.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { BsArrowLeft, BsShareFill } from "react-icons/bs";
import styled from "styled-components";
import { BsArrowLeft, BsShareFill } from 'react-icons/bs';
import styled from 'styled-components';

import { useCurrentDao, useDaoMember } from "@daohaus/moloch-v3-hooks";
import { MemberProfileCard } from "@daohaus/moloch-v3-macro-ui";
import { useCurrentDao, useDaoMember } from '@daohaus/moloch-v3-hooks';
import { MemberProfileCard } from '@daohaus/moloch-v3-macro-ui';
import {
Button,
ParLg,
Expand All @@ -11,7 +11,7 @@ import {
useBreakpoint,
useToast,
widthQuery,
} from "@daohaus/ui";
} from '@daohaus/ui';

const ButtonsContainer = styled.div`
display: flex;
Expand Down Expand Up @@ -44,14 +44,14 @@ export const Member = () => {
const handleOnClick = () => {
navigator.clipboard.writeText(`${window.location.href}`);
successToast({
title: "URL copied to clipboard",
title: 'URL copied to clipboard',
});
};

if (!daoChain || !daoId) return <ParLg>DAO Not Found</ParLg>;

return (
<SingleColumnLayout title="Member Profile">
<SingleColumnLayout title='Member Profile'>
{!member && isFetching && <Loading size={12} />}
{!member && isFetched && <ParLg>Member Not Found</ParLg>}
{member && (
Expand Down
22 changes: 11 additions & 11 deletions src/pages/Members.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useCurrentDao } from "@daohaus/moloch-v3-hooks";
import { MemberList } from "@daohaus/moloch-v3-macro-ui";
import { useCurrentDao } from '@daohaus/moloch-v3-hooks';
import { MemberList } from '@daohaus/moloch-v3-macro-ui';
import {
SingleColumnLayout,
Loading,
useBreakpoint,
widthQuery,
} from "@daohaus/ui";
import { ButtonRouterLink } from "../components/ButtonRouterLink";
import styled from "styled-components";
} from '@daohaus/ui';
import { ButtonRouterLink } from '../components/ButtonRouterLink';
import styled from 'styled-components';

const Actions = styled.div`
display: flex;
Expand All @@ -30,28 +30,28 @@ export const Members = () => {

return (
<SingleColumnLayout
title="Partners"
title='Partners'
actions={
<Actions>
<ButtonRouterLink
to={`/molochv3/${daoChain}/${daoId}/new-proposal?formLego=ADD_PARTNER`}
color="secondary"
linkType="no-icon-external"
color='secondary'
linkType='no-icon-external'
>
Add Partner
</ButtonRouterLink>
<ButtonRouterLink
to={`/molochv3/${daoChain}/${daoId}/new-proposal?formLego=BECOME_PARTNER`}
color="secondary"
linkType="no-icon-external"
color='secondary'
linkType='no-icon-external'
>
Become Partner
</ButtonRouterLink>
</Actions>
}
>
{!daoChain || !daoId ? (
<Loading size={isMd ? 8 : 16} padding="6rem" />
<Loading size={isMd ? 8 : 16} padding='6rem' />
) : (
<MemberList
daoChain={daoChain}
Expand Down
16 changes: 8 additions & 8 deletions src/pages/Proposal.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
import styled from "styled-components";
import styled from 'styled-components';
import {
useConnectedMember,
useCurrentDao,
useDaoProposal,
} from "@daohaus/moloch-v3-hooks";
} from '@daohaus/moloch-v3-hooks';
import {
ProposalActionData,
ProposalActions,
ProposalDetails,
ProposalDetailsContainer,
ProposalHistory,
} from "@daohaus/moloch-v3-macro-ui";
import { BiColumnLayout, Card, ParLg, Loading, widthQuery } from "@daohaus/ui";
} from '@daohaus/moloch-v3-macro-ui';
import { BiColumnLayout, Card, ParLg, Loading, widthQuery } from '@daohaus/ui';
import {
DAO_METHOD_TO_PROPOSAL_TYPE,
getProposalTypeLabel,
PROPOSAL_TYPE_LABELS,
PROPOSAL_TYPE_WARNINGS,
SENSITIVE_PROPOSAL_TYPES,
TXLego,
} from "@daohaus/utils";
import { PROTECTED_TARGET } from "../targetDao";
import { useDHConnect } from "@daohaus/connect";
} from '@daohaus/utils';
import { PROTECTED_TARGET } from '../targetDao';
import { useDHConnect } from '@daohaus/connect';
import {
CUSTOM_APP_PROPOSAL_TYPE_LABELS,
CUSTOM_PROPOSAL_TYPE_WARNINGS,
} from "../utils/proposalData";
} from '../utils/proposalData';

const LoadingContainer = styled.div`
margin-top: 5rem;
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default ({ mode }) => {
NX_TARGET_KEY: process.env.VITE_TARGET_KEY,
NX_GNOSISSCAN_KEY: process.env.VITE_GNOSISSCAN_KEY,
NX_WALLET_CONNECT_ID: process.env.VITE_WALLET_CONNECT_ID,
NX_POLYGONPOS_ALCHEMY_KEY: process.env.VITE_POLYGONPOS_ALCHEMY_KEY,
NODE_ENV: '16.6.0',
},
},
Expand Down
Loading

0 comments on commit 0bb2718

Please sign in to comment.