diff --git a/env.example b/env.example deleted file mode 100644 index f864557f..00000000 --- a/env.example +++ /dev/null @@ -1,21 +0,0 @@ -PORT=3000 -REACT_APP_BASEDAO_DOCKERISED_URL=http://localhost:8000/steps -REACT_APP_CORS_PROXY_URL=http://localhost:8001 -REACT_APP_DAO_DEPLOYER_API=http://localhost:3001 -REACT_APP_ENV=DEV -REACT_APP_HASURA_ADMIN_SECRET=your_hasura_admin_secret_here -REACT_APP_HASURA_ADMIN_SECRET_V2=your_hasura_admin_secret_v2_here -REACT_APP_HASURA_URL=http://localhost:8080/v1/graphql -REACT_APP_HASURA_URL_V2=http://localhost:8081/v1/graphql -REACT_APP_LAUNCH_DARKLY_SDK_DEV=your_launch_darkly_sdk_key_here - -REACT_APP_MIXPANEL_DEBUG_ENABLED=false -REACT_APP_MIXPANEL_TOKEN=your_mixpanel_token_here -REACT_APP_NETWORK=development -REACT_APP_URL=http://localhost:3000 -REACT_APP_V2_URL=http://localhost:3002 -REACT_APP_IS_NOT_TESTING=false - -REACT_APP_LAUNCH_DARKLY_SDK_PROD=your_launch_darkly_prod_key_here -REACT_APP_IGNORE_DAO_CYCLE_CHECK=false -REACT_APP_PROPOSAL_WEBHOOK_URL=http://localhost:8002/webhook \ No newline at end of file diff --git a/src/services/config/constants.ts b/src/services/config/constants.ts index c6e6e452..9ad023f6 100644 --- a/src/services/config/constants.ts +++ b/src/services/config/constants.ts @@ -18,8 +18,7 @@ export enum EnvKey { REACT_APP_BASE_URL = "REACT_APP_BASE_URL", REACT_APP_DAO_DEPLOYER_API = "REACT_APP_DAO_DEPLOYER_API", REACT_APP_RPC_NETWORK_GHOSTNET = "REACT_APP_RPC_NETWORK_GHOSTNET", - REACT_APP_RPC_NETWORK_MAINNET = "REACT_APP_RPC_NETWORK_MAINNET", - REACT_APP_PROPOSAL_WEBHOOK_URL = "REACT_APP_PROPOSAL_WEBHOOK_URL" + REACT_APP_RPC_NETWORK_MAINNET = "REACT_APP_RPC_NETWORK_MAINNET" } export enum FeatureFlag { diff --git a/src/services/contracts/baseDAO/hooks/useLambdaAddPropose.ts b/src/services/contracts/baseDAO/hooks/useLambdaAddPropose.ts index e34b0be9..9f52b4ba 100644 --- a/src/services/contracts/baseDAO/hooks/useLambdaAddPropose.ts +++ b/src/services/contracts/baseDAO/hooks/useLambdaAddPropose.ts @@ -6,7 +6,6 @@ import { useTezos } from "services/beacon/hooks/useTezos" import mixpanel from "mixpanel-browser" import { networkNameMap } from "../../../bakingBad" import { LambdaDAO } from "../lambdaDAO" -import { sendProposalCreatedEvent } from "services/utils/utils" export const useLambdaAddPropose = () => { const queryClient = useQueryClient() @@ -42,8 +41,6 @@ export const useLambdaAddPropose = () => { daoType: "Registry" }) - sendProposalCreatedEvent(network, account, dao.data.name, dao.data.address) - await data.confirmation(1) closeProposalNotification(proposalNotification) // setProposalDone() @@ -56,7 +53,6 @@ export const useLambdaAddPropose = () => { }) handleClose() - return data } catch (e) { console.log(e) diff --git a/src/services/contracts/baseDAO/hooks/useLambdaExecutePropose.ts b/src/services/contracts/baseDAO/hooks/useLambdaExecutePropose.ts index d23cf9fc..15dd4b1f 100644 --- a/src/services/contracts/baseDAO/hooks/useLambdaExecutePropose.ts +++ b/src/services/contracts/baseDAO/hooks/useLambdaExecutePropose.ts @@ -6,7 +6,6 @@ import { useTezos } from "services/beacon/hooks/useTezos" import mixpanel from "mixpanel-browser" import { networkNameMap } from "../../../bakingBad" import { LambdaDAO } from "../lambdaDAO" -import { sendProposalCreatedEvent } from "services/utils/utils" export const useLambdaExecutePropose = () => { const queryClient = useQueryClient() @@ -43,7 +42,6 @@ export const useLambdaExecutePropose = () => { dao: dao.data.address, daoType: "Registry" }) - sendProposalCreatedEvent(network, account, dao.data.name, dao.data.address) await data.confirmation(1) closeProposalNotification(proposalNotification) diff --git a/src/services/contracts/baseDAO/hooks/useLambdaRemovePropose.ts b/src/services/contracts/baseDAO/hooks/useLambdaRemovePropose.ts index 26163a42..1df24a59 100644 --- a/src/services/contracts/baseDAO/hooks/useLambdaRemovePropose.ts +++ b/src/services/contracts/baseDAO/hooks/useLambdaRemovePropose.ts @@ -6,7 +6,6 @@ import { useTezos } from "services/beacon/hooks/useTezos" import mixpanel from "mixpanel-browser" import { networkNameMap } from "../../../bakingBad" import { LambdaDAO } from "../lambdaDAO" -import { sendProposalCreatedEvent } from "services/utils/utils" export const useLambdaRemovePropose = () => { const queryClient = useQueryClient() @@ -41,7 +40,6 @@ export const useLambdaRemovePropose = () => { dao: dao.data.address, daoType: "Registry" }) - sendProposalCreatedEvent(network, account, dao.data.name, dao.data.address) await data.confirmation(1) closeProposalNotification(proposalNotification) diff --git a/src/services/contracts/baseDAO/hooks/useProposeConfigChange.ts b/src/services/contracts/baseDAO/hooks/useProposeConfigChange.ts index 6e76ef98..7dc58716 100644 --- a/src/services/contracts/baseDAO/hooks/useProposeConfigChange.ts +++ b/src/services/contracts/baseDAO/hooks/useProposeConfigChange.ts @@ -5,8 +5,6 @@ import { useTezos } from "services/beacon/hooks/useTezos" import { BaseDAO } from "../class" import { ConfigProposalParams } from "../types" import { networkNameMap } from "../../../bakingBad" -import { sendProposalCreatedEvent } from "services/utils/utils" -import mixpanel from "mixpanel-browser" export const useProposeConfigChange = () => { const queryClient = useQueryClient() @@ -32,12 +30,6 @@ export const useProposeConfigChange = () => { } const data = await dao.proposeConfigChange(args, tezosToolkit) - mixpanel.track("Proposal Created", { - dao: dao.data.address, - daoType: "Registry" - }) - sendProposalCreatedEvent(network, account, dao.data.name, dao.data.address) - await data.confirmation(1) closeProposalNotification(proposalNotification) diff --git a/src/services/contracts/baseDAO/hooks/useProposeDelegationChange.ts b/src/services/contracts/baseDAO/hooks/useProposeDelegationChange.ts index 99426edf..ef842d70 100644 --- a/src/services/contracts/baseDAO/hooks/useProposeDelegationChange.ts +++ b/src/services/contracts/baseDAO/hooks/useProposeDelegationChange.ts @@ -4,8 +4,6 @@ import { useNotification } from "modules/common/hooks/useNotification" import { useTezos } from "services/beacon/hooks/useTezos" import { BaseDAO } from "../class" import { networkNameMap } from "../../../bakingBad" -import mixpanel from "mixpanel-browser" -import { sendProposalCreatedEvent } from "services/utils/utils" export const useProposeDelegationChange = () => { const queryClient = useQueryClient() @@ -31,12 +29,6 @@ export const useProposeDelegationChange = () => { } const data = await dao.proposeDelegationChange(newDelegationAddress, tezosToolkit) - mixpanel.track("Proposal Created", { - dao: dao.data.address, - daoType: "Registry" - }) - sendProposalCreatedEvent(network, account, dao.data.name, dao.data.address) - await data.confirmation(1) closeProposalNotification(proposalNotification) diff --git a/src/services/contracts/baseDAO/hooks/useProposeGuardianChange.ts b/src/services/contracts/baseDAO/hooks/useProposeGuardianChange.ts index 9b2fd951..7e610bea 100644 --- a/src/services/contracts/baseDAO/hooks/useProposeGuardianChange.ts +++ b/src/services/contracts/baseDAO/hooks/useProposeGuardianChange.ts @@ -4,8 +4,6 @@ import { useNotification } from "modules/common/hooks/useNotification" import { useTezos } from "services/beacon/hooks/useTezos" import { BaseDAO } from "../class" import { networkNameMap } from "../../../bakingBad" -import { sendProposalCreatedEvent } from "services/utils/utils" -import mixpanel from "mixpanel-browser" export const useProposeGuardianChange = () => { const queryClient = useQueryClient() @@ -31,12 +29,6 @@ export const useProposeGuardianChange = () => { } const data = await dao.proposeGuardianChange(newGuardianAddress, tezosToolkit) - mixpanel.track("Proposal Created", { - dao: dao.data.address, - daoType: "Registry" - }) - sendProposalCreatedEvent(network, account, dao.data.name, dao.data.address) - await data.confirmation(1) closeProposalNotification(proposalNotification) diff --git a/src/services/contracts/baseDAO/hooks/useRegistryPropose.ts b/src/services/contracts/baseDAO/hooks/useRegistryPropose.ts index 7b5eaa1e..5309b54b 100644 --- a/src/services/contracts/baseDAO/hooks/useRegistryPropose.ts +++ b/src/services/contracts/baseDAO/hooks/useRegistryPropose.ts @@ -6,7 +6,6 @@ import { useTezos } from "services/beacon/hooks/useTezos" import { LambdaDAO } from "../lambdaDAO" import mixpanel from "mixpanel-browser" import { networkNameMap } from "../../../bakingBad" -import { sendProposalCreatedEvent } from "services/utils/utils" export const useRegistryPropose = () => { const queryClient = useQueryClient() @@ -37,7 +36,6 @@ export const useRegistryPropose = () => { dao: dao.data.address, daoType: "Registry" }) - sendProposalCreatedEvent(network, account, dao.data.name, dao.data.address) await data.confirmation(1) closeProposalNotification(proposalNotification) diff --git a/src/services/contracts/baseDAO/hooks/useTreasuryPropose.ts b/src/services/contracts/baseDAO/hooks/useTreasuryPropose.ts index d62d2bf2..f71bd52f 100644 --- a/src/services/contracts/baseDAO/hooks/useTreasuryPropose.ts +++ b/src/services/contracts/baseDAO/hooks/useTreasuryPropose.ts @@ -6,7 +6,6 @@ import { RegistryProposeArgs } from "../lambdaDAO/types" import mixpanel from "mixpanel-browser" import { networkNameMap } from "../../../bakingBad" import { LambdaDAO } from "../lambdaDAO" -import { sendProposalCreatedEvent } from "services/utils/utils" export const useTreasuryPropose = () => { const queryClient = useQueryClient() @@ -38,7 +37,6 @@ export const useTreasuryPropose = () => { dao: dao.data.address, daoType: "Treasury" }) - sendProposalCreatedEvent(network, account, dao.data.name, dao.data.address) await data.confirmation(1) closeProposalNotification(proposalNotification) diff --git a/src/services/utils/utils.ts b/src/services/utils/utils.ts index 9c43b49e..d9cabadc 100644 --- a/src/services/utils/utils.ts +++ b/src/services/utils/utils.ts @@ -250,26 +250,3 @@ export const validateTokenAddress = (network: Network, tokenAddress: string) => if (network.startsWith("etherlink")) return isEtherAddress(tokenAddress) ? 3 : false return false } - -export const sendProposalCreatedEvent = async ( - network: Network, - proposerAddress: string, - daoName: string, - daoAddress: string -) => { - const url = getEnv(EnvKey.REACT_APP_PROPOSAL_WEBHOOK_URL) - const response = await fetch(url, { - method: "POST", - body: JSON.stringify({ - network, - proposer: proposerAddress, - dao_name: daoName, - dao_address: daoAddress - }) - }) - if (!response.ok) { - console.error("Failed to send proposal created event", response) - return false - } - return true -}