From 5ca82d4660ea6f91ec5c6af7be878ed39471ef72 Mon Sep 17 00:00:00 2001
From: Noah Saso
Date: Fri, 21 Oct 2022 17:05:13 -0700
Subject: [PATCH] Moved proposal and voting module adapters into common
package.
---
apps/dapp/components/TokenCard.tsx | 2 +-
.../dao/tabs/TreasuryAndNftsTab.tsx | 8 ++---
.../profile/ProfileNewProposalCard.tsx | 4 +--
.../profile/ProfileProposalCard.tsx | 4 +--
apps/dapp/next.config.js | 2 --
apps/dapp/package.json | 2 --
apps/dapp/pages/dao/[address]/index.tsx | 6 ++--
.../dao/[address]/proposals/[proposalId].tsx | 8 ++---
.../pages/dao/[address]/proposals/create.tsx | 4 +--
apps/dapp/pages/wallet.tsx | 2 +-
package.json | 2 --
.../common/actions/actions/Instantiate.tsx | 2 +-
packages/common/actions/actions/Spend.tsx | 2 +-
packages/common/atoms/newDao.ts | 5 +--
packages/common/components/CreateDaoForm.tsx | 22 ++++++------
packages/common/components/DaoInfoBar.tsx | 6 ++--
packages/common/components/DaoPageWrapper.tsx | 2 +-
packages/common/components/ProposalLine.tsx | 11 +++---
packages/common/components/ProposalList.tsx | 5 +--
.../useEncodedCwdProposalSinglePrefill.ts | 9 ++---
packages/common/package.json | 5 +--
.../proposal-module-adapter/README.md | 10 +++---
.../common/actions/index.tsx | 0
...pdatePreProposeConfigComponent.stories.tsx | 0
.../UpdatePreProposeConfigComponent.tsx | 7 ++--
.../index.tsx | 2 +-
.../UpdateProposalConfigComponent.tsx | 21 +++++------
.../index.tsx | 2 +-
.../UpdateProposalConfigComponent.tsx | 21 +++++------
.../index.tsx | 2 +-
.../common/components/NewProposal.tsx | 6 ++--
.../common/components/index.tsx | 0
.../CwdProposalSingle/common/hooks/index.ts | 0
.../common/hooks/makeUseActions.ts | 2 +-
.../makeUseProfileNewProposalCardInfoLines.ts | 0
.../common/hooks/useProcessTQ.ts | 0
.../CwdProposalSingle/common/index.ts | 0
.../CwdProposalSingle/common/selectors.ts | 0
.../common/ui/NewProposal.stories.tsx | 6 ++--
.../common/ui/NewProposal.tsx | 22 ++++++------
.../components/ProposalActionDisplay.tsx | 2 +-
.../ProposalLine/ProposalStatus.tsx | 0
.../components/ProposalLine/index.tsx | 2 +-
.../components/ProposalStatusAndInfo.tsx | 2 +-
.../components/ProposalVoteTally.tsx | 0
.../components/ProposalVotes/VoteDisplay.tsx | 0
.../components/ProposalVotes/index.tsx | 2 +-
.../components/ProposalWalletVote.tsx | 0
.../CwdProposalSingle/components/index.tsx | 0
.../ui/ProposalVoteTally.stories.tsx | 0
.../components/ui/ProposalVoteTally.tsx | 16 ++++-----
.../contracts/CwProposalSingle.v1.client.ts | 0
.../contracts/CwProposalSingle.v1.hooks.ts | 0
.../contracts/CwProposalSingle.v1.recoil.ts | 0
.../contracts/CwdPreProposeSingle.client.ts | 0
.../contracts/CwdPreProposeSingle.hooks.ts | 0
.../contracts/CwdPreProposeSingle.recoil.ts | 0
.../CwdProposalSingle.common.recoil.ts | 0
.../contracts/CwdProposalSingle.v2.client.ts | 0
.../contracts/CwdProposalSingle.v2.hooks.ts | 0
.../contracts/CwdProposalSingle.v2.recoil.ts | 0
.../AllowRevotingVotingConfigItem.tsx | 0
.../ProposalDepositVotingConfigItem.tsx | 6 ++--
.../daoCreation/QuorumVotingConfigItem.tsx | 0
.../daoCreation/ThresholdVotingConfigItem.tsx | 0
.../VotingDurationVotingConfigItem.tsx | 0
.../daoCreation/getInstantiateInfo.ts | 6 ++--
.../CwdProposalSingle/daoCreation/index.tsx | 0
.../daoCreation/instantiate_schema.json | 0
.../pre_propose_instantiate_schema.json | 0
.../functions/fetchPreProposeAddress.ts | 0
.../CwdProposalSingle/functions/index.ts | 0
.../functions/makeGetProposalInfo.ts | 10 +++---
.../adapters/CwdProposalSingle/hooks/index.ts | 0
.../CwdProposalSingle/hooks/useCastVote.ts | 0
.../CwdProposalSingle/hooks/useDepositInfo.ts | 0
.../hooks/useProfileVoteCardOptions.ts | 0
.../CwdProposalSingle/hooks/useProposal.ts | 0
.../hooks/useProposalExecutionTxHash.ts | 0
.../hooks/useProposalProcessedTQ.ts | 0
.../hooks/useProposalRefreshers.ts | 0
.../CwdProposalSingle/hooks/useVotesInfo.ts | 0
.../hooks/useWalletVoteInfo.tsx | 0
.../adapters/CwdProposalSingle/index.tsx | 7 ++--
.../adapters/CwdProposalSingle/types.ts | 0
.../adapters/CwdProposalSingle/utils.ts | 0
.../adapters/index.tsx | 0
.../proposal-module-adapter/core.ts | 10 +++---
.../proposal-module-adapter/index.tsx | 1 -
.../proposal-module-adapter/react/context.ts | 2 +-
.../proposal-module-adapter/react/index.tsx | 0
.../react/provider.tsx | 8 ++---
.../proposal-module-adapter/recoil/index.ts | 0
.../recoil/selectors.ts | 0
.../proposal-module-adapter/tsconfig.json | 0
packages/common/selectors/dao.ts | 6 ++--
.../common/server/makeGetDaoStaticProps.ts | 16 +++++----
packages/common/tailwind.config.js | 5 +--
packages/common/utils/fetchProposalModules.ts | 10 +++---
.../voting-module-adapter/README.md | 10 +++---
.../CwdVotingCw20Staked/actions/index.tsx | 0
.../actions/makeMintAction/MintComponent.tsx | 5 +--
.../actions/makeMintAction/index.tsx | 0
.../ProfileCardMemberInfo/StakingModal.tsx | 4 +--
.../ProfileCardMemberInfo/index.tsx | 0
.../CwdVotingCw20Staked/components/index.tsx | 0
.../daoCreation/DisplayInfoIcon.tsx | 0
.../GovernanceConfigurationInput.tsx | 26 +++++++-------
.../GovernanceConfigurationReview.tsx | 4 +--
.../daoCreation/TierCard.stories.tsx | 2 +-
.../daoCreation/TierCard.tsx | 12 +++----
.../UnstakingDurationVotingConfigItem.tsx | 0
.../daoCreation/getInstantiateInfo.ts | 0
.../CwdVotingCw20Staked/daoCreation/index.tsx | 0
.../daoCreation/instantiate_schema.json | 0
.../CwdVotingCw20Staked/hooks/index.ts | 0
.../CwdVotingCw20Staked/hooks/useActions.ts | 2 +-
.../hooks/useDaoInfoBarItems.tsx | 0
.../hooks/useGovernanceTokenInfo.ts | 0
.../useProfileNewProposalCardAddresses.ts | 0
.../hooks/useStakingInfo.ts | 0
.../adapters/CwdVotingCw20Staked/index.tsx | 0
.../adapters/CwdVotingCw20Staked/types.ts | 0
.../adapters/CwdVotingCw4/actions/index.tsx | 0
.../ManageMembersComponent.tsx | 7 ++--
.../actions/makeManageMembersAction/index.tsx | 0
.../CwdVotingCw4/components/MembersTab.tsx | 8 ++---
.../components/ProfileCardMemberInfo.tsx | 0
.../CwdVotingCw4/components/index.tsx | 0
.../daoCreation/DisplayInfoIcon.tsx | 0
.../GovernanceConfigurationInput.tsx | 2 +-
.../GovernanceConfigurationReview.tsx | 0
.../daoCreation/TierCard.stories.tsx | 2 +-
.../CwdVotingCw4/daoCreation/TierCard.tsx | 12 +++----
.../daoCreation/getInstantiateInfo.ts | 0
.../CwdVotingCw4/daoCreation/index.tsx | 0
.../daoCreation/instantiate_schema.json | 0
.../adapters/CwdVotingCw4/hooks/index.ts | 0
.../adapters/CwdVotingCw4/hooks/useActions.ts | 2 +-
.../CwdVotingCw4/hooks/useDaoInfoBarItems.ts | 0
.../useProfileNewProposalCardAddresses.ts | 0
.../CwdVotingCw4/hooks/useVotingModule.ts | 0
.../adapters/CwdVotingCw4/index.tsx | 0
.../adapters/CwdVotingCw4/types.ts | 0
.../ui/ProfileCardMemberInfo.stories.tsx | 0
.../CwdVotingCw4/ui/ProfileCardMemberInfo.tsx | 2 +-
.../ProfileCardMemberInfo/StakingModal.tsx | 4 +--
.../ProfileCardMemberInfo/index.tsx | 0
.../components/index.tsx | 0
.../CwdVotingNativeStaked/hooks/index.ts | 0
.../hooks/useDaoInfoBarItems.tsx | 0
.../hooks/useGovernanceTokenInfo.ts | 0
.../hooks/useStakingInfo.ts | 0
.../adapters/CwdVotingNativeStaked/index.tsx | 0
.../adapters/Fallback/Placeholder.tsx | 7 ++--
.../adapters/Fallback/index.tsx | 0
.../voting-module-adapter/adapters/index.tsx | 0
.../ProfileCardMemberInfoTokens.stories.tsx | 0
.../ProfileCardMemberInfoTokens.tsx | 2 +-
.../components/index.tsx | 0
.../voting-module-adapter/core.ts | 10 +++---
.../voting-module-adapter/index.tsx | 1 -
.../voting-module-adapter/react/context.ts | 0
.../react/hooks/index.ts | 0
...Cw20GovernanceTokenInfoResponseIfExists.ts | 0
...tiveGovernanceTokenInfoResponseIfExists.ts | 0
.../voting-module-adapter/react/index.tsx | 0
.../voting-module-adapter/react/provider.tsx | 0
packages/proposal-module-adapter/.eslintrc.js | 10 ------
packages/proposal-module-adapter/LICENSE | 32 -----------------
packages/proposal-module-adapter/package.json | 33 -----------------
packages/proposal-module-adapter/types.ts | 1 -
.../components/StatusDisplay.stories.tsx | 2 +-
.../DaoCreateConfigInputCard.stories.tsx | 2 +-
.../DaoCreateConfigReviewCard.stories.tsx | 2 +-
.../dao/create/DaoStructureCard.stories.tsx | 2 +-
.../pages/CreateDaoGovernance.stories.tsx | 2 +-
.../create/pages/CreateDaoReview.stories.tsx | 4 +--
.../create/pages/CreateDaoStart.stories.tsx | 4 +--
.../create/pages/CreateDaoVoting.stories.tsx | 4 +--
.../profile/ProfileCantVoteCard.stories.tsx | 4 +--
.../profile/ProfileMemberCard.stories.tsx | 4 +--
.../profile/ProfileNotMemberCard.stories.tsx | 4 +--
.../profile/ProfileVotedCard.stories.tsx | 2 +-
.../ProposalLine.ProposalLine.stories.tsx | 2 +-
.../proposal/ProposalVotes.stories.tsx | 2 +-
.../proposal/ProposalWalletVote.stories.tsx | 2 +-
.../pages/CreateProposal.stories.tsx | 6 ++--
packages/stateless/pages/Proposal.stories.tsx | 4 +--
packages/stateless/pages/Wallet.stories.tsx | 2 +-
packages/stateless/tailwind.config.js | 5 +--
.../makeProposalModuleAdapterDecorator.tsx | 2 +-
packages/storybook/tailwind.config.js | 4 +--
packages/voting-module-adapter/.eslintrc.js | 10 ------
packages/voting-module-adapter/LICENSE | 32 -----------------
packages/voting-module-adapter/package.json | 35 -------------------
packages/voting-module-adapter/tsconfig.json | 5 ---
packages/voting-module-adapter/types.ts | 1 -
198 files changed, 256 insertions(+), 417 deletions(-)
rename packages/{ => common}/proposal-module-adapter/README.md (93%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/index.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/UpdatePreProposeConfigComponent.stories.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/UpdatePreProposeConfigComponent.tsx (96%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/index.tsx (98%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV1Action/UpdateProposalConfigComponent.tsx (91%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV1Action/index.tsx (99%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV2Action/UpdateProposalConfigComponent.tsx (91%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV2Action/index.tsx (99%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/components/NewProposal.tsx (98%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/components/index.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/index.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/makeUseActions.ts (92%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/makeUseProfileNewProposalCardInfoLines.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/useProcessTQ.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/index.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/selectors.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/ui/NewProposal.stories.tsx (94%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/common/ui/NewProposal.tsx (95%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/components/ProposalActionDisplay.tsx (98%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/components/ProposalLine/ProposalStatus.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/components/ProposalLine/index.tsx (97%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/components/ProposalStatusAndInfo.tsx (99%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/components/ProposalVoteTally.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/components/ProposalVotes/VoteDisplay.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/components/ProposalVotes/index.tsx (98%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/components/ProposalWalletVote.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/components/index.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/components/ui/ProposalVoteTally.stories.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/components/ui/ProposalVoteTally.tsx (93%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/contracts/CwProposalSingle.v1.client.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/contracts/CwProposalSingle.v1.hooks.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/contracts/CwProposalSingle.v1.recoil.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/contracts/CwdPreProposeSingle.client.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/contracts/CwdPreProposeSingle.hooks.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/contracts/CwdPreProposeSingle.recoil.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/contracts/CwdProposalSingle.common.recoil.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/contracts/CwdProposalSingle.v2.client.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/contracts/CwdProposalSingle.v2.hooks.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/contracts/CwdProposalSingle.v2.recoil.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/daoCreation/AllowRevotingVotingConfigItem.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/daoCreation/ProposalDepositVotingConfigItem.tsx (98%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/daoCreation/QuorumVotingConfigItem.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/daoCreation/ThresholdVotingConfigItem.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/daoCreation/VotingDurationVotingConfigItem.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/daoCreation/getInstantiateInfo.ts (96%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/daoCreation/index.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/daoCreation/instantiate_schema.json (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/daoCreation/pre_propose_instantiate_schema.json (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/functions/fetchPreProposeAddress.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/functions/index.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/functions/makeGetProposalInfo.ts (97%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/hooks/index.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/hooks/useCastVote.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/hooks/useDepositInfo.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/hooks/useProfileVoteCardOptions.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/hooks/useProposal.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/hooks/useProposalExecutionTxHash.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/hooks/useProposalProcessedTQ.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/hooks/useProposalRefreshers.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/hooks/useVotesInfo.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/hooks/useWalletVoteInfo.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/index.tsx (96%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/types.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/CwdProposalSingle/utils.ts (100%)
rename packages/{ => common}/proposal-module-adapter/adapters/index.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/core.ts (98%)
rename packages/{ => common}/proposal-module-adapter/index.tsx (80%)
rename packages/{ => common}/proposal-module-adapter/react/context.ts (97%)
rename packages/{ => common}/proposal-module-adapter/react/index.tsx (100%)
rename packages/{ => common}/proposal-module-adapter/react/provider.tsx (94%)
rename packages/{ => common}/proposal-module-adapter/recoil/index.ts (100%)
rename packages/{ => common}/proposal-module-adapter/recoil/selectors.ts (100%)
rename packages/{ => common}/proposal-module-adapter/tsconfig.json (100%)
rename packages/{ => common}/voting-module-adapter/README.md (96%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/actions/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/actions/makeMintAction/MintComponent.tsx (95%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/actions/makeMintAction/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/components/ProfileCardMemberInfo/StakingModal.tsx (98%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/components/ProfileCardMemberInfo/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/components/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/daoCreation/DisplayInfoIcon.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/daoCreation/GovernanceConfigurationInput.tsx (93%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/daoCreation/GovernanceConfigurationReview.tsx (96%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/daoCreation/TierCard.stories.tsx (96%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/daoCreation/TierCard.tsx (94%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/daoCreation/UnstakingDurationVotingConfigItem.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/daoCreation/getInstantiateInfo.ts (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/daoCreation/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/daoCreation/instantiate_schema.json (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/hooks/index.ts (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/hooks/useActions.ts (80%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/hooks/useDaoInfoBarItems.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/hooks/useGovernanceTokenInfo.ts (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/hooks/useProfileNewProposalCardAddresses.ts (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/hooks/useStakingInfo.ts (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw20Staked/types.ts (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/actions/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/actions/makeManageMembersAction/ManageMembersComponent.tsx (97%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/actions/makeManageMembersAction/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/components/MembersTab.tsx (91%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/components/ProfileCardMemberInfo.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/components/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/daoCreation/DisplayInfoIcon.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/daoCreation/GovernanceConfigurationInput.tsx (98%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/daoCreation/GovernanceConfigurationReview.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/daoCreation/TierCard.stories.tsx (96%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/daoCreation/TierCard.tsx (93%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/daoCreation/getInstantiateInfo.ts (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/daoCreation/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/daoCreation/instantiate_schema.json (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/hooks/index.ts (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/hooks/useActions.ts (81%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/hooks/useDaoInfoBarItems.ts (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/hooks/useProfileNewProposalCardAddresses.ts (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/hooks/useVotingModule.ts (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/types.ts (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/ui/ProfileCardMemberInfo.stories.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingCw4/ui/ProfileCardMemberInfo.tsx (94%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingNativeStaked/components/ProfileCardMemberInfo/StakingModal.tsx (98%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingNativeStaked/components/ProfileCardMemberInfo/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingNativeStaked/components/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingNativeStaked/hooks/index.ts (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingNativeStaked/hooks/useDaoInfoBarItems.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingNativeStaked/hooks/useGovernanceTokenInfo.ts (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingNativeStaked/hooks/useStakingInfo.ts (100%)
rename packages/{ => common}/voting-module-adapter/adapters/CwdVotingNativeStaked/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/Fallback/Placeholder.tsx (71%)
rename packages/{ => common}/voting-module-adapter/adapters/Fallback/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/adapters/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/components/ProfileCardMemberInfoTokens.stories.tsx (100%)
rename packages/{ => common}/voting-module-adapter/components/ProfileCardMemberInfoTokens.tsx (99%)
rename packages/{ => common}/voting-module-adapter/components/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/core.ts (98%)
rename packages/{ => common}/voting-module-adapter/index.tsx (75%)
rename packages/{ => common}/voting-module-adapter/react/context.ts (100%)
rename packages/{ => common}/voting-module-adapter/react/hooks/index.ts (100%)
rename packages/{ => common}/voting-module-adapter/react/hooks/useCw20GovernanceTokenInfoResponseIfExists.ts (100%)
rename packages/{ => common}/voting-module-adapter/react/hooks/useNativeGovernanceTokenInfoResponseIfExists.ts (100%)
rename packages/{ => common}/voting-module-adapter/react/index.tsx (100%)
rename packages/{ => common}/voting-module-adapter/react/provider.tsx (100%)
delete mode 100644 packages/proposal-module-adapter/.eslintrc.js
delete mode 100644 packages/proposal-module-adapter/LICENSE
delete mode 100644 packages/proposal-module-adapter/package.json
delete mode 100644 packages/proposal-module-adapter/types.ts
delete mode 100644 packages/voting-module-adapter/.eslintrc.js
delete mode 100644 packages/voting-module-adapter/LICENSE
delete mode 100644 packages/voting-module-adapter/package.json
delete mode 100644 packages/voting-module-adapter/tsconfig.json
delete mode 100644 packages/voting-module-adapter/types.ts
diff --git a/apps/dapp/components/TokenCard.tsx b/apps/dapp/components/TokenCard.tsx
index 4b8ea8d62..cc07f270e 100644
--- a/apps/dapp/components/TokenCard.tsx
+++ b/apps/dapp/components/TokenCard.tsx
@@ -5,8 +5,8 @@ import { useRouter } from 'next/router'
import { useCallback, useEffect } from 'react'
import { useSetRecoilState } from 'recoil'
-import { useActionForKey } from '@dao-dao/common/actions'
import { useEncodedCwdProposalSinglePrefill } from '@dao-dao/common'
+import { useActionForKey } from '@dao-dao/common/actions'
import {
refreshNativeTokenStakingInfoAtom,
tokenCardLazyStakingInfoSelector,
diff --git a/apps/dapp/components/dao/tabs/TreasuryAndNftsTab.tsx b/apps/dapp/components/dao/tabs/TreasuryAndNftsTab.tsx
index 230c21216..f0a1bbf82 100644
--- a/apps/dapp/components/dao/tabs/TreasuryAndNftsTab.tsx
+++ b/apps/dapp/components/dao/tabs/TreasuryAndNftsTab.tsx
@@ -7,6 +7,10 @@ import {
useEncodedCwdProposalSinglePrefill,
} from '@dao-dao/common'
import { useActionForKey } from '@dao-dao/common/actions'
+import {
+ useCw20GovernanceTokenInfoResponseIfExists,
+ useNativeGovernanceTokenInfoResponseIfExists,
+} from '@dao-dao/common/voting-module-adapter'
import {
nftCardInfosSelector,
treasuryTokenCardInfosSelector,
@@ -20,10 +24,6 @@ import {
} from '@dao-dao/stateless'
import { ActionKey } from '@dao-dao/types'
import { loadableToLoadingData } from '@dao-dao/utils'
-import {
- useCw20GovernanceTokenInfoResponseIfExists,
- useNativeGovernanceTokenInfoResponseIfExists,
-} from '@dao-dao/voting-module-adapter'
import { TokenCard } from '@/components'
diff --git a/apps/dapp/components/profile/ProfileNewProposalCard.tsx b/apps/dapp/components/profile/ProfileNewProposalCard.tsx
index 5ec1d21cf..a5f824d9a 100644
--- a/apps/dapp/components/profile/ProfileNewProposalCard.tsx
+++ b/apps/dapp/components/profile/ProfileNewProposalCard.tsx
@@ -4,14 +4,14 @@
import { useTranslation } from 'react-i18next'
import { SuspenseLoader } from '@dao-dao/common'
-import { matchAndLoadCommon } from '@dao-dao/proposal-module-adapter'
+import { matchAndLoadCommon } from '@dao-dao/common/proposal-module-adapter'
+import { useVotingModuleAdapter } from '@dao-dao/common/voting-module-adapter'
import { useWalletProfile } from '@dao-dao/state'
import {
ProfileNewProposalCard as StatelessProfileNewProposalCard,
useAppLayoutContext,
useDaoInfoContext,
} from '@dao-dao/stateless'
-import { useVotingModuleAdapter } from '@dao-dao/voting-module-adapter'
export interface ProfileNewProposalCardProps {
proposalModuleAdapterCommon: ReturnType
diff --git a/apps/dapp/components/profile/ProfileProposalCard.tsx b/apps/dapp/components/profile/ProfileProposalCard.tsx
index 3535ecfb2..614795965 100644
--- a/apps/dapp/components/profile/ProfileProposalCard.tsx
+++ b/apps/dapp/components/profile/ProfileProposalCard.tsx
@@ -8,7 +8,8 @@ import { useRecoilValue, waitForAll } from 'recoil'
import {
matchAndLoadCommon,
useProposalModuleAdapter,
-} from '@dao-dao/proposal-module-adapter'
+} from '@dao-dao/common/proposal-module-adapter'
+import { useVotingModuleAdapter } from '@dao-dao/common/voting-module-adapter'
import { useVotingModule, useWalletProfile } from '@dao-dao/state'
import {
Loader,
@@ -20,7 +21,6 @@ import {
useDaoInfoContext,
} from '@dao-dao/stateless'
import { CheckedDepositInfo } from '@dao-dao/types/contracts/common'
-import { useVotingModuleAdapter } from '@dao-dao/voting-module-adapter'
export interface ProfileProposalCardProps {
onVoteSuccess: () => void | Promise
diff --git a/apps/dapp/next.config.js b/apps/dapp/next.config.js
index c4dab2b1f..2cc8f8fd2 100644
--- a/apps/dapp/next.config.js
+++ b/apps/dapp/next.config.js
@@ -13,8 +13,6 @@ const withTM = require('next-transpile-modules')([
'@dao-dao/state',
'@dao-dao/common',
'@dao-dao/i18n',
- '@dao-dao/voting-module-adapter',
- '@dao-dao/proposal-module-adapter',
'@dao-dao/types',
])
diff --git a/apps/dapp/package.json b/apps/dapp/package.json
index 598315dd8..5ff1ba232 100644
--- a/apps/dapp/package.json
+++ b/apps/dapp/package.json
@@ -21,11 +21,9 @@
"@cosmjs/stargate": "0.28.10",
"@dao-dao/common": "2.0.1",
"@dao-dao/i18n": "2.0.1",
- "@dao-dao/proposal-module-adapter": "2.0.1",
"@dao-dao/types": "2.0.1",
"@dao-dao/stateless": "2.0.1",
"@dao-dao/utils": "2.0.1",
- "@dao-dao/voting-module-adapter": "2.0.1",
"@fontsource/inter": "^4.5.7",
"@fontsource/jetbrains-mono": "^4.5.5",
"@mui/icons-material": "^5.10.3",
diff --git a/apps/dapp/pages/dao/[address]/index.tsx b/apps/dapp/pages/dao/[address]/index.tsx
index b00cfb000..5a2ee5310 100644
--- a/apps/dapp/pages/dao/[address]/index.tsx
+++ b/apps/dapp/pages/dao/[address]/index.tsx
@@ -14,15 +14,16 @@ import {
waitForAll,
} from 'recoil'
-import { useActionForKey } from '@dao-dao/common/actions'
import {
DaoInfoBar,
DaoPageWrapper,
DaoPageWrapperProps,
useEncodedCwdProposalSinglePrefill,
} from '@dao-dao/common'
+import { useActionForKey } from '@dao-dao/common/actions'
+import { matchAndLoadCommon } from '@dao-dao/common/proposal-module-adapter'
import { makeGetDaoStaticProps } from '@dao-dao/common/server'
-import { matchAndLoadCommon } from '@dao-dao/proposal-module-adapter'
+import { useVotingModuleAdapter } from '@dao-dao/common/voting-module-adapter'
import {
CwdCoreV2Selectors,
usePinnedDaos,
@@ -42,7 +43,6 @@ import {
import { ActionKey } from '@dao-dao/types'
import { CheckedDepositInfo } from '@dao-dao/types/contracts/common'
import { SITE_URL } from '@dao-dao/utils'
-import { useVotingModuleAdapter } from '@dao-dao/voting-module-adapter'
import { ProposalsTab, SubDaosTab, TreasuryAndNftsTab } from '@/components'
diff --git a/apps/dapp/pages/dao/[address]/proposals/[proposalId].tsx b/apps/dapp/pages/dao/[address]/proposals/[proposalId].tsx
index 673fb038a..d5abf7a37 100644
--- a/apps/dapp/pages/dao/[address]/proposals/[proposalId].tsx
+++ b/apps/dapp/pages/dao/[address]/proposals/[proposalId].tsx
@@ -8,18 +8,19 @@ import { useCallback, useMemo } from 'react'
import toast from 'react-hot-toast'
import { useTranslation } from 'react-i18next'
-import { useActions } from '@dao-dao/common/actions'
import {
DaoPageWrapper,
DaoProposalPageWrapperProps,
Trans,
} from '@dao-dao/common'
-import { makeGetDaoProposalStaticProps } from '@dao-dao/common/server'
+import { useActions } from '@dao-dao/common/actions'
import {
CommonProposalInfo,
ProposalModuleAdapterProvider,
useProposalModuleAdapterContext,
-} from '@dao-dao/proposal-module-adapter'
+} from '@dao-dao/common/proposal-module-adapter'
+import { makeGetDaoProposalStaticProps } from '@dao-dao/common/server'
+import { useVotingModuleAdapter } from '@dao-dao/common/voting-module-adapter'
import { useProfile } from '@dao-dao/state'
import {
Loader,
@@ -31,7 +32,6 @@ import {
} from '@dao-dao/stateless'
import { ActionKey } from '@dao-dao/types'
import { SITE_URL } from '@dao-dao/utils'
-import { useVotingModuleAdapter } from '@dao-dao/voting-module-adapter'
import { ProfileProposalCard } from '@/components'
diff --git a/apps/dapp/pages/dao/[address]/proposals/create.tsx b/apps/dapp/pages/dao/[address]/proposals/create.tsx
index 6ff1f9f39..9ebb348cd 100644
--- a/apps/dapp/pages/dao/[address]/proposals/create.tsx
+++ b/apps/dapp/pages/dao/[address]/proposals/create.tsx
@@ -16,13 +16,13 @@ import {
DaoPageWrapperProps,
SuspenseLoader,
} from '@dao-dao/common'
-import { makeGetDaoStaticProps } from '@dao-dao/common/server'
import {
BaseNewProposalProps,
CwdProposalSingleAdapter,
matchAndLoadCommon,
matchAdapter as matchProposalModuleAdapter,
-} from '@dao-dao/proposal-module-adapter'
+} from '@dao-dao/common/proposal-module-adapter'
+import { makeGetDaoStaticProps } from '@dao-dao/common/server'
import {
proposalCreatedCardPropsAtom,
proposalDraftsAtom,
diff --git a/apps/dapp/pages/wallet.tsx b/apps/dapp/pages/wallet.tsx
index a6db4464c..543a3c9b6 100644
--- a/apps/dapp/pages/wallet.tsx
+++ b/apps/dapp/pages/wallet.tsx
@@ -9,8 +9,8 @@ import { useForm } from 'react-hook-form'
import { useTranslation } from 'react-i18next'
import { useRecoilState } from 'recoil'
-import { ActionsProvider, useActions } from '@dao-dao/common/actions'
import { SuspenseLoader } from '@dao-dao/common'
+import { ActionsProvider, useActions } from '@dao-dao/common/actions'
import { serverSideTranslations } from '@dao-dao/i18n/serverSideTranslations'
import { walletTransactionAtom } from '@dao-dao/state'
import {
diff --git a/package.json b/package.json
index c8e0dc8c2..eab28d325 100644
--- a/package.json
+++ b/package.json
@@ -18,8 +18,6 @@
"common": "yarn workspace @dao-dao/common",
"i18n": "yarn workspace @dao-dao/i18n",
"storybook": "yarn workspace @dao-dao/storybook",
- "proposal-module-adapter": "yarn workspace @dao-dao/proposal-module-adapter",
- "voting-module-adapter": "yarn workspace @dao-dao/voting-module-adapter",
"types": "yarn workspace @dao-dao/types"
},
"devDependencies": {
diff --git a/packages/common/actions/actions/Instantiate.tsx b/packages/common/actions/actions/Instantiate.tsx
index 847780519..3f3b5c496 100644
--- a/packages/common/actions/actions/Instantiate.tsx
+++ b/packages/common/actions/actions/Instantiate.tsx
@@ -4,7 +4,6 @@ import { useCallback, useMemo } from 'react'
import { useFormContext } from 'react-hook-form'
import { constSelector, useRecoilValue } from 'recoil'
-import { useProposalModuleAdapterIfAvailable } from '@dao-dao/proposal-module-adapter/react/context'
import {
nativeBalancesSelector,
transactionEventsSelector,
@@ -25,6 +24,7 @@ import {
makeWasmMessage,
} from '@dao-dao/utils'
+import { useProposalModuleAdapterIfAvailable } from '../../proposal-module-adapter/react/context'
import { InstantiateComponent as StatelessInstantiateComponent } from '../components/Instantiate'
interface InstantiateData {
diff --git a/packages/common/actions/actions/Spend.tsx b/packages/common/actions/actions/Spend.tsx
index 863f2120a..3a54f8d86 100644
--- a/packages/common/actions/actions/Spend.tsx
+++ b/packages/common/actions/actions/Spend.tsx
@@ -24,8 +24,8 @@ import {
makeWasmMessage,
nativeTokenDecimals,
} from '@dao-dao/utils'
-import { useCw20GovernanceTokenInfoResponseIfExists } from '@dao-dao/voting-module-adapter'
+import { useCw20GovernanceTokenInfoResponseIfExists } from '../../voting-module-adapter'
import { SpendComponent as StatelessSpendComponent } from '../components/Spend'
interface SpendData {
diff --git a/packages/common/atoms/newDao.ts b/packages/common/atoms/newDao.ts
index cd0756ac5..5d64db271 100644
--- a/packages/common/atoms/newDao.ts
+++ b/packages/common/atoms/newDao.ts
@@ -1,9 +1,10 @@
import { atom, atomFamily } from 'recoil'
-import { CwdProposalSingleAdapter } from '@dao-dao/proposal-module-adapter/adapters/CwdProposalSingle'
import { localStorageEffectJSON } from '@dao-dao/state/recoil/effects'
import { DaoCreatedCardProps, NewDao } from '@dao-dao/types'
-import { CwdVotingCw4Adapter } from '@dao-dao/voting-module-adapter'
+
+import { CwdProposalSingleAdapter } from '../proposal-module-adapter/adapters/CwdProposalSingle'
+import { CwdVotingCw4Adapter } from '../voting-module-adapter'
export const DefaultNewDao: NewDao = {
name: '',
diff --git a/packages/common/components/CreateDaoForm.tsx b/packages/common/components/CreateDaoForm.tsx
index d96fdd94f..d1f5af7c8 100644
--- a/packages/common/components/CreateDaoForm.tsx
+++ b/packages/common/components/CreateDaoForm.tsx
@@ -9,10 +9,6 @@ import toast from 'react-hot-toast'
import { useTranslation } from 'react-i18next'
import { useRecoilState } from 'recoil'
-import {
- ProposalModuleAdapter,
- getAdapterById as getProposalModuleAdapterById,
-} from '@dao-dao/proposal-module-adapter'
import {
CwAdminFactoryHooks,
useAwaitNextBlock,
@@ -33,6 +29,7 @@ import {
CreateDaoCustomValidator,
DaoParentInfo,
NewDao,
+ ProposalModuleAdapter,
} from '@dao-dao/types'
import { InstantiateMsg as CwdCoreV2InstantiateMsg } from '@dao-dao/types/contracts/CwdCore.v2'
import instantiateSchema from '@dao-dao/types/contracts/CwdCore.v2.instantiate_schema.json'
@@ -51,21 +48,22 @@ import {
processError,
validateUrl,
} from '@dao-dao/utils'
+
+import {
+ DefaultNewDao,
+ daoCreatedCardPropsAtom,
+ newDaoAtom,
+} from '../atoms/newDao'
+import { getAdapterById as getProposalModuleAdapterById } from '../proposal-module-adapter'
import {
CwdVotingCw20StakedAdapter,
getAdapterById as getVotingModuleAdapterById,
getAdapters as getVotingModuleAdapters,
-} from '@dao-dao/voting-module-adapter'
+} from '../voting-module-adapter'
import {
DaoCreationConfig as CwdVotingCw20StakedCreationConfig,
GovernanceTokenType,
-} from '@dao-dao/voting-module-adapter/adapters/CwdVotingCw20Staked/types'
-
-import {
- DefaultNewDao,
- daoCreatedCardPropsAtom,
- newDaoAtom,
-} from '../atoms/newDao'
+} from '../voting-module-adapter/adapters/CwdVotingCw20Staked/types'
import { SuspenseLoader } from './SuspenseLoader'
// i18n keys
diff --git a/packages/common/components/DaoInfoBar.tsx b/packages/common/components/DaoInfoBar.tsx
index da2c4f891..850de11fd 100644
--- a/packages/common/components/DaoInfoBar.tsx
+++ b/packages/common/components/DaoInfoBar.tsx
@@ -12,12 +12,12 @@ import {
useDaoInfoContext,
} from '@dao-dao/stateless'
import { loadableToLoadingData } from '@dao-dao/utils'
+
import {
useCw20GovernanceTokenInfoResponseIfExists,
useVotingModuleAdapter,
-} from '@dao-dao/voting-module-adapter'
-import { useVotingModuleAdapterOptions } from '@dao-dao/voting-module-adapter/react/context'
-
+} from '../voting-module-adapter'
+import { useVotingModuleAdapterOptions } from '../voting-module-adapter/react/context'
import { SuspenseLoader } from './SuspenseLoader'
export const DaoInfoBar = (props: InnerDaoInfoBarProps) => {
diff --git a/packages/common/components/DaoPageWrapper.tsx b/packages/common/components/DaoPageWrapper.tsx
index bb5f8fe42..f3488e2bc 100644
--- a/packages/common/components/DaoPageWrapper.tsx
+++ b/packages/common/components/DaoPageWrapper.tsx
@@ -19,9 +19,9 @@ import {
DaoInfo,
DaoInfoSerializable,
} from '@dao-dao/types'
-import { VotingModuleAdapterProvider } from '@dao-dao/voting-module-adapter'
import { ActionsProvider } from '../actions'
+import { VotingModuleAdapterProvider } from '../voting-module-adapter'
import { SuspenseLoader } from './SuspenseLoader'
import { Trans } from './Trans'
diff --git a/packages/common/components/ProposalLine.tsx b/packages/common/components/ProposalLine.tsx
index 1be832b80..670a3beaa 100644
--- a/packages/common/components/ProposalLine.tsx
+++ b/packages/common/components/ProposalLine.tsx
@@ -1,10 +1,5 @@
import { ComponentType } from 'react'
-import { SuspenseLoader } from '@dao-dao/common'
-import {
- ProposalModuleAdapterProvider,
- useProposalModuleAdapter,
-} from '@dao-dao/proposal-module-adapter'
import {
Loader as DefaultLoader,
Logo as DefaultLogo,
@@ -14,6 +9,12 @@ import {
} from '@dao-dao/stateless'
import { ProposalModule } from '@dao-dao/types'
+import {
+ ProposalModuleAdapterProvider,
+ useProposalModuleAdapter,
+} from '../proposal-module-adapter'
+import { SuspenseLoader } from './SuspenseLoader'
+
export interface ProposalLineProps {
chainId: string
coreAddress: string
diff --git a/packages/common/components/ProposalList.tsx b/packages/common/components/ProposalList.tsx
index 29f6733e9..f46a381b0 100644
--- a/packages/common/components/ProposalList.tsx
+++ b/packages/common/components/ProposalList.tsx
@@ -4,8 +4,6 @@
import { useEffect, useMemo, useState } from 'react'
import { useRecoilCallback } from 'recoil'
-import { ProposalLine, ProposalLineProps } from '@dao-dao/common'
-import { matchAndLoadCommon } from '@dao-dao/proposal-module-adapter'
import { useVotingModule } from '@dao-dao/state'
import {
Loader,
@@ -14,6 +12,9 @@ import {
useDaoInfoContext,
} from '@dao-dao/stateless'
+import { matchAndLoadCommon } from '../proposal-module-adapter'
+import { ProposalLine, ProposalLineProps } from './ProposalLine'
+
// Contracts enforce a max of 30, though this is on the edge for DAOs with
// proposals that have a large size.
const PROP_LOAD_LIMIT = 20
diff --git a/packages/common/hooks/useEncodedCwdProposalSinglePrefill.ts b/packages/common/hooks/useEncodedCwdProposalSinglePrefill.ts
index 72f9efaba..13b4479b4 100644
--- a/packages/common/hooks/useEncodedCwdProposalSinglePrefill.ts
+++ b/packages/common/hooks/useEncodedCwdProposalSinglePrefill.ts
@@ -1,10 +1,11 @@
+import { useDaoInfoContext } from '@dao-dao/stateless'
+import { Action, ProposalPrefill } from '@dao-dao/types'
+
import {
CwdProposalSingleAdapter,
matchAdapter as matchProposalModuleAdapter,
-} from '@dao-dao/proposal-module-adapter'
-import { NewProposalForm } from '@dao-dao/proposal-module-adapter/adapters/CwdProposalSingle/types'
-import { useDaoInfoContext } from '@dao-dao/stateless'
-import { Action, ProposalPrefill } from '@dao-dao/types'
+} from '../proposal-module-adapter'
+import { NewProposalForm } from '../proposal-module-adapter/adapters/CwdProposalSingle/types'
interface ActionAndData {
action: Action
diff --git a/packages/common/package.json b/packages/common/package.json
index 23cbe3f3f..2169f9434 100644
--- a/packages/common/package.json
+++ b/packages/common/package.json
@@ -8,17 +8,17 @@
"dependencies": {
"@cosmjs/encoding": "0.28.10",
"@cosmjs/stargate": "0.28.10",
- "@dao-dao/proposal-module-adapter": "2.0.1",
"@dao-dao/state": "2.0.1",
"@dao-dao/stateless": "2.0.1",
"@dao-dao/utils": "2.0.1",
- "@dao-dao/voting-module-adapter": "2.0.1",
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@mui/icons-material": "^5.10.3",
"@mui/material": "^5.10.3",
"@walletconnect/browser-utils": "^1.8.0",
"axios": "^0.26.1",
+ "a11y-react-emoji": "^1.2.0",
+ "buffer": "^6.0.3",
"clsx": "^1.1.1",
"fuse.js": "^6.6.2",
"i18next": "^21.8.10",
@@ -28,6 +28,7 @@
"react-hook-form": "7.20.4",
"react-hot-toast": "^2.1.1",
"react-i18next": "^11.0.0",
+ "react-timeago": "^7.1.0",
"recoil": "^0.7.2",
"remove-markdown": "^0.5.0"
},
diff --git a/packages/proposal-module-adapter/README.md b/packages/common/proposal-module-adapter/README.md
similarity index 93%
rename from packages/proposal-module-adapter/README.md
rename to packages/common/proposal-module-adapter/README.md
index aca2fd2db..ee69d1396 100644
--- a/packages/proposal-module-adapter/README.md
+++ b/packages/common/proposal-module-adapter/README.md
@@ -1,4 +1,4 @@
-# @dao-dao/proposal-module-adapter
+# @dao-dao/common/proposal-module-adapter
Author: [@NoahSaso](https://github.com/NoahSaso)
@@ -34,7 +34,7 @@ of the DAO's core contract, as well as some commonly used components, like
`Logo` and `Loader`.
```tsx
-import { ProposalModuleAdapterProvider } from '@dao-dao/proposal-module-adapter'
+import { ProposalModuleAdapterProvider } from '@dao-dao/common/proposal-module-adapter'
const App = () => (
{
const {
@@ -87,7 +87,7 @@ Here is an example that displays a dropdown of proposal modules and lets you
view the voting configuration for each one:
```tsx
-import { matchAndLoadCommon } from '@dao-dao/proposal-module-adapter'
+import { matchAndLoadCommon } from '@dao-dao/common/proposal-module-adapter'
export const DaoInfo = () => {
const { coreAddress, proposalModules } = useDaoInfoContext()
@@ -137,7 +137,7 @@ All you need to do is define an adapter object and add it to the list of
adapters in `core.ts`.
```ts
-import { ProposalModuleAdapter } from '@dao-dao/proposal-module-adapter/types'
+import { ProposalModuleAdapter } from '@dao-dao/types/proposal-module-adapter'
const MyProposalModuleAdapter: ProposalModuleAdapter = {
id: 'my_proposal_module_adapter_id',
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/index.tsx b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/index.tsx
similarity index 100%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/index.tsx
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/index.tsx
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/UpdatePreProposeConfigComponent.stories.tsx b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/UpdatePreProposeConfigComponent.stories.tsx
similarity index 100%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/UpdatePreProposeConfigComponent.stories.tsx
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/UpdatePreProposeConfigComponent.stories.tsx
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/UpdatePreProposeConfigComponent.tsx b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/UpdatePreProposeConfigComponent.tsx
similarity index 96%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/UpdatePreProposeConfigComponent.tsx
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/UpdatePreProposeConfigComponent.tsx
index 9dd95820f..4f12d6d78 100644
--- a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/UpdatePreProposeConfigComponent.tsx
+++ b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/UpdatePreProposeConfigComponent.tsx
@@ -1,8 +1,6 @@
import { useFormContext } from 'react-hook-form'
import { useTranslation } from 'react-i18next'
-import { ActionCard } from '@dao-dao/common/actions'
-import { Trans } from '@dao-dao/common'
import {
AddressInput,
FormSwitchCard,
@@ -26,6 +24,9 @@ import {
validateRequired,
} from '@dao-dao/utils'
+import { ActionCard } from '../../../../../../actions'
+import { Trans } from '../../../../../../components/Trans'
+
const DepositRefundPolicyValues = Object.values(DepositRefundPolicy)
export interface UpdatePreProposeConfigData {
@@ -93,7 +94,7 @@ export const UpdatePreProposeConfigComponent: ActionComponent<
-
+
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/index.tsx b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/index.tsx
similarity index 98%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/index.tsx
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/index.tsx
index 812c698c8..0ec5df144 100644
--- a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/index.tsx
+++ b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdatePreProposeConfigAction/index.tsx
@@ -27,8 +27,8 @@ import {
isValidContractAddress,
makeWasmMessage,
} from '@dao-dao/utils'
-import { useCw20GovernanceTokenInfoResponseIfExists } from '@dao-dao/voting-module-adapter/react/hooks'
+import { useCw20GovernanceTokenInfoResponseIfExists } from '../../../../../../voting-module-adapter/react/hooks/useCw20GovernanceTokenInfoResponseIfExists'
import { configSelector } from '../../../contracts/CwdPreProposeSingle.recoil'
import {
UpdatePreProposeConfigComponent,
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV1Action/UpdateProposalConfigComponent.tsx b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV1Action/UpdateProposalConfigComponent.tsx
similarity index 91%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV1Action/UpdateProposalConfigComponent.tsx
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV1Action/UpdateProposalConfigComponent.tsx
index fd037655c..b02556ff5 100644
--- a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV1Action/UpdateProposalConfigComponent.tsx
+++ b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV1Action/UpdateProposalConfigComponent.tsx
@@ -2,8 +2,6 @@ import Emoji from 'a11y-react-emoji'
import { useFormContext } from 'react-hook-form'
import { useTranslation } from 'react-i18next'
-import { ActionCard } from '@dao-dao/common/actions'
-import { Trans } from '@dao-dao/common'
import {
FormSwitch,
FormSwitchCard,
@@ -21,6 +19,9 @@ import {
validateRequired,
} from '@dao-dao/utils'
+import { ActionCard } from '../../../../../../actions'
+import { Trans } from '../../../../../../components/Trans'
+
export interface UpdateProposalConfigOptions {
governanceTokenSymbol?: string
}
@@ -74,7 +75,7 @@ export const UpdateProposalConfigComponent: ActionComponent<
{governanceTokenSymbol !== undefined && (
-
+
)}
-
+
{depositRequired && (
-
+
{' '}
@@ -143,7 +144,7 @@ export const UpdateProposalConfigComponent: ActionComponent<
/>
-
+
)}
-
+
{' '}
@@ -215,7 +216,7 @@ export const UpdateProposalConfigComponent: ActionComponent<
-
+
@@ -272,7 +273,7 @@ export const UpdateProposalConfigComponent: ActionComponent<
)}
-
+
{' '}
@@ -343,7 +344,7 @@ export const UpdateProposalConfigComponent: ActionComponent<
-
+
{' '}
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV1Action/index.tsx b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV1Action/index.tsx
similarity index 99%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV1Action/index.tsx
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV1Action/index.tsx
index a9a6c5255..081761567 100644
--- a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV1Action/index.tsx
+++ b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV1Action/index.tsx
@@ -19,8 +19,8 @@ import {
convertMicroDenomToDenomWithDecimals,
makeWasmMessage,
} from '@dao-dao/utils'
-import { useVotingModuleAdapter } from '@dao-dao/voting-module-adapter'
+import { useVotingModuleAdapter } from '../../../../../../voting-module-adapter'
import { configSelector } from '../../../contracts/CwProposalSingle.v1.recoil'
import { UpdateProposalConfigComponent } from './UpdateProposalConfigComponent'
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV2Action/UpdateProposalConfigComponent.tsx b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV2Action/UpdateProposalConfigComponent.tsx
similarity index 91%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV2Action/UpdateProposalConfigComponent.tsx
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV2Action/UpdateProposalConfigComponent.tsx
index fd037655c..b02556ff5 100644
--- a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV2Action/UpdateProposalConfigComponent.tsx
+++ b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV2Action/UpdateProposalConfigComponent.tsx
@@ -2,8 +2,6 @@ import Emoji from 'a11y-react-emoji'
import { useFormContext } from 'react-hook-form'
import { useTranslation } from 'react-i18next'
-import { ActionCard } from '@dao-dao/common/actions'
-import { Trans } from '@dao-dao/common'
import {
FormSwitch,
FormSwitchCard,
@@ -21,6 +19,9 @@ import {
validateRequired,
} from '@dao-dao/utils'
+import { ActionCard } from '../../../../../../actions'
+import { Trans } from '../../../../../../components/Trans'
+
export interface UpdateProposalConfigOptions {
governanceTokenSymbol?: string
}
@@ -74,7 +75,7 @@ export const UpdateProposalConfigComponent: ActionComponent<
{governanceTokenSymbol !== undefined && (
-
+
)}
-
+
{depositRequired && (
-
+
{' '}
@@ -143,7 +144,7 @@ export const UpdateProposalConfigComponent: ActionComponent<
/>
-
+
)}
-
+
{' '}
@@ -215,7 +216,7 @@ export const UpdateProposalConfigComponent: ActionComponent<
-
+
@@ -272,7 +273,7 @@ export const UpdateProposalConfigComponent: ActionComponent<
)}
-
+
{' '}
@@ -343,7 +344,7 @@ export const UpdateProposalConfigComponent: ActionComponent<
-
+
{' '}
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV2Action/index.tsx b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV2Action/index.tsx
similarity index 99%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV2Action/index.tsx
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV2Action/index.tsx
index fe740f23c..b34966a56 100644
--- a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV2Action/index.tsx
+++ b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/actions/makeUpdateProposalConfigV2Action/index.tsx
@@ -15,8 +15,8 @@ import {
import { Threshold } from '@dao-dao/types/contracts/CwdProposalSingle.common'
import { ExecuteMsg } from '@dao-dao/types/contracts/CwdProposalSingle.v2'
import { makeWasmMessage } from '@dao-dao/utils'
-import { useVotingModuleAdapter } from '@dao-dao/voting-module-adapter'
+import { useVotingModuleAdapter } from '../../../../../../voting-module-adapter'
import { configSelector } from '../../../contracts/CwdProposalSingle.v2.recoil'
import { UpdateProposalConfigComponent } from './UpdateProposalConfigComponent'
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/components/NewProposal.tsx b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/components/NewProposal.tsx
similarity index 98%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/components/NewProposal.tsx
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/components/NewProposal.tsx
index f7a41d68d..863a25943 100644
--- a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/components/NewProposal.tsx
+++ b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/components/NewProposal.tsx
@@ -13,7 +13,6 @@ import {
useSetRecoilState,
} from 'recoil'
-import { useActions } from '@dao-dao/common/actions'
import {
Cw20BaseHooks,
Cw20BaseSelectors,
@@ -29,6 +28,7 @@ import { useCachedLoadable, useDaoInfoContext } from '@dao-dao/stateless'
import {
Action,
ActionKey,
+ BaseNewProposalProps,
ContractVersion,
UseDefaults,
UseTransformToCosmos,
@@ -39,9 +39,9 @@ import {
expirationExpired,
processError,
} from '@dao-dao/utils'
-import { useVotingModuleAdapter } from '@dao-dao/voting-module-adapter'
-import { BaseNewProposalProps } from '../../../../types'
+import { useActions } from '../../../../../actions'
+import { useVotingModuleAdapter } from '../../../../../voting-module-adapter'
import { usePropose as useProposePrePropose } from '../../contracts/CwdPreProposeSingle.hooks'
import { proposalSelector } from '../../contracts/CwdProposalSingle.common.recoil'
import { usePropose as useProposeV2 } from '../../contracts/CwdProposalSingle.v2.hooks'
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/components/index.tsx b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/components/index.tsx
similarity index 100%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/components/index.tsx
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/components/index.tsx
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/index.ts b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/index.ts
similarity index 100%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/index.ts
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/index.ts
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/makeUseActions.ts b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/makeUseActions.ts
similarity index 92%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/makeUseActions.ts
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/makeUseActions.ts
index c5101e5a7..e6248abde 100644
--- a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/makeUseActions.ts
+++ b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/makeUseActions.ts
@@ -1,8 +1,8 @@
import { useMemo } from 'react'
-import { useActionOptions } from '@dao-dao/common/actions/react/context'
import { Action, IProposalModuleAdapterCommonOptions } from '@dao-dao/types'
+import { useActionOptions } from '../../../../../actions'
import {
makeUpdatePreProposeConfigAction,
makeUpdateProposalConfigV1Action,
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/makeUseProfileNewProposalCardInfoLines.ts b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/makeUseProfileNewProposalCardInfoLines.ts
similarity index 100%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/makeUseProfileNewProposalCardInfoLines.ts
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/makeUseProfileNewProposalCardInfoLines.ts
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/useProcessTQ.ts b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/useProcessTQ.ts
similarity index 100%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/useProcessTQ.ts
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/hooks/useProcessTQ.ts
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/index.ts b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/index.ts
similarity index 100%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/index.ts
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/index.ts
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/selectors.ts b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/selectors.ts
similarity index 100%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/selectors.ts
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/selectors.ts
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/ui/NewProposal.stories.tsx b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/ui/NewProposal.stories.tsx
similarity index 94%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/ui/NewProposal.stories.tsx
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/ui/NewProposal.stories.tsx
index 7c6b2074f..f53e1da0e 100644
--- a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/ui/NewProposal.stories.tsx
+++ b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/ui/NewProposal.stories.tsx
@@ -2,7 +2,6 @@ import { ComponentMeta, ComponentStory } from '@storybook/react'
import { useMemo } from 'react'
import { FormProvider, useForm } from 'react-hook-form'
-import { useActions } from '@dao-dao/common/actions'
import { Loader, Logo, useDaoInfoContext } from '@dao-dao/stateless'
import {
DaoPageWrapperDecorator,
@@ -14,10 +13,11 @@ import {
UseDefaults,
UseTransformToCosmos,
} from '@dao-dao/types'
-import { useVotingModuleAdapter } from '@dao-dao/voting-module-adapter'
-import { CwdProposalSingleAdapter } from '../..'
+import { useActions } from '../../../../../actions'
+import { useVotingModuleAdapter } from '../../../../../voting-module-adapter'
import { matchAdapter as matchProposalModuleAdapter } from '../../../../core'
+import { CwdProposalSingleAdapter } from '../../index'
import { NewProposalForm } from '../../types'
import { makeUseActions as makeUseProposalModuleActions } from '../hooks'
import { NewProposal } from './NewProposal'
diff --git a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/ui/NewProposal.tsx b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/ui/NewProposal.tsx
similarity index 95%
rename from packages/proposal-module-adapter/adapters/CwdProposalSingle/common/ui/NewProposal.tsx
rename to packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/ui/NewProposal.tsx
index 91e35e240..08334a1f7 100644
--- a/packages/proposal-module-adapter/adapters/CwdProposalSingle/common/ui/NewProposal.tsx
+++ b/packages/common/proposal-module-adapter/adapters/CwdProposalSingle/common/ui/NewProposal.tsx
@@ -14,7 +14,6 @@ import {
} from 'react-hook-form'
import { useTranslation } from 'react-i18next'
-import { SuspenseLoader } from '@dao-dao/common'
import { useWalletProfile } from '@dao-dao/state'
import {
ActionCardLoader,
@@ -32,16 +31,15 @@ import {
import {
Action,
ActionKey,
+ BaseNewProposalProps,
+ IProposalModuleAdapterCommonOptions,
UseDefaults,
UseTransformToCosmos,
} from '@dao-dao/types'
import { CosmosMsgFor_Empty } from '@dao-dao/types/contracts/common'
import { decodedMessagesString, validateRequired } from '@dao-dao/utils'
-import {
- BaseNewProposalProps,
- IProposalModuleAdapterCommonOptions,
-} from '../../../../types'
+import { SuspenseLoader } from '../../../../../components/SuspenseLoader'
import { NewProposalData, NewProposalForm } from '../../types'
enum ProposeSubmitValue {
@@ -157,8 +155,8 @@ export const NewProposal = ({
return (