Skip to content

Commit

Permalink
Feat/zap-earn (#2557)
Browse files Browse the repository at this point in the history
* feat: earning landing page

* feat: integrate api for zap earn landing

* implement pool explorer

* integrate liquidity widget

* add no data notify

* add missing 'chainId' from interfae

* fake a pool to open liquidity widget

* add navigate to earn landing page & open liquidity widget

* add feature favorite

* integrate new zap in widget ui

* add wallet connect & change network callback

* add loading for favorite to prevent multi click

* add interval re-fetch for pool data

* fix widget over height issue

* add pagination for pool data with tag

* fix height issue

* add dynamic data

* fix img radius

* fix ui

* add notify if dex is not suportted on chain

* add copy pool address to pool explorer mobile

* fix zap widget mobile full width

* remove change network callback

* fix default chain filter in pool explorer

* fix click action for card on landing page

* turn pool address copied to lower case

* fix earn tab on header and limit the displayed pools in landing page

* fix text color for error button

* fix pool address displayed color

* update env endpoint and liquidity widget version with Tailwind

* update liquidity widget code from main

* update wrong network message from liquidity widget

* update zap-earn endpoint from liquidity widget

* format displayed price

* show only chain that have pool data

* make dropdown content highlight by increasing brightness & re-format dex name

* fix dropdown width

* add tooltip for filter tab & add disclaimer

* fix bug change network but protocol still keep

* fix wrong network message

* add loading to landing page

* add token pair to list all tokens if don't have

* fix issue q from url query string disappear on reload

* integrate protocols sushiswapv3 & thrusterv3, fix issue widget doesn't get route when wrong network, fix placeholder in search input to remove token name

* add delay for toggle favorite

* reset search after change filter

* reset search after change filter

* fix dropdown ui

* add zap migration widget

* update yarn.lock

* fix migration widget ui

* my liquidity page

* switch to pre-release endpoint

* re-format data after switch to Krystal data

* responsive earn landing page

* fix endpoint of liquidity widget to pre release

* fix bug sorting in pool explorer page does not work

* fix bugs

* integrate API for my positions page

* add tooltip for position screen and empty data UI

* add tooltip for position screen and empty data UI

* add logic only remove search when change tag

* fix loading for positions page

* fix tooltip for desktop only

* fix description

* fix bug can not open zap widget for pancake protocol

* Update pool timeline and change Kyberswap to KyberSwap

* update zap widget

* update user position button

* fix bug sort pool when filtered by tag

* update description for transaction time limit in setting

* fix font family for zap widget

* fix font family for zap widget

* add some sort logic

* reset sort if pool filter by tag

* remove sort for pool with tags filter

* filter earn by 2 chains ETH and Base, 3 dexes Uniswap Pancakeswap and Sushiswap

* fix default chain logic

* add default sort when select all pools

* add action open increase zap widget for user position screen

* add position detail screen

* improve code struture position detail

* remove arb from list supported chain

* fix bugs

* integrate Kyber Earn API

* fix bug favorite pool when API fetched failed

* reset pool explorer data when API fetched failed

* write a utils func to format apr

* update new widget

* update widget

* fix user positions issues

* fix bugs widget

* fix bugs & improve widget

* fix price impact warning

* add tooltip for tvl in pool explorer

* fix issue widget

* update widget

* move zap migration out of zap in widget

* fix pool explorer wrapper max height

* fix widget styles affect outside

* fix widget

* fix: zap migration debounce liquidity out

* fix: koicl name

* feat: integrate zapout

* fix: zapout padding

* fix: zapout

* fix: zapout sushi

* fix: yarn lock

* remove unneccesary logs

* add liquidity chart to liquidity widget

* fix liquidity widget name

* add liquidity chart

* fix: zap migration swap impact

* add fee amount for pancake

* fix user positions filter

* add filter network and protocol for user position screen

* remove chart cursor

* fix token order

* fix: zap migration

* fix in-consistent token image

* fix: zap out select token

* add option all chains to user position filters

* fix earning fee calculation

* fix: zap out

* fix bug filter

* fix: zapout issues

* bugs fix

* bugs fix

* fix: zap migration

* fix bug chart

* fix: zap migration

* fix: zap migration

* fix zap widget

* fix liquidity chart if revert

* fix: zap migration cache store

* fix: zap migration cache store

* fix: zap migration source pos has 0 fee

* fix: cache pos

* fix bug zap in

* fix: zap out

* fix bug liquidity chart when set full range

* fix bug zap in

* feat: zap out responsive

* fix: issues

* feat: zap migraiton responsive

* fix: import token

* change earning 24h & 7d fee

* add connect wallet button for my position page

* add pool explorer button & my position button to position detail page

* fix button text

* redirect position detail to user position if wallet chaged

* fix: zap in

* fix bugs

* fix: zapout crash

* fix bugs liquidity chart

* update view pos

* fix bug liquidity chart

* fix bugs

* fix: zap out route

* fix: zap out route

* fix bugs liquidity chart

* fix: swap pi zap migration

* fix bugs liquidity chart

* fix bugs liquidity chart

* feat: integrate suggested slippage

* fix: zap migration tooltip

* chore: adjust suggested slp

* fix bugs liquidity chart

* add back action for zap migration widget

* switch to prod api

* switch Zap earn API to pre release

* change zap api endpoint

* fix: zap migration domain

* feat: default slp

* fix: change default slp

* chore: raise gas limit

* fix token total amount

* fix: slp warning

* switch zap earn api endpoint to production

* fix: slp warning

* format tick bottom on liquidity chart

* prepare release

---------

Co-authored-by: Tien Nguyen <dinhtiennguyen.1202@gmail.com>
  • Loading branch information
viet-nv and tienkane authored Jan 6, 2025
1 parent 85e4f16 commit 2dfa281
Show file tree
Hide file tree
Showing 70 changed files with 5,696 additions and 35 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ VITE_CAMPAIGN_URL=https://kyberswap-arbitrum-stip.kyberengineering.io/api
VITE_REFERRAL_URL=https://referral.kyberswap.com/api

VITE_TOKEN_API_URL=https://pre-token-api.kyberengineering.io/api
VITE_ZAP_EARN_URL=https://zap-earn-service.kyberengineering.io/api
1 change: 1 addition & 0 deletions .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ VITE_CAMPAIGN_URL=https://kyberswap-arbitrum-stip.kyberengineering.io/api
VITE_REFERRAL_URL=https://referral.kyberswap.com/api

VITE_TOKEN_API_URL=https://pre-token-api.kyberengineering.io/api
VITE_ZAP_EARN_URL=https://zap-earn-service.kyberengineering.io/api
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ VITE_CAMPAIGN_URL=https://kyberswap-arbitrum-stip.kyberengineering.io/api
VITE_REFERRAL_URL=https://referral.kyberswap.com/api

VITE_TOKEN_API_URL=https://token-api.kyberengineering.io/api
VITE_ZAP_EARN_URL=https://zap-earn-service.kyberengineering.io/api
1 change: 1 addition & 0 deletions .env.stg
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ VITE_CAMPAIGN_URL=https://kyberswap-arbitrum-stip.kyberengineering.io/api
VITE_REFERRAL_URL=https://referral.kyberswap.com/api

VITE_TOKEN_API_URL=https://pre-token-api.kyberengineering.io/api
VITE_ZAP_EARN_URL=https://zap-earn-service.kyberengineering.io/api
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
"@kyberswap/ks-sdk-classic": "^1.0.3",
"@kyberswap/ks-sdk-core": "1.1.7",
"@kyberswap/ks-sdk-elastic": "^1.1.2",
"@kyberswap/liquidity-widgets": "1.1.0",
"@kyberswap/zap-migration-widgets": "1.0.0",
"@kyberswap/oauth2": "1.0.2",
"@lingui/macro": "^4.6.0",
"@lingui/react": "^4.6.0",
Expand Down
Binary file added src/assets/images/earn-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/svg/cursor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svg/fire.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/assets/svg/help-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/svg/ic_earn_not_found.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/svg/ic_left_arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/assets/svg/ic_pool_high_apr.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/svg/ic_pool_highlighted.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions src/assets/svg/ic_pool_low_volatility.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/assets/svg/ic_pool_solid_earning.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/svg/ic_user_earn_position.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/assets/svg/liquidity-pools.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/assets/svg/liquidity-positions.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/assets/svg/low-volatility.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions src/assets/svg/play-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2dfa281

Please sign in to comment.