Skip to content

Commit

Permalink
Rename an action
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgall committed May 29, 2024
1 parent 535b801 commit 3a5b859
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/hooks/DAO/loaders/useGovernanceContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const useGovernanceContracts = () => {

if (!azoriusModule) {
action.dispatch({
type: GovernanceContractAction.SET_GOVERNANCE_CONTRACT,
type: GovernanceContractAction.SET_GOVERNANCE_CONTRACT_ADDRESSES,
payload: {},
});
return;
Expand Down Expand Up @@ -110,7 +110,7 @@ export const useGovernanceContracts = () => {

if (votesTokenContractAddress || erc721LinearVotingContractAddress) {
action.dispatch({
type: GovernanceContractAction.SET_GOVERNANCE_CONTRACT,
type: GovernanceContractAction.SET_GOVERNANCE_CONTRACT_ADDRESSES,
payload: {
ozLinearVotingContractAddress,
erc721LinearVotingContractAddress,
Expand Down
4 changes: 2 additions & 2 deletions src/providers/App/governanceContracts/action.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { FractalGovernanceContracts } from '../../../types';

export enum GovernanceContractAction {
SET_GOVERNANCE_CONTRACT = 'SET_GOVERNANCE_CONTRACT',
SET_GOVERNANCE_CONTRACT_ADDRESSES = 'SET_GOVERNANCE_CONTRACT_ADDRESSES',
}

export type GovernanceContractActions = {
type: GovernanceContractAction.SET_GOVERNANCE_CONTRACT;
type: GovernanceContractAction.SET_GOVERNANCE_CONTRACT_ADDRESSES;
payload: Omit<FractalGovernanceContracts, 'isLoaded'>;
};
2 changes: 1 addition & 1 deletion src/providers/App/governanceContracts/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const governanceContractsReducer = (
action: GovernanceContractActions,
) => {
switch (action.type) {
case GovernanceContractAction.SET_GOVERNANCE_CONTRACT:
case GovernanceContractAction.SET_GOVERNANCE_CONTRACT_ADDRESSES:
return { ...action.payload, isLoaded: true };
default:
return state;
Expand Down

0 comments on commit 3a5b859

Please sign in to comment.