Skip to content

Commit c08266c

Browse files
committed
feat: merge branch 'main' into v2-v3-migration
2 parents 8b38310 + 2cedcdc commit c08266c

27 files changed

+786
-151
lines changed

.github/workflows/build-test-deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ jobs:
256256
matrix:
257257
scoupe:
258258
- settings
259+
- mobile
259260
steps:
260261
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
261262

.github/workflows/test-deploy-fork.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ jobs:
237237
matrix:
238238
scoupe:
239239
- settings
240+
- mobile
240241
steps:
241242
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
242243

CONTRIBUTING.md

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,54 @@
1-
# Contributing
2-
3-
We use Github issues for tracking new features, bug fixes, and enhancements related to the Aave Interface. We are currently working on a UI/UX Integrations framework for integrating third-party services and entities within the Aave Interface. Please stay tuned for new information around this.
4-
5-
## Pre-Requisites
1+
# Objective of the Aave Interface
2+
3+
The website-hosted user interface at app.aave.com (the “Interface”) is provided by the Aave Companies, a group of software development companies that build open source, blockchain-based software. The Interface is hosted on the Interplanetary File System (“IPFS”), is open source and provides information to users regarding the (a) the Aave Protocol, a decentralized, non-custodial liquidity protocol on the Ethereum blockchain that allows users to supply or borrow cryptoassets and earn interest on supplied assets (the “Aave Protocol”); (b) the Aave Safety Module, the primary mechanism for securing the Aave Protocol (the “Aave Safety Module”); and (c) Aave Governance, the mechanism through which AAVE token holders collectively discuss, propose, and vote on upgrades to the Aave Protocol (“Aave Governance”).
4+
5+
The Interface serves as an informational gateway, which allows users to:
6+
- Monitor their positions on the Aave Protocol;
7+
- Monitor their positions on the Aave Safety Module; and
8+
- Monitor and coordinate participation in Aave Governance.
9+
10+
Given the nature of decentralized blockchain technology, the Aave Prococol can either be accessed though the Interface, directly through smart contracts, or through third party protocol integrators. The Interface is a public good, along with the hundreds of other, unaffiliated on-ramps into the Aave Protocol. Our aim, in the interest of decentralization, is transparency and contributions from all community members only enhance the Aave Protocol ecosystem. This document and the below guidelines will constantly evolve – including with input from the community – but will endeavor to provide you with information about navigating the Interface smoothly.
11+
12+
# Aave Team Responsibilities on the Aave Interface
13+
The Aave team has certain responsibilities with respect to the Aave Interface. This includes the following:
14+
- Review all PRs that get created on any repositories that fall under Aave Interface;
15+
- aave/interface
16+
- aave/aave-utilities
17+
- Determine the roadmap of features that will be included on the Aave Interface; and
18+
- Maintaining the security, usability, and style of the codebase, including any integrations with third party services
19+
20+
# Reporting New Features, Improvements & Bugs
21+
The “Issues List” in GitHub keeps track of all work on the Interface. If you would like to report a bug or an improvement to the Interface, please use the existing templates after making sure that the discovered bug doesn’t already exist. To report a new issue, follow these steps:
22+
1. Go to https://github.com/aave/interface/issues/new/choose;
23+
2. Choose the category for the issue - Bug Report or Feature Request;
24+
3. If reporting a bug, include as much information as possible in your PR, and follow the steps in the template, as they are pretty self-explanatory;
25+
4. If reporting a new feature, do the same; and
26+
5. Once the issue is created, it will get a “New Issue” label, which is a helpful indication for the Interface Team to triage the new request.
27+
28+
# Picking up an issue for work
29+
Whether you’re a first time or existing contributor to the Interface and/or the Aave ecosystem, you may engage by picking up any issue that is labelled “Looking for Help,” as this will be the right place to start. These issues will have been triaged already by the Interface Team.
30+
Once you’ve identified an issue that you want to pick up, you should:
31+
1. Comment on the issue expressing interest. A member of the Interface Team will assign it to you.
32+
<aside> 💡 In order to mitigate issues from becoming stale, we may reassign or un-assign an issue after an extended period of time if we see that no commits are occurring on it. We will reach out to the original assignee in these instances
33+
</aside>
34+
2. Fork the repo if you haven’t done so already.
35+
3. Create a branch for the issue by clicking Create a branch in the Development section on the Issue page. We follow Conventional Commits and follow the branch naming convention of [verb]/[issue number]-[branch name]. Some examples of branch names are:
36+
- fix/123-squashed-bug
37+
- feat/321-my-new-feature
38+
4. Please add a comment on the issue so other people know it is being worked on.
39+
5. Commit work using conventional commit formatting. There is a pre-commit hook with Husky that will enforce this. See the Running the UI Locally section for how to get the project running locally.
40+
6. Create a pull request by using the single PR template. Fill out the list of major changes that are happening in the codebase. These bullet points should be a high-level overview / at-a-glance of the major changes to ease reviews. Go over the `Author Checklist` items in the template, and ensure all of them have been met before opening for review.
41+
7. Code review. We might request you to make changes and iterate until we feel the code is ready.
42+
8. QA and design review. If anything comes up during testing, or if there are any UI/UX items that need to be addressed, we’ll let you know.
43+
9. Once there are two approvals, the Pull Request can be merged.
44+
45+
## Develoment Prerequisites
646

747
### Install Node
848

949
We are using a Next.js application, which relies on Node. You must have Node installed and set to use the specified version in `.nvmrc`. You can potentially use other versions, but we don’t recommend differing here.
1050

11-
You can download from the [NodeJS website](https://nodejs.org/en/download/), but we recommend installing nvm and running the following command at root, after cloning or downloading the repo.
51+
You can download it from the [NodeJS website](https://nodejs.org/en/download/), but we recommend installing nvm and running the following command at root, after cloning or downloading the repo.
1252

1353
```bash
1454
nvm use
@@ -32,7 +72,7 @@ cp .env.example .env.local
3272

3373
## Get Up & Running Locally
3474

35-
Once you’ve completed the pre-requisites above, you should be able to start running the interface locally. There are several variations of running locally.
75+
Once you’ve completed the prerequisites above, you should be able to start running the interface locally. There are several variations of running locally.
3676

3777
### Development Mode
3878

@@ -90,7 +130,7 @@ yarn test:headless
90130

91131
## Environment Variables
92132

93-
Some environment variables can be adjusted to suite your needs during development, depending on the scenarios you want to test or build in.
133+
Some environment variables can be adjusted to suit your needs during development, depending on the scenarios you want to test or build in.
94134

95135
```bash
96136
# setting the environment to 'staging' will enable testnet markets, disabling governance, staking, and production markets
@@ -116,7 +156,7 @@ localStorage.setItem('forkNetworkId', '3030'); // the ID of the new forked netwo
116156
localStorage.setItem('forkRPCUrl', <rpcUrl>);
117157
```
118158

119-
Since `localStorage` changes are not not observed, _you’ll need to reload after setting the parameters_. After reloading, the market selection should show forked markets for all the markets that run on `forkBaseChainId`. To make actual transactions on the fork, you’ll need to setup your wallet to use the same `rpcUrl` you provided as `forkRPCUrl`. This will require you to setup your wallet by adding in the new fork network and connecting to the app with it.
159+
Since `localStorage` changes are not observed, _you’ll need to reload after setting the parameters_. After reloading, the market selection should show forked markets for all the markets that run on `forkBaseChainId`. To make actual transactions on the fork, you’ll need to setup your wallet to use the same `rpcUrl` you provided as `forkRPCUrl`. This will require you to setup your wallet by adding in the new fork network and connecting to the app with it.
120160

121161
If you are using MetaMask, make sure to configure the Tenderly fork RPC URL into a new network configuration. Give it a network name, and you'll want to use the same values that you copied into `localStorage` for the other fields. See below as an example:
122162

@@ -128,7 +168,7 @@ Next, reload the page. The new forked network should appear in the dropdown list
128168

129169
Finally, switch to the market pertaining to the fork in the dropdown list. Now you are able to interact with the Aave Protocol via the UI without spending any real funds!
130170

131-
__NOTE:__ _Always double check the selected network in your wallet provider to make sure transactions are executed only on the fork network_.
171+
__NOTE:__ _Always double-check the selected network in your wallet provider to make sure transactions are executed only on the fork network_.
132172

133173

134174
## Token Additions

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ yarn dev
3535

3636
For instructions on local development, deployment, configurations & feature proposals, see [Contributing](./CONTRIBUTING.md)
3737

38+
Also, contributors with at least one pull request that has been merged into the main branch are eligible for a unique GitPOAP. Visit [gitpoap.io](https://www.gitpoap.io/gp/638) to claim it.
39+
40+
<img src="https://www.gitpoap.io/_next/image?url=https%3A%2F%2Fassets.poap.xyz%2Fgitpoap3a-2022-aave-protocol-interface-contributor-2022-logo-1668012040505.png&w=2048&q=75" width="164">
41+
3842
## IPFS deployment
3943

4044
Each commit gets deployed to IPFS automatically

cypress/configs/mobile.config.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { defineConfig } from 'cypress';
2+
3+
const folder = `./cypress/e2e/2-settings/`;
4+
5+
export default defineConfig({
6+
viewportWidth: 375,
7+
viewportHeight: 812,
8+
defaultCommandTimeout: 40000,
9+
pageLoadTimeout: 120000,
10+
video: false,
11+
watchForFileChanges: false,
12+
retries: {
13+
runMode: 1,
14+
openMode: 0,
15+
},
16+
e2e: {
17+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
18+
// @ts-ignore
19+
setupNodeEvents(on, config) {
20+
// eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/ban-ts-comment
21+
// @ts-ignore
22+
// eslint-disable-next-line @typescript-eslint/no-var-requires
23+
return require('../plugins/index.js')(on, config);
24+
},
25+
specPattern: [folder + 'mobile.cy.ts'],
26+
},
27+
});

cypress/configs/settings.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ export default defineConfig({
88
...defaultConfig,
99
e2e: {
1010
specPattern: [folder + '**/*.*'],
11+
excludeSpecPattern: ['/**/mobile.cy.ts'],
1112
},
1213
});

cypress/e2e/0-v2-markets/0-main-v2-market/swap.aave-v2.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const testData = {
4040
},
4141
};
4242

43-
describe.skip('SWAP, AAVE V2 MARKET, INTEGRATION SPEC', () => {
43+
describe('SWAP, AAVE V2 MARKET, INTEGRATION SPEC', () => {
4444
const skipTestState = skipState(false);
4545
configEnvWithTenderlyMainnetFork({});
4646

cypress/e2e/1-v3-markets/2-avalanche-v3-market/e-mode.avalanche-v3.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe('E-MODE SPEC, AVALANCHE V3 MARKET', () => {
5555
borrow(testData.testCases.borrow, skipTestState, true);
5656
supply(testData.testCases.deposit2, skipTestState, true);
5757
borrow(testData.testCases.borrow, skipTestState, true);
58-
checkDashboardHealthFactor({ valueFrom: 1.0, valueTo: 1.07 }, skipTestState);
58+
checkDashboardHealthFactor({ valueFrom: 1.0, valueTo: 1.08 }, skipTestState);
5959
});
6060
describe('Turn on E-Mode and verify increase of health factor', () => {
6161
emodeActivating(
@@ -69,7 +69,7 @@ describe('E-MODE SPEC, AVALANCHE V3 MARKET', () => {
6969
});
7070
describe('Turn off E-mode and verify decrease of health factor', () => {
7171
emodeActivating({ turnOn: false, multipleEmodes: true }, skipTestState, true);
72-
checkDashboardHealthFactor({ valueFrom: 1.0, valueTo: 1.07 }, skipTestState);
72+
checkDashboardHealthFactor({ valueFrom: 1.0, valueTo: 1.08 }, skipTestState);
7373
});
7474
describe('Turn off E-mode blocked with low health factor', () => {
7575
emodeActivating(
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import { configEnvWithTenderlyMainnetFork } from '../../support/steps/configuration.steps';
2+
3+
const checkWidthOfText = (maxWidth: number) => {
4+
cy.get('[data-cy="vote-info-body"]').invoke('width').should('be.lt', maxWidth);
5+
};
6+
7+
const checkContent = (name: string, link: string) => {
8+
cy.get('[data-cy="mobile-menu"]').contains(name).should('have.attr', 'href', `${link}`);
9+
};
10+
11+
const doFindMobileMenuElement = (value: string) => {
12+
return cy.get('[data-cy="mobile-menu"]').find(value).click();
13+
};
14+
15+
describe('MOBILE RESOLUTION SPEC, AAVE V2 MARKET', () => {
16+
configEnvWithTenderlyMainnetFork({});
17+
describe('CASE1:Check mobile menu', () => {
18+
it('Check content on menu', () => {
19+
cy.get('#settings-button-mobile').click();
20+
checkContent('Markets', '/markets/');
21+
checkContent('Governance', '/governance/');
22+
checkContent('Stake', '/staking/');
23+
});
24+
});
25+
describe('CASE2:Check proposal pages', () => {
26+
const _maxResolution = 312;
27+
it('Verify width of proposal body with long text', () => {
28+
doFindMobileMenuElement('[data-cy="menuGovernance"]');
29+
cy.get('a[href*="/governance/proposal/109/"]')
30+
.contains('Whitelist Balancer’s Liquidity Mining Claim')
31+
.click();
32+
cy.contains('Proposal overview');
33+
checkWidthOfText(_maxResolution);
34+
});
35+
it('Verify width of latest proposal body with long text', () => {
36+
cy.contains('Go Back').click();
37+
cy.get('a[href*="/governance/proposal/113/"]')
38+
.contains('Chaos Labs Risk Platform Proposal')
39+
.click();
40+
checkWidthOfText(_maxResolution);
41+
});
42+
});
43+
});

pages/governance/proposal/[proposalId].governance.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export default function ProposalPage({
166166
<ContentContainer>
167167
<Grid container spacing={4}>
168168
<Grid item xs={12} md={8}>
169-
<Paper sx={{ px: 6, pt: 4, pb: 12 }}>
169+
<Paper sx={{ px: 6, pt: 4, pb: 12 }} data-cy="vote-info-body">
170170
<Typography variant="h3">
171171
<Trans>Proposal overview</Trans>
172172
</Typography>

0 commit comments

Comments
 (0)