Skip to content

Commit

Permalink
Merge pull request #12 from HausDAO/upgrade/v0.2.0
Browse files Browse the repository at this point in the history
wip upgrade to v0.2.0-alpha.0
  • Loading branch information
skuhlmann authored Aug 23, 2023
2 parents 7db3fa4 + 198814e commit 5dd463b
Show file tree
Hide file tree
Showing 9 changed files with 4,033 additions and 2,261 deletions.
22 changes: 20 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
# rivet key for rpc calls, you can also pass in custom rpcs to many components
VITE_RIVET_KEY=
VITE_ETHERSCAN_KEY=

# add your graph api key if using mainnet or gnosischain
VITE_GRAPH_API_KEY_MAINNET=
VITE_TARGET_KEY=

# key from wallet connect is required
VITE_WALLET_CONNECT_ID=

# optional will use rate limited if not set
VITE_OPTIMISM_ALCHEMY_KEY=
VITE_ARBITRUM_ALCHEMY_KEY=

# add blockexplorer api keys for any supported networks
VITE_ETHERSCAN_KEY=
VITE_ARBISCAN_KEY=
VITE_GNOSISSCAN_KEY=
VITE_POLYGONSCAN_KEY=
VITE_OPTIMISMSCAN_KEY=

# corresponds to keys in targetDao.ts if scoping app to a single dao
VITE_TARGET_KEY=
32 changes: 19 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
{
"name": "daohaus-vite-starter",
"name": "daohaus-dao-app-starter",
"private": true,
"version": "0.1.0",
"version": "0.2.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"@daohaus/connect": "^0.1.29",
"@daohaus/contract-utils": "^0.1.29",
"@daohaus/form-builder": "^0.1.29",
"@daohaus/moloch-v3-fields": "^0.0.6",
"@daohaus/moloch-v3-hooks": "^0.0.14",
"@daohaus/moloch-v3-legos": "^0.0.6",
"@daohaus/moloch-v3-macro-ui": "^0.0.14",
"@daohaus/tx-builder": "^0.1.29",
"@daohaus/ui": "^0.1.29",
"@daohaus/utils": "^0.1.29",
"@daohaus/abis": "^0.2.0",
"@daohaus/connect": "^0.2.0",
"@daohaus/connect-context": "^0.2.0",
"@daohaus/contract-utils": "^0.2.0",
"@daohaus/form-builder": "^0.2.0",
"@daohaus/form-builder-base": "^0.2.0",
"@daohaus/keychain-utils": "^0.2.0",
"@daohaus/moloch-v3-data": "^0.2.0",
"@daohaus/moloch-v3-fields": "^0.2.0",
"@daohaus/moloch-v3-hooks": "^0.2.0",
"@daohaus/moloch-v3-legos": "^0.2.0",
"@daohaus/moloch-v3-macro-ui": "^0.2.0",
"@daohaus/profile-data": "^0.2.0",
"@daohaus/tx-builder": "^0.2.0",
"@daohaus/ui": "^0.2.0",
"@daohaus/utils": "^0.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-query": "^3.39.3",
Expand All @@ -29,7 +35,7 @@
"@types/react-dom": "^18.0.7",
"@types/styled-components": "^5.1.26",
"@vitejs/plugin-react": "^2.2.0",
"typescript": "^4.6.4",
"typescript": "^5.0.4",
"vite": "^3.2.0"
}
}
4 changes: 2 additions & 2 deletions src/components/LayoutContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const LayoutContainer = () => {
proposalId: string;
memberAddress: string;
}>();
const { provider, address } = useDHConnect();
const { publicClient, address } = useDHConnect();
const { dao } = useDaoData({
daoId: TARGET_DAO[import.meta.env.VITE_TARGET_KEY].ADDRESS,
daoChain: TARGET_DAO[import.meta.env.VITE_TARGET_KEY].CHAIN_ID,
Expand Down Expand Up @@ -43,7 +43,7 @@ export const LayoutContainer = () => {
}}
>
<TXBuilder
provider={provider}
publicClient={publicClient}
chainId={TARGET_DAO[import.meta.env.VITE_TARGET_KEY].CHAIN_ID}
daoId={TARGET_DAO[import.meta.env.VITE_TARGET_KEY].ADDRESS}
safeId={TARGET_DAO[import.meta.env.VITE_TARGET_KEY].SAFE_ADDRESS}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Member.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Button,
ParLg,
SingleColumnLayout,
Spinner,
Loading,
useBreakpoint,
useToast,
widthQuery,
Expand Down Expand Up @@ -52,7 +52,7 @@ export const Member = () => {

return (
<SingleColumnLayout title="Member Profile">
{!member && isFetching && <Spinner size="12rem" />}
{!member && isFetching && <Loading size={12} />}
{!member && isFetched && <ParLg>Member Not Found</ParLg>}
{member && (
<>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Members.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useCurrentDao } from "@daohaus/moloch-v3-hooks";
import { MemberList } from "@daohaus/moloch-v3-macro-ui";
import {
SingleColumnLayout,
Spinner,
Loading,
useBreakpoint,
widthQuery,
} from "@daohaus/ui";
Expand All @@ -14,7 +14,7 @@ export const Members = () => {
return (
<SingleColumnLayout title="Members">
{!daoChain || !daoId ? (
<Spinner size={isMd ? "8rem" : "16rem"} padding="6rem" />
<Loading size={isMd ? 8 : 16} padding="6rem" />
) : (
<MemberList daoChain={daoChain} daoId={daoId} />
)}
Expand Down
7 changes: 4 additions & 3 deletions src/pages/Proposal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ProposalDetails,
ProposalHistory,
} from "@daohaus/moloch-v3-macro-ui";
import { BiColumnLayout, Card, ParLg, Spinner, widthQuery } from "@daohaus/ui";
import { BiColumnLayout, Card, ParLg, Loading, widthQuery } from "@daohaus/ui";
import {
getProposalTypeLabel,
PROPOSAL_TYPE_LABELS,
Expand Down Expand Up @@ -60,7 +60,7 @@ export const Proposal = () => {
if (!proposal)
return (
<LoadingContainer>
<Spinner size="6rem" />
<Loading size={6} />
</LoadingContainer>
);

Expand All @@ -78,14 +78,15 @@ export const Proposal = () => {
daoChain={daoChain}
daoId={daoId}
proposal={proposal}
decodeError={false}
includeLinks
/>
)}
<ProposalActionData
daoChain={daoChain}
daoId={daoId}
proposal={proposal}
txLegos={TX}
decodeError={false}
/>
</OverviewCard>
}
Expand Down
2 changes: 1 addition & 1 deletion src/targetDao.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ValidNetwork } from "@daohaus/keychain-utils";
import { ValidNetwork, VIEM_CHAINS } from "@daohaus/keychain-utils";

export const TARGET_DAO: {
[key: string]: {
Expand Down
23 changes: 22 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,29 @@ export default ({ mode }) => {
NX_GRAPH_API_KEY_MAINNET: process.env.VITE_GRAPH_API_KEY_MAINNET,
NX_INFURA_PROJECT_ID: process.env.VITE_INFURA_PROJECT_ID,
NX_ETHERSCAN_KEY: process.env.VITE_ETHERSCAN_KEY,
NODE_ENV: "16.6.0",
NX_ARBISCAN_KEY: process.env.VITE_ARBISCAN_KEY,
NX_GNOSISSCAN_KEY: process.env.VITE_GNOSISSCAN_KEY,
NX_POLYGONSCAN_KEY: process.env.VITE_POLYGONSCAN_KEY,
NX_OPTIMISMSCAN_KEY: process.env.VITE_OPTIMISMSCAN_KEY,
NX_WALLET_CONNECT_ID: process.env.VITE_WALLET_CONNECT_ID,
NX_OPTIMISM_ALCHEMY_KEY: process.env.VITE_OPTIMISM_ALCHEMY_KEY,
NX_ARBITRUM_ALCHEMY_KEY: process.env.VITE_ARBITRUM_ALCHEMY_KEY,
},
},
optimizeDeps: {
esbuildOptions: {
target: "es2020",
define: {
global: "globalThis",
},
supported: {
bigint: true,
},
},
},

build: {
target: ["es2020"],
},
});
};
Loading

0 comments on commit 5dd463b

Please sign in to comment.