Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
83dfd30
Moving urls to env, file, optimizing returnTokenFromKey
RitzyDevBox Jun 14, 2022
2441bf0
Moving Commonly used tokens to Consts, Removing issues with Stable co…
RitzyDevBox Jun 14, 2022
f8df4b4
Using Redux to manage the LP Farms List so we can dynamically update …
RitzyDevBox Jun 15, 2022
82a2c3a
Adding support for syrups
RitzyDevBox Jun 17, 2022
79e06dd
Adding support for Dual farms list updates
RitzyDevBox Jun 17, 2022
5c931ee
fixing infinite looping issues
RitzyDevBox Jun 17, 2022
4f2e122
removing stake json now that it's unneeded
RitzyDevBox Jun 20, 2022
aa896ca
adding back missing dependencies
RitzyDevBox Jun 20, 2022
968d568
Fixing Syrups, Farms and dual farms to resolve tokens from hooks
RitzyDevBox Jun 21, 2022
89dfba2
Cleaning up references to ReturnTokenFromKey
RitzyDevBox Jun 21, 2022
40cb0eb
removing unused reference to UNI
RitzyDevBox Jun 21, 2022
458d9e3
simplifiying redundant operations
RitzyDevBox Jun 21, 2022
5093130
applying format to all files
RitzyDevBox Jun 21, 2022
e52d095
removing dead/unused code
RitzyDevBox Jun 21, 2022
6b94613
refactoring lair info to reuse the same logic
RitzyDevBox Jun 22, 2022
d194b65
refactoring common logic out into method
RitzyDevBox Jun 22, 2022
1f858b2
removing redundant calculations
RitzyDevBox Jun 22, 2022
33d99e2
unregister service workers that may be left over from previous builds…
RitzyDevBox Jun 22, 2022
8563d97
putting in hack to prevent us from continuing to maintain the tokens.…
RitzyDevBox Jun 22, 2022
bf3fc87
removing uni and using dummy token instead
RitzyDevBox Jun 23, 2022
edc7b15
fixing dual farms issue
RitzyDevBox Jun 23, 2022
456bcf1
toFixed throws when the currency decimals are less than the fixed amount
RitzyDevBox Jun 24, 2022
1f792b8
updaing to always show old info until we're ready to launch the new d…
RitzyDevBox Jun 27, 2022
bf74122
Removing code that will never hit with the existing configuration
RitzyDevBox Jun 27, 2022
7ae653c
refactoring based on pull request comments
RitzyDevBox Jun 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ REACT_APP_FORTMATIC_KEY="pk_live_F937DF033A1666BF"
REACT_APP_MOONPAY_KEY="pk_live_72EGoobLnlgc8WB7AaxyiWu2S43dj8eY"
REACT_APP_TRANSAK_KEY="258960cf-1e17-4419-bf7f-77443282f5da"
REACT_APP_GRAPH_API_URL="https://polygon.furadao.org/subgraphs/name/quickswap"
REACT_APP_PRDT_URL="https://prdt-quickswap-main.pages.dev/"
REACT_APP_PRDT_URL="https://prdt-quickswap-main.pages.dev/"
REACT_APP_SCAN_BASE_URL="https://polygonscan.com"
REACT_APP_TOKEN_LIST_DEFAULT_URL="https://unpkg.com/quickswap-default-token-list@latest/build/quickswap-default.tokenlist.json"
REACT_APP_STAKING_LIST_DEFAULT_URL="https://unpkg.com/quickswap-default-staking-list@latest/build/quickswap-default.lpfarms.json"
REACT_APP_DUAL_STAKING_LIST_DEFAULT_URL="https://unpkg.com/quickswap-default-staking-list@latest/build/quickswap-default.dualfarms.json"
REACT_APP_SYRUP_LIST_DEFAULT_URL="https://unpkg.com/quickswap-default-staking-list@latest/build/quickswap-default.syrups.json"
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ assignees: ''
A clear and concise description of the bug.

**Steps to Reproduce**

1. Go to ...
2. Click on ...
...
...

**Expected Behavior**
A clear and concise description of what you expected to happen.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Enabling users to:
- Participate in Dragon's syrup running on QuickSwap protocol

Useful links:

- Website: [quickswap.exchange](https://quickswap.exchange/)
- Beta: [beta.quickswap.exchange](https://beta.quickswap.exchange/)
- Info: [info.quickswap.exchange](https://info.quickswap.exchange)
Expand All @@ -24,7 +25,6 @@ To access the QuickSwap Interface, use an IPFS gateway link from the
[latest release](https://github.com/QuickSwap/interface-v2/releases/latest),
or visit [quickswap.exchange](https://quickswap.exchange).


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

Just go to `<your favorite public ipfs gateway>/ipns/quickswap.exchange`
Expand Down
66 changes: 48 additions & 18 deletions cypress/integration/add-liquidity.test.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,56 @@
describe('Add Liquidity', () => {
it('loads the two correct tokens', () => {
cy.visit('/pools?currency0=0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6&currency1=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619')
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'WBTC')
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'ETH')
})
cy.visit(
'/pools?currency0=0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6&currency1=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619',
);
cy.get('#add-liquidity-input-tokena .token-symbol-container').should(
'contain.text',
'WBTC',
);
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should(
'contain.text',
'ETH',
);
});

it('does not crash if ETH is duplicated', () => {
cy.visit('/pools?currency0=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619&currency1=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619')
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('not.contain.text', 'ETH')
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'ETH')
})
cy.visit(
'/pools?currency0=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619&currency1=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619',
);
cy.get('#add-liquidity-input-tokena .token-symbol-container').should(
'not.contain.text',
'ETH',
);
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should(
'contain.text',
'ETH',
);
});

it('token not in storage is loaded', () => {
cy.visit('/pools?currency0=0x64aFDF9e28946419E325d801Fb3053d8B8FFdC23&currency1=0x60bB3D364B765C497C8cE50AE0Ae3f0882c5bD05')
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'MEEB')
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'IMX')
})
cy.visit(
'/pools?currency0=0x64aFDF9e28946419E325d801Fb3053d8B8FFdC23&currency1=0x60bB3D364B765C497C8cE50AE0Ae3f0882c5bD05',
);
cy.get('#add-liquidity-input-tokena .token-symbol-container').should(
'contain.text',
'MEEB',
);
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should(
'contain.text',
'IMX',
);
});

it('single token can be selected', () => {
cy.visit('/pools?currency0=0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6')
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'WBTC')
cy.visit('/pools?currency0=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619')
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'ETH')
})
})
cy.visit('/pools?currency0=0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6');
cy.get('#add-liquidity-input-tokena .token-symbol-container').should(
'contain.text',
'WBTC',
);
cy.visit('/pools?currency0=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619');
cy.get('#add-liquidity-input-tokena .token-symbol-container').should(
'contain.text',
'ETH',
);
});
});
41 changes: 20 additions & 21 deletions cypress/integration/landing.test.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
import { TEST_ADDRESS_NEVER_USE_SHORTENED } from '../support/commands'
import { TEST_ADDRESS_NEVER_USE_SHORTENED } from '../support/commands';

describe('Landing Page', () => {
beforeEach(() => cy.visit('/'))
beforeEach(() => cy.visit('/'));
it('loads landing page', () => {
cy.get('#landing-page')
})

cy.get('#landing-page');
});

it('allows navigation to pool', () => {
cy.get('#pools-page-link').click()
cy.url().should('include', '/pools')
})
cy.get('#pools-page-link').click();
cy.url().should('include', '/pools');
});

it('allows navigation to swap', () => {
cy.get('#swap-page-link').click()
cy.url().should('include', '/swap')
})
cy.get('#swap-page-link').click();
cy.url().should('include', '/swap');
});

it('allows navigation to farm', () => {
cy.get('#farm-page-link').click()
cy.url().should('include', '/farm')
})
cy.get('#farm-page-link').click();
cy.url().should('include', '/farm');
});

it('allows navigation to dragons lair', () => {
cy.get('#dragons-page-link').click()
cy.url().should('include', '/dragons')
})
cy.get('#dragons-page-link').click();
cy.url().should('include', '/dragons');
});

it('allows navigation to analytics', () => {
cy.get('#analytics-page-link').click()
cy.url().should('include', '/analytics')
})
cy.get('#analytics-page-link').click();
cy.url().should('include', '/analytics');
});

/**it('is connected', () => {
cy.get('#web3-status-connected').click()
cy.get('#web3-account-identifier-row').contains(TEST_ADDRESS_NEVER_USE_SHORTENED)
})*/
})
});
28 changes: 14 additions & 14 deletions cypress/integration/lists.test.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
describe('Lists', () => {
beforeEach(() => {
cy.visit('/swap')
})
cy.visit('/swap');
});

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

it('change list', () => {
cy.get('#swap-currency-output .open-currency-select-button').click()
cy.get('#currency-search-change-list-button').click()
cy.get('#list-row-tokens-1inch-eth .select-button').click()
cy.get('#currency-search-selected-list-name').should('contain', '1inch')
cy.get('#currency-search-change-list-button').click()
cy.get('#list-row-tokens-uniswap-eth .select-button').click()
cy.get('#currency-search-selected-list-name').should('contain', 'Uniswap')
})
})
cy.get('#swap-currency-output .open-currency-select-button').click();
cy.get('#currency-search-change-list-button').click();
cy.get('#list-row-tokens-1inch-eth .select-button').click();
cy.get('#currency-search-selected-list-name').should('contain', '1inch');
cy.get('#currency-search-change-list-button').click();
cy.get('#list-row-tokens-uniswap-eth .select-button').click();
cy.get('#currency-search-selected-list-name').should('contain', 'Uniswap');
});
});
10 changes: 5 additions & 5 deletions cypress/integration/migrate-v1.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
describe('Migrate V1 Liquidity', () => {
describe('Remove V1 liquidity', () => {
it('renders the correct page', () => {
cy.visit('/remove/v1/0x93bB63aFe1E0180d0eF100D774B473034fd60C36')
cy.get('#remove-v1-exchange').should('contain', 'MKR/ETH')
})
})
})
cy.visit('/remove/v1/0x93bB63aFe1E0180d0eF100D774B473034fd60C36');
cy.get('#remove-v1-exchange').should('contain', 'MKR/ETH');
});
});
});
16 changes: 8 additions & 8 deletions cypress/integration/pool.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
describe('Pool', () => {
beforeEach(() => cy.visit('/pool'))
beforeEach(() => cy.visit('/pool'));
it('add liquidity links to /add/ETH', () => {
cy.get('#join-pool-button').click()
cy.url().should('contain', '/add/ETH')
})
cy.get('#join-pool-button').click();
cy.url().should('contain', '/add/ETH');
});

it('import pool links to /import', () => {
cy.get('#import-pool-link').click()
cy.url().should('contain', '/find')
})
})
cy.get('#import-pool-link').click();
cy.url().should('contain', '/find');
});
});
58 changes: 33 additions & 25 deletions cypress/integration/remove-liquidity.test.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,47 @@
describe('Remove Liquidity', () => {
it('redirects', () => {
cy.visit('/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
cy.visit(
'/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85',
);
cy.url().should(
'contain',
'/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85'
)
})
'/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85',
);
});

it('eth remove', () => {
cy.visit('/remove/ETH/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'ETH')
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR')
})
cy.visit('/remove/ETH/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85');
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'ETH');
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR');
});

it('eth remove swap order', () => {
cy.visit('/remove/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85/ETH')
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'MKR')
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'ETH')
})
cy.visit('/remove/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85/ETH');
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'MKR');
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'ETH');
});

it('loads the two correct tokens', () => {
cy.visit('/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'WETH')
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR')
})
cy.visit(
'/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85',
);
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'WETH');
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR');
});

it('does not crash if ETH is duplicated', () => {
cy.visit('/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xc778417E063141139Fce010982780140Aa0cD5Ab')
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'WETH')
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'WETH')
})
cy.visit(
'/remove/0xc778417E063141139Fce010982780140Aa0cD5Ab-0xc778417E063141139Fce010982780140Aa0cD5Ab',
);
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'WETH');
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'WETH');
});

it('token not in storage is loaded', () => {
cy.visit('/remove/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'SKL')
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR')
})
})
cy.visit(
'/remove/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d-0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85',
);
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'SKL');
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR');
});
});
17 changes: 10 additions & 7 deletions cypress/integration/send.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
describe('Send', () => {
it('should redirect', () => {
cy.visit('/send')
cy.url().should('include', '/swap')
})
cy.visit('/send');
cy.url().should('include', '/swap');
});

it('should redirect with url params', () => {
cy.visit('/send?outputCurrency=ETH&recipient=bob.argent.xyz')
cy.url().should('contain', '/swap?outputCurrency=ETH&recipient=bob.argent.xyz')
})
})
cy.visit('/send?outputCurrency=ETH&recipient=bob.argent.xyz');
cy.url().should(
'contain',
'/swap?outputCurrency=ETH&recipient=bob.argent.xyz',
);
});
});
Loading