Skip to content

Commit

Permalink
Merge pull request #962 from yieldprotocol/dev-without-december-maturity
Browse files Browse the repository at this point in the history
feat: Dev TV without december maturity
  • Loading branch information
brucedonovan authored Aug 18, 2022
2 parents 7141d27 + 366e43c commit 0cdd29d
Show file tree
Hide file tree
Showing 71 changed files with 8,456 additions and 13,907 deletions.
5 changes: 5 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ REACT_APP_RPC_URL_10='https://optimism-mainnet.infura.io/v3/2af222f674024a0f84b5
REACT_APP_RPC_URL_69='https://optimism-kovan.infura.io/v3/2af222f674024a0f84b5f0aad0da72a2'
REACT_APP_RPC_URL_42161='https://arb-mainnet.g.alchemy.com/v2/vtMM4_eLnOvkjkdckprVw3cIa64EVkDZ'
REACT_APP_RPC_URL_421611='https://arb-rinkeby.g.alchemy.com/v2/AY_Q_Uy-Kcfwmf5In5qwG636vaOIoA8L'
TENDERLY_JSON_RPC_URL='https://rpc.tenderly.co/fork/dfaf2111-65d1-4753-a173-5f5a92c929fb'


TENDERLY_USER='mmyield'
TENDERLY_PROECT='Yield/v2'
TENDERLY_ACCESS_KEY='780JYfoBZ7uF6TX9hoMe76n9YdEKGAHd'
INFURA_KEY=2af222f674024a0f84b5f0aad0da72a2
ALCHEMY_ARBITRUM_KEY=vtMM4_eLnOvkjkdckprVw3cIa64EVkDZ
ALCHEMY_ARBITRUM_RINKEBY_KEY=vtMM4_eLnOvkjkdckprVw3cIa64EVkDZ
Expand Down
69 changes: 0 additions & 69 deletions .eslintrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
4 changes: 4 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"require": "ts-node/register/files",
"timeout": 20000
}
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
## Yield Protocol App UI
`yarn && yarn type-contracts && yarn build && yarn global add serve && serve -s build`

`yarn && yarn type-contracts && yarn build && yarn global add serve && serve -s build`

### Using Tenderly Forks for Testing

1. Go to settings, and click the **_Use Tenderly Fork_** button to activate the tenderly fork testing environment; the app will reload
2. Go to settings, click the **_Fill ETH_** button to get 100 ETH for the test environment
3. Reload the page
4. If you don't see the expected new tenderly fork data (i.e.: you don't see new series, assets, or strategies), reload the page
5. If data still doesn't load: reset the app by going to settings and clicking **_Reset App_**, and try from step 1 above
6. Try any action (i.e.: borrow any asset with ETH as collateral)
a. **No user interaction is needed after clicking the submit button**; the UI will show an automatic approval transaction followed by your action (borrow, lend, pool, etc.)

### Dev: Updating Tenderly Fork Environment

1. Update the `TENDERLY_JSON_RPC_URL` environment variable within `.env.local` to point to the relevant fork; you can find the fork rpc url in the Tenderly UI
2. Restart the dev environment to have the new environment variable take effect
21 changes: 21 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const nextJest = require('next/jest');

const createJestConfig = nextJest({
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment
dir: './',
});

// Add any custom config to be passed to Jest
const customJestConfig = {
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
moduleNameMapper: {
// Handle module aliases (this will be automatically configured for you soon)
'^@/components/(.*)$': '<rootDir>/components/$1',

'^@/pages/(.*)$': '<rootDir>/pages/$1',
},
testEnvironment: 'jest-environment-jsdom',
};

// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
module.exports = createJestConfig(customJestConfig);
6 changes: 6 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Optional: configure or set up a testing framework before each test.
// If you delete this file, remove `setupFilesAfterEnv` from `jest.config.js`

// Used for __tests__/testing-library.js
// Learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom/extend-expect';
7 changes: 6 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@ const nextConfig = {
REACT_APP_VERSION: process.env.REACT_APP_VERSION,
REACT_APP_INFURA_KEY_V1: process.env.REACT_APP_INFURA_KEY_V1,
REACT_APP_RPC_URL_42: process.env.REACT_APP_RPC_URL_42,
REACT_APP_RPC_URL_1: process.env.REACT_APP_RPC_URL_1,
REACT_APP_RPC_URL_1: process.env.TENDERLY_JSON_RPC_URL,
REACT_APP_RPC_URL_4: process.env.REACT_APP_RPC_URL_4,
REACT_APP_RPC_URL_5: process.env.REACT_APP_RPC_URL_5,
REACT_APP_RPC_URL_10: process.env.REACT_APP_RPC_URL_10,
REACT_APP_RPC_URL_69: process.env.REACT_APP_RPC_URL_69,
REACT_APP_RPC_URL_42161: process.env.REACT_APP_RPC_URL_42161,
REACT_APP_RPC_URL_421611: process.env.REACT_APP_RPC_URL_421611,
TENDERLY_JSON_RPC_URL: process.env.TENDERLY_JSON_RPC_URL,
TENDERLY_USER: process.env.TENDERLY_USER,
TENDERLY_PROECT: process.env.TENDERLY_PROECT,
TENDERLY_ACCESS_KEY: process.env.TENDERLY_ACCESS_KEY,
INFURA_KEY: process.env.INFURA_KEY,
ALCHEMY_ARBITRUM_KEY: process.env.ALCHEMY_ARBITRUM_KEY,
ALCHEMY_ARBITRUM_RINKEBY_KEY: process.env.ALCHEMY_ARBITRUM_RINKEBY_KEY,
ALCHEMY_MAINNET_KEY: process.env.ALCHEMY_MAINNET_KEY,
ENV: process.env.NODE_ENV,
},
async redirects() {
return [
Expand Down
Loading

0 comments on commit 0cdd29d

Please sign in to comment.