Skip to content

Commit

Permalink
cleanup. docs. env vars. one click deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
brightiron committed Dec 22, 2023
1 parent 2dc5cc6 commit 710851c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 149 deletions.
25 changes: 6 additions & 19 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
# Required
# Covalent (https://www.covalenthq.com/)
VITE_COVALENT_API_KEY=""

# Optional
# Toggle to "true" to use Olympus Give features
VITE_GIVE_ENABLED="true"
# This should be toggled to "true" if you need to use the mock sOHM contract
# (which allows for on-demand rebasing)
VITE_MOCK_SOHM_ENABLED="false"

# Optional
# Google Analytics (https://analytics.google.com/)
VITE_GOOGLE_ANALYTICS_API_KEY=""
# Google Analytics 4 API Key
VITE_GA_4_API_KEY=""

# Optional
# If you run your own node, you can provide connection url(s) to that node.
Expand All @@ -25,14 +17,6 @@ VITE_FANTOM_TESTNET_NODE_URL=""
VITE_POLYGON_NODE_URL=""
VITE_POLYGON_TESTNET_NODE_URL=""

# Olympus Give
# These 2 settings should be toggled to "true" if you want to use Olympus Give features
VITE_GIVE_ENABLED="true"
VITE_GIVE_GRANTS_ENABLED="true"

# This should be toggled to "true" if you need to use the mock sOHM contract
# (which allows for on-demand rebasing)
VITE_MOCK_SOHM_ENABLED="false"

VITE_ARBITRUM_NODE_URL=""
VITE_ARBITRUM_TESTNET_NODE_URL=""
Expand All @@ -41,4 +25,7 @@ VITE_AVALANCHE_NODE_URL=""
VITE_AVALANCHE_TESTNET_NODE_URL=""

# Get a wallet connect project id here: https://cloud.walletconnect.com
VITE_WALLETCONNECT_PROJECT_ID=""
VITE_WALLETCONNECT_PROJECT_ID=""

#Subgraph URL for Protocol Metrics. If not set Protocol Metrics will not be displayed.
VITE_WG_PUBLIC_NODE_URL=""
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,11 @@ If editing the production content, opt to create a new branch and pull request,
## 🗣 Community and Contributions

- [Join our Discord](https://discord.gg/OlympusDAO) and ask how you can get involved with the DAO!



## Deploy Your Own Frontend

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FOlympusDAO%2Folympus-frontend&env=VITE_WALLETCONNECT_PROJECT_ID&envDescription=Please%20see%20.env.example%20for%20all%20other%20optional%20ENV%20variables&envLink=https%3A%2F%2Fgithub.com%2FOlympusDAO%2Folympus-frontend%2Fblob%2Fdevelop%2F.env.example)
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/OlympusDAO/olympus-frontend)

12 changes: 0 additions & 12 deletions src/helpers/environment/Environment/Environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ export class Environment {
err: "Please provide an Google Analytics 4 API key in your .env file",
});

public static getZapperApiKey = () =>
this._get({
first: true,
key: "VITE_ZAPPER_API",
// NOTE: default Zapper API key. Won't work in production with any real volume of usage.
fallback: "96e0cc51-a62e-42ca-acee-910ea7d2a241",
});

public static getWundergraphNodeUrl = (): string | undefined =>
this._get({
first: true,
Expand Down Expand Up @@ -136,8 +128,4 @@ export class Environment {
});
}
};

public static isWalletNewsEnabled() {
return this.env.VITE_DISABLE_NEWS !== "true";
}
}
7 changes: 0 additions & 7 deletions src/helpers/environment/Environment/Environment.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ describe("Environment", () => {
});
});

describe("Zapper", () => {
it("should return a Zapper API key", () => {
import.meta.env.VITE_ZAPPER_API = "somekey";
expect(Environment.getZapperApiKey()).toEqual("somekey");
});
});

describe("StagingEnv", () => {
it("should return a StagingEnv", () => {
import.meta.env.VITE_STAGING_ENV = "false";
Expand Down
109 changes: 0 additions & 109 deletions src/hooks/useZapTokenBalances.ts

This file was deleted.

3 changes: 1 addition & 2 deletions src/hooks/useZeroExSwap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { DAO_TREASURY_ADDRESSES, GOHM_ADDRESSES } from "src/constants/addresses"
import { SOHM_ADDRESSES } from "src/constants/addresses";
import { trackGAEvent } from "src/helpers/analytics/trackGAEvent";
import { balanceQueryKey } from "src/hooks/useBalance";
import { zapTokenBalancesKey } from "src/hooks/useZapTokenBalances";
import { EthersError } from "src/lib/EthersTypes";
import { useAccount, useSigner } from "wagmi";

Expand Down Expand Up @@ -41,7 +40,7 @@ export const useZeroExSwap = () => {
const client = useQueryClient();
const { data: signer } = useSigner();
const { address = "" } = useAccount();

const zapTokenBalancesKey = (address: string) => ["zapTokenBalances", address];
return useMutation<ContractReceipt, EthersError, ZapExecuteOptions>(
/**
* Ideally the parameters to this async function should be the slippage, etc.
Expand Down

0 comments on commit 710851c

Please sign in to comment.