Skip to content

Commit ce55b55

Browse files
authored
Merge pull request #216 from QuickSwap/dev
Dev
2 parents 2450382 + fe90a8a commit ce55b55

83 files changed

Lines changed: 3304 additions & 8635 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@ REACT_APP_FORTMATIC_KEY="pk_live_F937DF033A1666BF"
88
REACT_APP_MOONPAY_KEY="pk_live_72EGoobLnlgc8WB7AaxyiWu2S43dj8eY"
99
REACT_APP_TRANSAK_KEY="258960cf-1e17-4419-bf7f-77443282f5da"
1010
REACT_APP_GRAPH_API_URL="https://polygon.furadao.org/subgraphs/name/quickswap"
11-
REACT_APP_PRDT_URL="https://prdt-quickswap-main.pages.dev/"
11+
REACT_APP_PRDT_URL="https://prdt-quickswap-main.pages.dev/"
12+
REACT_APP_SCAN_BASE_URL="https://polygonscan.com"
13+
REACT_APP_TOKEN_LIST_DEFAULT_URL="https://unpkg.com/quickswap-default-token-list@latest/build/quickswap-default.tokenlist.json"
14+
REACT_APP_STAKING_LIST_DEFAULT_URL="https://unpkg.com/quickswap-default-staking-list@latest/build/quickswap-default.lpfarms.json"
15+
REACT_APP_DUAL_STAKING_LIST_DEFAULT_URL="https://unpkg.com/quickswap-default-staking-list@latest/build/quickswap-default.dualfarms.json"
16+
REACT_APP_SYRUP_LIST_DEFAULT_URL="https://unpkg.com/quickswap-default-staking-list@latest/build/quickswap-default.syrups.json"

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ assignees: ''
1010
A clear and concise description of the bug.
1111

1212
**Steps to Reproduce**
13+
1314
1. Go to ...
1415
2. Click on ...
15-
...
16+
...
1617

1718
**Expected Behavior**
1819
A clear and concise description of what you expected to happen.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Enabling users to:
1111
- Participate in Dragon's syrup running on QuickSwap protocol
1212

1313
Useful links:
14+
1415
- Website: [quickswap.exchange](https://quickswap.exchange/)
1516
- Beta: [beta.quickswap.exchange](https://beta.quickswap.exchange/)
1617
- Info: [info.quickswap.exchange](https://info.quickswap.exchange)
@@ -24,7 +25,6 @@ To access the QuickSwap Interface, use an IPFS gateway link from the
2425
[latest release](https://github.com/QuickSwap/interface-v2/releases/latest),
2526
or visit [quickswap.exchange](https://quickswap.exchange).
2627

27-
2828
The QuickSwap interface is hosted on IPFS in a decentralized manner. `quickswap.exchange` just holds a CNAME record to the Cloudflare IPFS gateway. You can use [any](https://ipfs.github.io/public-gateway-checker/) public or private IPFS gateway supporting origin isolation to access QuickSwap interface if for some reason the Cloudflare gateway doesn't work for you
2929

3030
Just go to `<your favorite public ipfs gateway>/ipns/quickswap.exchange`
Lines changed: 48 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,56 @@
11
describe('Add Liquidity', () => {
22
it('loads the two correct tokens', () => {
3-
cy.visit('/pools?currency0=0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6&currency1=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619')
4-
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'WBTC')
5-
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'ETH')
6-
})
3+
cy.visit(
4+
'/pools?currency0=0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6&currency1=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619',
5+
);
6+
cy.get('#add-liquidity-input-tokena .token-symbol-container').should(
7+
'contain.text',
8+
'WBTC',
9+
);
10+
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should(
11+
'contain.text',
12+
'ETH',
13+
);
14+
});
715

816
it('does not crash if ETH is duplicated', () => {
9-
cy.visit('/pools?currency0=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619&currency1=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619')
10-
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('not.contain.text', 'ETH')
11-
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'ETH')
12-
})
17+
cy.visit(
18+
'/pools?currency0=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619&currency1=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619',
19+
);
20+
cy.get('#add-liquidity-input-tokena .token-symbol-container').should(
21+
'not.contain.text',
22+
'ETH',
23+
);
24+
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should(
25+
'contain.text',
26+
'ETH',
27+
);
28+
});
1329

1430
it('token not in storage is loaded', () => {
15-
cy.visit('/pools?currency0=0x64aFDF9e28946419E325d801Fb3053d8B8FFdC23&currency1=0x60bB3D364B765C497C8cE50AE0Ae3f0882c5bD05')
16-
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'MEEB')
17-
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'IMX')
18-
})
31+
cy.visit(
32+
'/pools?currency0=0x64aFDF9e28946419E325d801Fb3053d8B8FFdC23&currency1=0x60bB3D364B765C497C8cE50AE0Ae3f0882c5bD05',
33+
);
34+
cy.get('#add-liquidity-input-tokena .token-symbol-container').should(
35+
'contain.text',
36+
'MEEB',
37+
);
38+
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should(
39+
'contain.text',
40+
'IMX',
41+
);
42+
});
1943

2044
it('single token can be selected', () => {
21-
cy.visit('/pools?currency0=0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6')
22-
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'WBTC')
23-
cy.visit('/pools?currency0=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619')
24-
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'ETH')
25-
})
26-
})
45+
cy.visit('/pools?currency0=0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6');
46+
cy.get('#add-liquidity-input-tokena .token-symbol-container').should(
47+
'contain.text',
48+
'WBTC',
49+
);
50+
cy.visit('/pools?currency0=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619');
51+
cy.get('#add-liquidity-input-tokena .token-symbol-container').should(
52+
'contain.text',
53+
'ETH',
54+
);
55+
});
56+
});
Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,38 @@
1-
import { TEST_ADDRESS_NEVER_USE_SHORTENED } from '../support/commands'
1+
import { TEST_ADDRESS_NEVER_USE_SHORTENED } from '../support/commands';
22

33
describe('Landing Page', () => {
4-
beforeEach(() => cy.visit('/'))
4+
beforeEach(() => cy.visit('/'));
55
it('loads landing page', () => {
6-
cy.get('#landing-page')
7-
})
8-
6+
cy.get('#landing-page');
7+
});
98

109
it('allows navigation to pool', () => {
11-
cy.get('#pools-page-link').click()
12-
cy.url().should('include', '/pools')
13-
})
10+
cy.get('#pools-page-link').click();
11+
cy.url().should('include', '/pools');
12+
});
1413

1514
it('allows navigation to swap', () => {
16-
cy.get('#swap-page-link').click()
17-
cy.url().should('include', '/swap')
18-
})
15+
cy.get('#swap-page-link').click();
16+
cy.url().should('include', '/swap');
17+
});
1918

2019
it('allows navigation to farm', () => {
21-
cy.get('#farm-page-link').click()
22-
cy.url().should('include', '/farm')
23-
})
20+
cy.get('#farm-page-link').click();
21+
cy.url().should('include', '/farm');
22+
});
2423

2524
it('allows navigation to dragons lair', () => {
26-
cy.get('#dragons-page-link').click()
27-
cy.url().should('include', '/dragons')
28-
})
25+
cy.get('#dragons-page-link').click();
26+
cy.url().should('include', '/dragons');
27+
});
2928

3029
it('allows navigation to analytics', () => {
31-
cy.get('#analytics-page-link').click()
32-
cy.url().should('include', '/analytics')
33-
})
30+
cy.get('#analytics-page-link').click();
31+
cy.url().should('include', '/analytics');
32+
});
3433

3534
/**it('is connected', () => {
3635
cy.get('#web3-status-connected').click()
3736
cy.get('#web3-account-identifier-row').contains(TEST_ADDRESS_NEVER_USE_SHORTENED)
3837
})*/
39-
})
38+
});

cypress/integration/lists.test.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
describe('Lists', () => {
22
beforeEach(() => {
3-
cy.visit('/swap')
4-
})
3+
cy.visit('/swap');
4+
});
55

66
it('defaults to uniswap list', () => {
7-
cy.get('#swap-currency-output .open-currency-select-button').click()
8-
cy.get('#currency-search-selected-list-name').should('contain', 'Uniswap')
9-
})
7+
cy.get('#swap-currency-output .open-currency-select-button').click();
8+
cy.get('#currency-search-selected-list-name').should('contain', 'Uniswap');
9+
});
1010

1111
it('change list', () => {
12-
cy.get('#swap-currency-output .open-currency-select-button').click()
13-
cy.get('#currency-search-change-list-button').click()
14-
cy.get('#list-row-tokens-1inch-eth .select-button').click()
15-
cy.get('#currency-search-selected-list-name').should('contain', '1inch')
16-
cy.get('#currency-search-change-list-button').click()
17-
cy.get('#list-row-tokens-uniswap-eth .select-button').click()
18-
cy.get('#currency-search-selected-list-name').should('contain', 'Uniswap')
19-
})
20-
})
12+
cy.get('#swap-currency-output .open-currency-select-button').click();
13+
cy.get('#currency-search-change-list-button').click();
14+
cy.get('#list-row-tokens-1inch-eth .select-button').click();
15+
cy.get('#currency-search-selected-list-name').should('contain', '1inch');
16+
cy.get('#currency-search-change-list-button').click();
17+
cy.get('#list-row-tokens-uniswap-eth .select-button').click();
18+
cy.get('#currency-search-selected-list-name').should('contain', 'Uniswap');
19+
});
20+
});
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
describe('Migrate V1 Liquidity', () => {
22
describe('Remove V1 liquidity', () => {
33
it('renders the correct page', () => {
4-
cy.visit('/remove/v1/0x93bB63aFe1E0180d0eF100D774B473034fd60C36')
5-
cy.get('#remove-v1-exchange').should('contain', 'MKR/ETH')
6-
})
7-
})
8-
})
4+
cy.visit('/remove/v1/0x93bB63aFe1E0180d0eF100D774B473034fd60C36');
5+
cy.get('#remove-v1-exchange').should('contain', 'MKR/ETH');
6+
});
7+
});
8+
});

cypress/integration/pool.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
describe('Pool', () => {
2-
beforeEach(() => cy.visit('/pool'))
2+
beforeEach(() => cy.visit('/pool'));
33
it('add liquidity links to /add/ETH', () => {
4-
cy.get('#join-pool-button').click()
5-
cy.url().should('contain', '/add/ETH')
6-
})
4+
cy.get('#join-pool-button').click();
5+
cy.url().should('contain', '/add/ETH');
6+
});
77

88
it('import pool links to /import', () => {
9-
cy.get('#import-pool-link').click()
10-
cy.url().should('contain', '/find')
11-
})
12-
})
9+
cy.get('#import-pool-link').click();
10+
cy.url().should('contain', '/find');
11+
});
12+
});
Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,47 @@
11
describe('Remove Liquidity', () => {
22
it('redirects', () => {
3-
cy.visit('/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
3+
cy.visit(
4+
'/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85',
5+
);
46
cy.url().should(
57
'contain',
6-
'/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85'
7-
)
8-
})
8+
'/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85',
9+
);
10+
});
911

1012
it('eth remove', () => {
11-
cy.visit('/remove/ETH/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
12-
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'ETH')
13-
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR')
14-
})
13+
cy.visit('/remove/ETH/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85');
14+
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'ETH');
15+
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR');
16+
});
1517

1618
it('eth remove swap order', () => {
17-
cy.visit('/remove/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85/ETH')
18-
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'MKR')
19-
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'ETH')
20-
})
19+
cy.visit('/remove/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85/ETH');
20+
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'MKR');
21+
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'ETH');
22+
});
2123

2224
it('loads the two correct tokens', () => {
23-
cy.visit('/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
24-
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'WETH')
25-
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR')
26-
})
25+
cy.visit(
26+
'/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85',
27+
);
28+
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'WETH');
29+
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR');
30+
});
2731

2832
it('does not crash if ETH is duplicated', () => {
29-
cy.visit('/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xc778417E063141139Fce010982780140Aa0cD5Ab')
30-
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'WETH')
31-
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'WETH')
32-
})
33+
cy.visit(
34+
'/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xc778417E063141139Fce010982780140Aa0cD5Ab',
35+
);
36+
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'WETH');
37+
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'WETH');
38+
});
3339

3440
it('token not in storage is loaded', () => {
35-
cy.visit('/remove/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
36-
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'SKL')
37-
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR')
38-
})
39-
})
41+
cy.visit(
42+
'/remove/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85',
43+
);
44+
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'SKL');
45+
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR');
46+
});
47+
});

cypress/integration/send.test.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
describe('Send', () => {
22
it('should redirect', () => {
3-
cy.visit('/send')
4-
cy.url().should('include', '/swap')
5-
})
3+
cy.visit('/send');
4+
cy.url().should('include', '/swap');
5+
});
66

77
it('should redirect with url params', () => {
8-
cy.visit('/send?outputCurrency=ETH&recipient=bob.argent.xyz')
9-
cy.url().should('contain', '/swap?outputCurrency=ETH&recipient=bob.argent.xyz')
10-
})
11-
})
8+
cy.visit('/send?outputCurrency=ETH&recipient=bob.argent.xyz');
9+
cy.url().should(
10+
'contain',
11+
'/swap?outputCurrency=ETH&recipient=bob.argent.xyz',
12+
);
13+
});
14+
});

0 commit comments

Comments
 (0)