From b5219e15eb189d417efbeb6e1c076b52e689a1e1 Mon Sep 17 00:00:00 2001 From: selankon Date: Tue, 31 Oct 2023 09:59:06 +0100 Subject: [PATCH] Do naming refactor From Offchain voying to Gasless voting and from executive committee to execution multisig --- package.json | 2 +- .../index.tsx | 14 ++--- src/containers/configureCommunity/index.tsx | 2 +- src/containers/defineCommittee/index.tsx | 4 +- .../editSettings/majorityVoting.tsx | 4 +- src/containers/goLive/committee.tsx | 2 +- src/containers/goLive/index.tsx | 2 +- .../settings/gaslessVoting/index.tsx | 2 +- src/containers/setupCommunity/index.tsx | 8 +-- ...osalModal.tsx => gaslessProposalModal.tsx} | 26 +++++----- ...VotingModal.tsx => gaslessVotingModal.tsx} | 52 +++++++++---------- .../committeeVotingTerminal.tsx | 9 ++-- src/context/createDao.tsx | 8 +-- ...Proposal.tsx => createGaslessProposal.tsx} | 14 ++--- src/context/createProposal.tsx | 48 ++++++++--------- src/context/proposalTransaction.tsx | 22 ++++---- ...ffchainVoting.tsx => useGaslessVoting.tsx} | 16 +++--- src/locales/en/common.json | 42 +++++++-------- src/pages/createDAO.tsx | 4 +- src/pages/proposal.tsx | 8 +-- src/utils/committeeVoting.ts | 12 ++--- src/utils/types.ts | 2 +- yarn.lock | 15 ++++-- 23 files changed, 161 insertions(+), 157 deletions(-) rename src/components/{offChainSelector => gaslessSelector}/index.tsx (76%) rename src/containers/transactionModals/{offchainProposalModal.tsx => gaslessProposalModal.tsx} (53%) rename src/containers/transactionModals/{offchainVotingModal.tsx => gaslessVotingModal.tsx} (68%) rename src/context/{createOffchainProposal.tsx => createGaslessProposal.tsx} (96%) rename src/context/{useOffchainVoting.tsx => useGaslessVoting.tsx} (94%) diff --git a/package.json b/package.json index da6442750..71a2d6c96 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@tiptap/pm": "^2.0.3", "@tiptap/react": "^2.0.3", "@tiptap/starter-kit": "^2.0.3", - "@vocdoni/gasless-voting": "./vocdoni-gasless-voting-v0.0.1-rc3.tgz", + "@vocdoni/gasless-voting": "./vocdoni-gasless-voting-v0.0.1-rc4.tgz", "@vocdoni/gasless-voting-ethers": "./vocdoni-gasless-voting-ethers-v0.0.1-rc1.tgz", "@vocdoni/react-providers": "^0.1.10", "@vocdoni/sdk": "^0.3.1", diff --git a/src/components/offChainSelector/index.tsx b/src/components/gaslessSelector/index.tsx similarity index 76% rename from src/components/offChainSelector/index.tsx rename to src/components/gaslessSelector/index.tsx index 47aa1f878..2b24432f9 100644 --- a/src/components/offChainSelector/index.tsx +++ b/src/components/gaslessSelector/index.tsx @@ -17,7 +17,7 @@ type ValueOfControllerRenderProps = T extends ControllerRenderProps * It has a logic to show a `Comming Soon` label when the chainId is not compatible with vocdoni census3 service. * @constructor */ -const OffChainSelector = ({ +const GaslessSelector = ({ onChange, value, }: { @@ -34,22 +34,22 @@ const OffChainSelector = ({
)} { - onChange('offChain'); + onChange('gasless'); }} multiSelect={false} disabled={!isSupported} - {...(value === 'offChain' ? {type: 'active'} : {})} + {...(value === 'gasless' ? {type: 'active'} : {})} /> ); }; -export default OffChainSelector; +export default GaslessSelector; diff --git a/src/containers/configureCommunity/index.tsx b/src/containers/configureCommunity/index.tsx index 9f686586e..34c23c023 100644 --- a/src/containers/configureCommunity/index.tsx +++ b/src/containers/configureCommunity/index.tsx @@ -365,7 +365,7 @@ const ConfigureCommunity: React.FC = ({ {/* Early execution */} - {votingType !== 'offChain' && ( + {votingType !== 'gasless' && ( <>