Skip to content

Commit

Permalink
Merge develop to master (#327)
Browse files Browse the repository at this point in the history
* add status to strateiges list

Signed-off-by: belbazanas <[email protected]>

* update amplifyOrder documentation link (#195)

Signed-off-by: belbazanas <[email protected]>

* fix strategies list status

Signed-off-by: belbazanas <[email protected]>

* Plug Incentives api wip

* save update after refill progress

Signed-off-by: belbazanas <[email protected]>

* end points

* enable the menu

* fix build

* edit kandel strategy + re-open

Signed-off-by: belbazanas <[email protected]>

* Add community points and boosts informations into Page points

* remove re-fill row + fix build

Signed-off-by: belbazanas <[email protected]>

* Update form legend and reward display, fix information banner text, and redirect after successful edit

Signed-off-by: belbazanas <[email protected]>

* Refactor leaderboard table and use-table components

* Remove console.log statements and improve boost page

* Add pagination to leaderboard

* Points page: Tables loading improvements, separate user table from leaderboard table and add link to doc

* add total count of traders

* add kandel smart router in UI + fixes (#197)

* Update strategy type to smart in multiple files

Signed-off-by: belbazanas <[email protected]>

* update mangrove sdk and indexer,add strategy smart router hooks,  add new kandel type, update default values

Signed-off-by: belbazanas <[email protected]>

* update overall logics types for build

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* fix strategies list value + minor text changesB (#198)

Signed-off-by: belbazanas <[email protected]>

* Fix/asana kandel fixes 1 (#199)

* fix strategies list value + minor text changesB

Signed-off-by: belbazanas <[email protected]>

* fix total inventory and update strategies row click redirection

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* Fix/edit kandel strategy (#200)

* fix edit strategy hook + decimals in dialogs

Signed-off-by: belbazanas <[email protected]>

* remove logs

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* add metadatas and change points banner text

* Refactor all strategies page to use no. of offers instead of no. of price points

* Fix spread calculation in orderbook.tsx to avoid negative values

* fix level if the user is level 5

* Remove unused code related to priceRatio (#202)

* Remove unused code related to priceRatio

Signed-off-by: belbazanas <[email protected]>

* redirect to edit strategy from strategy list

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* remove the junk

* fix indexer sdk (#204)

* Fix/minor kandel fixes (#205)

* Update button labels in EditStrategyDialog and useForm

Signed-off-by: belbazanas <[email protected]>

* Update parameters table to display step size and locked bounty

Signed-off-by: belbazanas <[email protected]>

* Update history and parameters components

Signed-off-by: belbazanas <[email protected]>

* Update launch strategy button label to Publish

Signed-off-by: belbazanas <[email protected]>

* Add source icon for pacFinance

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* Update close strategy dialog message (#206)

Signed-off-by: belbazanas <[email protected]>

* Fix bounty deposit validation (#207)

Signed-off-by: belbazanas <[email protected]>

* Fix/kandel closed strategies (#208)

* Update leaderboard table, change header from Return (%) to PnL (%). Update lockedBounty display in parameters table.

Signed-off-by: belbazanas <[email protected]>

* Remove AverageReturn component from PriceRange

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* diable strategies

Signed-off-by: belbazanas <[email protected]>

* Update table headers, disable close strategy if no live offers, remove wrong tooltips (#213)

Signed-off-by: belbazanas <[email protected]>

* Remove console.log statements

Signed-off-by: belbazanas <[email protected]>

* show boosts (#215)

Co-authored-by: Johan le Roch <[email protected]>
Co-authored-by: Anas <[email protected]>

* Fix/points volume message (#216)

* show boosts

* show nft boosts

* show boost value returned by /points endpoint

* fix zod conversion error

* show message

* revert points update message

---------

Co-authored-by: Johan le Roch <[email protected]>

* Update navbar.tsx, disable strategies in production

* enable strategies tab on staging

Signed-off-by: belbazanas <[email protected]>

* Add warning banner component to strategy layout

Signed-off-by: belbazanas <[email protected]>

* Update warning banner close button styling

Signed-off-by: belbazanas <[email protected]>

* Fix typo in base deposit error message

Signed-off-by: belbazanas <[email protected]>

* Add market selector component and update info bar component, testing feeback fixes

Signed-off-by: belbazanas <[email protected]>

* Update useForm hook to reset form fields when market changes

Signed-off-by: belbazanas <[email protected]>

* update strategy warning banner message

Signed-off-by: belbazanas <[email protected]>

* fix build

Signed-off-by: belbazanas <[email protected]>

* Update 'No. of offers' to 'Nb. of offers' in various components

Signed-off-by: belbazanas <[email protected]>

* Do workaround to merge nft and volume points on the FE

* Add usePnL hook and update components to display pnl data

Signed-off-by: belbazanas <[email protected]>

* Fix build issue

* Refactor use-parameters and unrealized-pnl components

Signed-off-by: belbazanas <[email protected]>

* Refactor useParameters function to handle pnlQuote and returnRate with market symbol

Signed-off-by: belbazanas <[email protected]>

* bump mangrove.js (#229)

* Update navbar.tsx

* Add useResolveWhenBlockIsIndexed hook to useEditKandelStrategy (#224)

Signed-off-by: belbazanas <[email protected]>

* enable strategies on staging

Signed-off-by: belbazanas <[email protected]>

* review gasreq for minvolume on kandel strategies

Signed-off-by: belbazanas <[email protected]>

* Feat/withdrawable inventory (#233)

* Add withdrawable balance feature

Signed-off-by: belbazanas <[email protected]>

* pnl fix

* change namming

* Fix inventory order in parameters component

Signed-off-by: belbazanas <[email protected]>

* Fix withdrawal button disabled logic

Signed-off-by: belbazanas <[email protected]>

* fix withdraw balance button disabling condition

Signed-off-by: belbazanas <[email protected]>

* remove logs

Signed-off-by: belbazanas <[email protected]>

* Fix display issue for closed pnlQuote and returnRate

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>
Co-authored-by: Johan le Roch <[email protected]>

* fix withdraw balance format

Signed-off-by: belbazanas <[email protected]>

* fix distribution reactivity

Signed-off-by: belbazanas <[email protected]>

* Update warning banner styling and functionality

Signed-off-by: belbazanas <[email protected]>

* Update pnlQuote and returnRate values

Signed-off-by: belbazanas <[email protected]>

* hide pnl value

Signed-off-by: belbazanas <[email protected]>

* Add parametersHistory schema and update related components

Signed-off-by: belbazanas <[email protected]>

* Fix display issue in useParametersTable and update steps in EditStrategyDialog

Signed-off-by: belbazanas <[email protected]>

* remove logs

Signed-off-by: belbazanas <[email protected]>

* epoch on tables

* fix

* fix texts

* fix gas issues

* Fix edit LO orders + Refactor code to fix display issues

Signed-off-by: belbazanas <[email protected]>

* Feat/strategy liquidity sourcing (#241)

* add LS to new kandel strategy

Signed-off-by: belbazanas <[email protected]>

* add liquidity sourcing in edit, hide liquidity sourcing infos waiting for sdk

Signed-off-by: belbazanas <[email protected]>

* Fix liquidity sourcing token allowance query + Refactor code

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* update SDK to overestimate gas estimation for kandels

Signed-off-by: belbazanas <[email protected]>

* fix chart

* fix token symbol on price range chart

* Enable from the start the liquidity sourcing fields in strategies/new component

Signed-off-by: belbazanas <[email protected]>

* remove unused code

Signed-off-by: belbazanas <[email protected]>

* fix edit strategy useForm hook to set default values

Signed-off-by: belbazanas <[email protected]>

* Feat/epoc leaderboard (#251)

* WIP

* end epoch leaderboard

* adapt zod epoch model

* Hide boost column from total tab

* chore: Refactor use-liquidity-sourcing.ts to use react-query for data fetching

Signed-off-by: belbazanas <[email protected]>

* epoch / leaderboard

* fix build

* refactor points page

* chore: Refactor strategies list search input component and add sorting functionality

Signed-off-by: belbazanas <[email protected]>

* save wip

Signed-off-by: belbazanas <[email protected]>

* chore: Refactor use-parameters.ts to handle upcoming values for pnlQuote and returnRate

Signed-off-by: belbazanas <[email protected]>

* update pnpm

* Update volumes and boost to use new API (#254)

* Add new data for boosts/volumes

* Use volume not points for MS1 banner

* Revert "Update volumes and boost to use new API (#254)" (#256)

This reverts commit 64831ae.

* Fix/volumes and boosts (#255)

* Add new data for boosts/volumes

* Use volume not points for MS1 banner

---------

Co-authored-by: Daniel <[email protected]>

* call the price api and delay the indexer sdk until the usdb prices are fetched (#253)

* temporary remove liquidity sourcing

Signed-off-by: belbazanas <[email protected]>

* update edit base/quote deposit inputs decimals

Signed-off-by: belbazanas <[email protected]>

* fix nextjs version

* Feat/new sdk kandel (#260)

* feat: new sdk

* progress

* feat: continue

* new sdk - save wip

Signed-off-by: belbazanas <[email protected]>

* new sdk - save wip

Signed-off-by: belbazanas <[email protected]>

* new sdk - save wip

Signed-off-by: belbazanas <[email protected]>

* new sdk wip market/limit orders

Signed-off-by: belbazanas <[email protected]>

* new sdk - retract order

Signed-off-by: belbazanas <[email protected]>

* update new sdk, chores

Signed-off-by: belbazanas <[email protected]>

* new sdk save wip

Signed-off-by: belbazanas <[email protected]>

* new sdk - project building and limit/market orders working :)

Signed-off-by: belbazanas <[email protected]>

* new sdk - kandel wip

Signed-off-by: belbazanas <[email protected]>

* new sdk - kandel wip

Signed-off-by: belbazanas <[email protected]>

* new kandel - fix build

Signed-off-by: belbazanas <[email protected]>

* new kandel - fix build

Signed-off-by: belbazanas <[email protected]>

* Market simulation estimatedFrom send input

* compute estimation from receive field

* new kandel - fix creation

Signed-off-by: belbazanas <[email protected]>

* kandel - save wip

Signed-off-by: belbazanas <[email protected]>

* end market order refactor + refresh balances

* wip market / limit refactor

* new sdk edit kandel

Signed-off-by: belbazanas <[email protected]>

* new sdk fix build

Signed-off-by: belbazanas <[email protected]>

* fix build

Signed-off-by: belbazanas <[email protected]>

* remove frozen lock file

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>
Co-authored-by: Maxence Raballand <[email protected]>
Co-authored-by: belbazanas <[email protected]>

* remove amplifed orders (#263)

* remove amplifed orders

Signed-off-by: belbazanas <[email protected]>

* Update join-program-banner.tsx

---------

Signed-off-by: belbazanas <[email protected]>

* fix kandel page display

Signed-off-by: belbazanas <[email protected]>

* fix kandel page display

Signed-off-by: belbazanas <[email protected]>

* fix kandel creation

Signed-off-by: belbazanas <[email protected]>

* fix kandel creation

Signed-off-by: belbazanas <[email protected]>

* fix kandel market selector

Signed-off-by: belbazanas <[email protected]>

* fix build

Signed-off-by: belbazanas <[email protected]>

* add error message in post market order

Signed-off-by: belbazanas <[email protected]>

* add table to vaults list

Signed-off-by: belbazanas <[email protected]>

* vault ui implementation

Signed-off-by: belbazanas <[email protected]>

* fix build

Signed-off-by: belbazanas <[email protected]>

* vault UI enhancements

Signed-off-by: belbazanas <[email protected]>

* fix logics icons + delete unused code

Signed-off-by: belbazanas <[email protected]>

* fix default limit order price

Signed-off-by: belbazanas <[email protected]>

* fix default limit order price bug

Signed-off-by: belbazanas <[email protected]>

* feat: list

* kandel fix: display offers in price range chart

Signed-off-by: belbazanas <[email protected]>

* feat: add page

* feat: advance

* feat: advance

* add vault dialogs

Signed-off-by: belbazanas <[email protected]>

* vault remove liquidity dialog update

Signed-off-by: belbazanas <[email protected]>

* temporary fix vaults list query

Signed-off-by: belbazanas <[email protected]>

* temporary fix vault query

Signed-off-by: belbazanas <[email protected]>

* kandel: fix price chart dots

Signed-off-by: belbazanas <[email protected]>

* feat: advance

* feat: advance

* feat: advance

* limit order: fix default price (#270)

Signed-off-by: belbazanas <[email protected]>

* Fix/cancel limit order (#271)

* limit order: fix default price

Signed-off-by: belbazanas <[email protected]>

* limit order: fix cancel order

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* fix: max amounts and errors in ABI
- Added test Skate vault

* Feat/base testnet (#272)

* baseTestnet: remove old mgv sdk + comment amplified order files

Signed-off-by: belbazanas <[email protected]>

* implement baseTestnet + faucet

Signed-off-by: belbazanas <[email protected]>

* remove old sdk mergedOffers save wip

Signed-off-by: belbazanas <[email protected]>

* BaseTestnet implementation wip

Signed-off-by: belbazanas <[email protected]>

* kandel: remove error on first load

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* Feat/base testnet (#273)

* baseTestnet: remove old mgv sdk + comment amplified order files

Signed-off-by: belbazanas <[email protected]>

* implement baseTestnet + faucet

Signed-off-by: belbazanas <[email protected]>

* remove old sdk mergedOffers save wip

Signed-off-by: belbazanas <[email protected]>

* BaseTestnet implementation wip

Signed-off-by: belbazanas <[email protected]>

* kandel: remove error on first load

Signed-off-by: belbazanas <[email protected]>

* remove last old SDK traces

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* cleanup

* zod schema for total points

* navbar: remove posthog check for strategies

Signed-off-by: belbazanas <[email protected]>

* Feat/base testnet (#276)

* baseTestnet: remove old mgv sdk + comment amplified order files

Signed-off-by: belbazanas <[email protected]>

* implement baseTestnet + faucet

Signed-off-by: belbazanas <[email protected]>

* remove old sdk mergedOffers save wip

Signed-off-by: belbazanas <[email protected]>

* BaseTestnet implementation wip

Signed-off-by: belbazanas <[email protected]>

* kandel: remove error on first load

Signed-off-by: belbazanas <[email protected]>

* remove last old SDK traces

Signed-off-by: belbazanas <[email protected]>

* trade: refresh tabs on market update + remove amplified table

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* feat: vault

* Feat/strategy ls fixes (#277)

* kandel: re-activate liquidity sourcing

Signed-off-by: belbazanas <[email protected]>

* kandel: detail page wip

Signed-off-by: belbazanas <[email protected]>

* kandel: remove strategyQuery from priceRange overview

Signed-off-by: belbazanas <[email protected]>

* kandel: total inventory display, remove mangrove.jspackage

Signed-off-by: belbazanas <[email protected]>

* trade: fix limit order default price

Signed-off-by: belbazanas <[email protected]>

* kandel: fix edit workflow wip

Signed-off-by: belbazanas <[email protected]>

* retractParams: add type

Signed-off-by: belbazanas <[email protected]>

* kandel: fix retract offers

Signed-off-by: belbazanas <[email protected]>

* kandel: fix edit strat

Signed-off-by: belbazanas <[email protected]>

* kandel: strategies list save wip

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* Fix build

* kandel: refetch strategy list on close (#278)

* kandel: refetch strategy list on close

Signed-off-by: belbazanas <[email protected]>

* remove log

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* fix computeReceiveAmount

* fix computeSendAmount

* Fix/last minutes fixes (#279)

* kandel: refetch strategy list on close

Signed-off-by: belbazanas <[email protected]>

* remove log

Signed-off-by: belbazanas <[email protected]>

* kandel-trade: fixes

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* remove logs

Signed-off-by: belbazanas <[email protected]>

* fix parseUnits

* trade: disable cancel offer

Signed-off-by: belbazanas <[email protected]>

* add usde token logo

* fix: change skate vault list (#280)

* fix: change skate vault list

* chore: revert lockfile change

* trade: mute edit order

Signed-off-by: belbazanas <[email protected]>

* vaul: minor changes

Signed-off-by: belbazanas <[email protected]>

* vaul: minor changes

Signed-off-by: belbazanas <[email protected]>

* vaul: remove Big.js in strategies

Signed-off-by: belbazanas <[email protected]>

* ENG-268: Fix slider value calculation in Limit component (#293)

* ENG-268: Fix slider value calculation in Limit component

The commit fixes the calculation of the slider value in the Limit component. It now correctly calculates the value based on the send balance and send amount.

* fix: market order slider inout

Signed-off-by: belbazanas <[email protected]>

* refactor: minor refacto

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>
Co-authored-by: belbazanas <[email protected]>

* strategy: enable close strategy in all cases (#297)

* Feat/strategy current provision (#298)

* improve initial zoom (#303)

* improve initial zoom

* cleaning some logs

* cleaning some logs

* try to fix top gap on layout with some extensions (#300)

* eng-299: update sdk to display 4 decimals to USD prices (#302)

* ENG-269: Fix percentage bar error (market) (#295)

Co-authored-by: Johan le Roch <[email protected]>

* add blast token

* update mgv sdk

* Synapse Widget (#296) (#309)

* Synapse Widget (#296)

* add feedbacks

Signed-off-by: belbazanas <[email protected]>

* update amplified tables after edit + feedbacks

Signed-off-by: belbazanas <[email protected]>

* close sheet after edit dialog

Signed-off-by: belbazanas <[email protected]>

* display errors in bottom
amplifed form

Signed-off-by: belbazanas <[email protected]>

* ui minor changes

Signed-off-by: belbazanas <[email protected]>

* update mangrove sdk+ add expiry date in tables and sheet

Signed-off-by: belbazanas <[email protected]>

* re-arrange the toast messages

Signed-off-by: belbazanas <[email protected]>

* Debug kandel

* fix errors

* fixes

* edit expiry date

Signed-off-by: belbazanas <[email protected]>

* replace retracted by cancelled

Signed-off-by: belbazanas <[email protected]>

* WIP dialog improvements

* check if atleast one offer is open

Signed-off-by: belbazanas <[email protected]>

* add chain id as a dependency to 'strategies' query

* fix maxPrice

* parameters values improvements

* bounty tooltip

* check if atleast one offer is open

Signed-off-by: belbazanas <[email protected]>

* save wip

Signed-off-by: belbazanas <[email protected]>

* unwrap eth v1 (#187)

Signed-off-by: belbazanas <[email protected]>

* optimize orbit image

* save wip

Signed-off-by: belbazanas <[email protected]>

* invalidate offers query

Signed-off-by: belbazanas <[email protected]>

* save wip

Signed-off-by: belbazanas <[email protected]>

* save wip

Signed-off-by: belbazanas <[email protected]>

* save wip

Signed-off-by: belbazanas <[email protected]>

* add status to strateiges list

Signed-off-by: belbazanas <[email protected]>

* update amplifyOrder documentation link (#195)

Signed-off-by: belbazanas <[email protected]>

* fix strategies list status

Signed-off-by: belbazanas <[email protected]>

* Plug Incentives api wip

* save update after refill progress

Signed-off-by: belbazanas <[email protected]>

* end points

* enable the menu

* fix build

* edit kandel strategy + re-open

Signed-off-by: belbazanas <[email protected]>

* Add community points and boosts informations into Page points

* remove re-fill row + fix build

Signed-off-by: belbazanas <[email protected]>

* Update form legend and reward display, fix information banner text, and redirect after successful edit

Signed-off-by: belbazanas <[email protected]>

* Refactor leaderboard table and use-table components

* Remove console.log statements and improve boost page

* Add pagination to leaderboard

* Points page: Tables loading improvements, separate user table from leaderboard table and add link to doc

* add total count of traders

* add kandel smart router in UI + fixes (#197)

* Update strategy type to smart in multiple files

Signed-off-by: belbazanas <[email protected]>

* update mangrove sdk and indexer,add strategy smart router hooks,  add new kandel type, update default values

Signed-off-by: belbazanas <[email protected]>

* update overall logics types for build

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* fix strategies list value + minor text changesB (#198)

Signed-off-by: belbazanas <[email protected]>

* Fix/asana kandel fixes 1 (#199)

* fix strategies list value + minor text changesB

Signed-off-by: belbazanas <[email protected]>

* fix total inventory and update strategies row click redirection

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* Fix/edit kandel strategy (#200)

* fix edit strategy hook + decimals in dialogs

Signed-off-by: belbazanas <[email protected]>

* remove logs

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* add metadatas and change points banner text

* Refactor all strategies page to use no. of offers instead of no. of price points

* Fix spread calculation in orderbook.tsx to avoid negative values

* fix level if the user is level 5

* Remove unused code related to priceRatio (#202)

* Remove unused code related to priceRatio

Signed-off-by: belbazanas <[email protected]>

* redirect to edit strategy from strategy list

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* remove the junk

* fix indexer sdk (#204)

* Fix/minor kandel fixes (#205)

* Update button labels in EditStrategyDialog and useForm

Signed-off-by: belbazanas <[email protected]>

* Update parameters table to display step size and locked bounty

Signed-off-by: belbazanas <[email protected]>

* Update history and parameters components

Signed-off-by: belbazanas <[email protected]>

* Update launch strategy button label to Publish

Signed-off-by: belbazanas <[email protected]>

* Add source icon for pacFinance

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* Update close strategy dialog message (#206)

Signed-off-by: belbazanas <[email protected]>

* Fix bounty deposit validation (#207)

Signed-off-by: belbazanas <[email protected]>

* Fix/kandel closed strategies (#208)

* Update leaderboard table, change header from Return (%) to PnL (%). Update lockedBounty display in parameters table.

Signed-off-by: belbazanas <[email protected]>

* Remove AverageReturn component from PriceRange

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* diable strategies

Signed-off-by: belbazanas <[email protected]>

* Update table headers, disable close strategy if no live offers, remove wrong tooltips (#213)

Signed-off-by: belbazanas <[email protected]>

* Remove console.log statements

Signed-off-by: belbazanas <[email protected]>

* show boosts (#215)

Co-authored-by: Johan le Roch <[email protected]>
Co-authored-by: Anas <[email protected]>

* Fix/points volume message (#216)

* show boosts

* show nft boosts

* show boost value returned by /points endpoint

* fix zod conversion error

* show message

* revert points update message

---------

Co-authored-by: Johan le Roch <[email protected]>

* Update navbar.tsx, disable strategies in production

* enable strategies tab on staging

Signed-off-by: belbazanas <[email protected]>

* Add warning banner component to strategy layout

Signed-off-by: belbazanas <[email protected]>

* Update warning banner close button styling

Signed-off-by: belbazanas <[email protected]>

* Fix typo in base deposit error message

Signed-off-by: belbazanas <[email protected]>

* Add market selector component and update info bar component, testing feeback fixes

Signed-off-by: belbazanas <[email protected]>

* Update useForm hook to reset form fields when market changes

Signed-off-by: belbazanas <[email protected]>

* update strategy warning banner message

Signed-off-by: belbazanas <[email protected]>

* fix build

Signed-off-by: belbazanas <[email protected]>

* Update 'No. of offers' to 'Nb. of offers' in various components

Signed-off-by: belbazanas <[email protected]>

* Do workaround to merge nft and volume points on the FE

* Add usePnL hook and update components to display pnl data

Signed-off-by: belbazanas <[email protected]>

* Fix build issue

* Refactor use-parameters and unrealized-pnl components

Signed-off-by: belbazanas <[email protected]>

* Refactor useParameters function to handle pnlQuote and returnRate with market symbol

Signed-off-by: belbazanas <[email protected]>

* bump mangrove.js (#229)

* Update navbar.tsx

* Add useResolveWhenBlockIsIndexed hook to useEditKandelStrategy (#224)

Signed-off-by: belbazanas <[email protected]>

* enable strategies on staging

Signed-off-by: belbazanas <[email protected]>

* review gasreq for minvolume on kandel strategies

Signed-off-by: belbazanas <[email protected]>

* Feat/withdrawable inventory (#233)

* Add withdrawable balance feature

Signed-off-by: belbazanas <[email protected]>

* pnl fix

* change namming

* Fix inventory order in parameters component

Signed-off-by: belbazanas <[email protected]>

* Fix withdrawal button disabled logic

Signed-off-by: belbazanas <[email protected]>

* fix withdraw balance button disabling condition

Signed-off-by: belbazanas <[email protected]>

* remove logs

Signed-off-by: belbazanas <[email protected]>

* Fix display issue for closed pnlQuote and returnRate

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>
Co-authored-by: Johan le Roch <[email protected]>

* fix withdraw balance format

Signed-off-by: belbazanas <[email protected]>

* fix distribution reactivity

Signed-off-by: belbazanas <[email protected]>

* Update warning banner styling and functionality

Signed-off-by: belbazanas <[email protected]>

* Update pnlQuote and returnRate values

Signed-off-by: belbazanas <[email protected]>

* hide pnl value

Signed-off-by: belbazanas <[email protected]>

* Add parametersHistory schema and update related components

Signed-off-by: belbazanas <[email protected]>

* Fix display issue in useParametersTable and update steps in EditStrategyDialog

Signed-off-by: belbazanas <[email protected]>

* remove logs

Signed-off-by: belbazanas <[email protected]>

* epoch on tables

* fix

* fix texts

* fix gas issues

* Fix edit LO orders + Refactor code to fix display issues

Signed-off-by: belbazanas <[email protected]>

* Feat/strategy liquidity sourcing (#241)

* add LS to new kandel strategy

Signed-off-by: belbazanas <[email protected]>

* add liquidity sourcing in edit, hide liquidity sourcing infos waiting for sdk

Signed-off-by: belbazanas <[email protected]>

* Fix liquidity sourcing token allowance query + Refactor code

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* update SDK to overestimate gas estimation for kandels

Signed-off-by: belbazanas <[email protected]>

* fix chart

* fix token symbol on price range chart

* Enable from the start the liquidity sourcing fields in strategies/new component

Signed-off-by: belbazanas <[email protected]>

* remove unused code

Signed-off-by: belbazanas <[email protected]>

* fix edit strategy useForm hook to set default values

Signed-off-by: belbazanas <[email protected]>

* Feat/epoc leaderboard (#251)

* WIP

* end epoch leaderboard

* adapt zod epoch model

* Hide boost column from total tab

* chore: Refactor use-liquidity-sourcing.ts to use react-query for data fetching

Signed-off-by: belbazanas <[email protected]>

* epoch / leaderboard

* fix build

* refactor points page

* chore: Refactor strategies list search input component and add sorting functionality

Signed-off-by: belbazanas <[email protected]>

* save wip

Signed-off-by: belbazanas <[email protected]>

* chore: Refactor use-parameters.ts to handle upcoming values for pnlQuote and returnRate

Signed-off-by: belbazanas <[email protected]>

* update pnpm

* Update volumes and boost to use new API (#254)

* Add new data for boosts/volumes

* Use volume not points for MS1 banner

* Revert "Update volumes and boost to use new API (#254)" (#256)

This reverts commit 64831ae.

* Fix/volumes and boosts (#255)

* Add new data for boosts/volumes

* Use volume not points for MS1 banner

---------

Co-authored-by: Daniel <[email protected]>

* call the price api and delay the indexer sdk until the usdb prices are fetched (#253)

* temporary remove liquidity sourcing

Signed-off-by: belbazanas <[email protected]>

* update edit base/quote deposit inputs decimals

Signed-off-by: belbazanas <[email protected]>

* fix nextjs version

* Feat/new sdk kandel (#260)

* feat: new sdk

* progress

* feat: continue

* new sdk - save wip

Signed-off-by: belbazanas <[email protected]>

* new sdk - save wip

Signed-off-by: belbazanas <[email protected]>

* new sdk - save wip

Signed-off-by: belbazanas <[email protected]>

* new sdk wip market/limit orders

Signed-off-by: belbazanas <[email protected]>

* new sdk - retract order

Signed-off-by: belbazanas <[email protected]>

* update new sdk, chores

Signed-off-by: belbazanas <[email protected]>

* new sdk save wip

Signed-off-by: belbazanas <[email protected]>

* new sdk - project building and limit/market orders working :)

Signed-off-by: belbazanas <[email protected]>

* new sdk - kandel wip

Signed-off-by: belbazanas <[email protected]>

* new sdk - kandel wip

Signed-off-by: belbazanas <[email protected]>

* new kandel - fix build

Signed-off-by: belbazanas <[email protected]>

* new kandel - fix build

Signed-off-by: belbazanas <[email protected]>

* Market simulation estimatedFrom send input

* compute estimation from receive field

* new kandel - fix creation

Signed-off-by: belbazanas <[email protected]>

* kandel - save wip

Signed-off-by: belbazanas <[email protected]>

* end market order refactor + refresh balances

* wip market / limit refactor

* new sdk edit kandel

Signed-off-by: belbazanas <[email protected]>

* new sdk fix build

Signed-off-by: belbazanas <[email protected]>

* fix build

Signed-off-by: belbazanas <[email protected]>

* remove frozen lock file

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>
Co-authored-by: Maxence Raballand <[email protected]>
Co-authored-by: belbazanas <[email protected]>

* remove amplifed orders (#263)

* remove amplifed orders

Signed-off-by: belbazanas <[email protected]>

* Update join-program-banner.tsx

---------

Signed-off-by: belbazanas <[email protected]>

* fix kandel page display

Signed-off-by: belbazanas <[email protected]>

* fix kandel page display

Signed-off-by: belbazanas <[email protected]>

* fix kandel creation

Signed-off-by: belbazanas <[email protected]>

* fix kandel creation

Signed-off-by: belbazanas <[email protected]>

* fix kandel market selector

Signed-off-by: belbazanas <[email protected]>

* fix build

Signed-off-by: belbazanas <[email protected]>

* add error message in post market order

Signed-off-by: belbazanas <[email protected]>

* add table to vaults list

Signed-off-by: belbazanas <[email protected]>

* vault ui implementation

Signed-off-by: belbazanas <[email protected]>

* fix build

Signed-off-by: belbazanas <[email protected]>

* vault UI enhancements

Signed-off-by: belbazanas <[email protected]>

* fix logics icons + delete unused code

Signed-off-by: belbazanas <[email protected]>

* fix default limit order price

Signed-off-by: belbazanas <[email protected]>

* fix default limit order price bug

Signed-off-by: belbazanas <[email protected]>

* feat: list

* kandel fix: display offers in price range chart

Signed-off-by: belbazanas <[email protected]>

* feat: add page

* feat: advance

* feat: advance

* add vault dialogs

Signed-off-by: belbazanas <[email protected]>

* vault remove liquidity dialog update

Signed-off-by: belbazanas <[email protected]>

* temporary fix vaults list query

Signed-off-by: belbazanas <[email protected]>

* temporary fix vault query

Signed-off-by: belbazanas <[email protected]>

* kandel: fix price chart dots

Signed-off-by: belbazanas <[email protected]>

* feat: advance

* feat: advance

* feat: advance

* limit order: fix default price (#270)

Signed-off-by: belbazanas <[email protected]>

* Fix/cancel limit order (#271)

* limit order: fix default price

Signed-off-by: belbazanas <[email protected]>

* limit order: fix cancel order

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* fix: max amounts and errors in ABI
- Added test Skate vault

* Feat/base testnet (#272)

* baseTestnet: remove old mgv sdk + comment amplified order files

Signed-off-by: belbazanas <[email protected]>

* implement baseTestnet + faucet

Signed-off-by: belbazanas <[email protected]>

* remove old sdk mergedOffers save wip

Signed-off-by: belbazanas <[email protected]>

* BaseTestnet implementation wip

Signed-off-by: belbazanas <[email protected]>

* kandel: remove error on first load

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* Feat/base testnet (#273)

* baseTestnet: remove old mgv sdk + comment amplified order files

Signed-off-by: belbazanas <[email protected]>

* implement baseTestnet + faucet

Signed-off-by: belbazanas <[email protected]>

* remove old sdk mergedOffers save wip

Signed-off-by: belbazanas <[email protected]>

* BaseTestnet implementation wip

Signed-off-by: belbazanas <[email protected]>

* kandel: remove error on first load

Signed-off-by: belbazanas <[email protected]>

* remove last old SDK traces

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* cleanup

* zod schema for total points

* navbar: remove posthog check for strategies

Signed-off-by: belbazanas <[email protected]>

* Feat/base testnet (#276)

* baseTestnet: remove old mgv sdk + comment amplified order files

Signed-off-by: belbazanas <[email protected]>

* implement baseTestnet + faucet

Signed-off-by: belbazanas <[email protected]>

* remove old sdk mergedOffers save wip

Signed-off-by: belbazanas <[email protected]>

* BaseTestnet implementation wip

Signed-off-by: belbazanas <[email protected]>

* kandel: remove error on first load

Signed-off-by: belbazanas <[email protected]>

* remove last old SDK traces

Signed-off-by: belbazanas <[email protected]>

* trade: refresh tabs on market update + remove amplified table

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* feat: vault

* Feat/strategy ls fixes (#277)

* kandel: re-activate liquidity sourcing

Signed-off-by: belbazanas <[email protected]>

* kandel: detail page wip

Signed-off-by: belbazanas <[email protected]>

* kandel: remove strategyQuery from priceRange overview

Signed-off-by: belbazanas <[email protected]>

* kandel: total inventory display, remove mangrove.jspackage

Signed-off-by: belbazanas <[email protected]>

* trade: fix limit order default price

Signed-off-by: belbazanas <[email protected]>

* kandel: fix edit workflow wip

Signed-off-by: belbazanas <[email protected]>

* retractParams: add type

Signed-off-by: belbazanas <[email protected]>

* kandel: fix retract offers

Signed-off-by: belbazanas <[email protected]>

* kandel: fix edit strat

Signed-off-by: belbazanas <[email protected]>

* kandel: strategies list save wip

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* Fix build

* kandel: refetch strategy list on close (#278)

* kandel: refetch strategy list on close

Signed-off-by: belbazanas <[email protected]>

* remove log

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* fix computeReceiveAmount

* fix computeSendAmount

* Fix/last minutes fixes (#279)

* kandel: refetch strategy list on close

Signed-off-by: belbazanas <[email protected]>

* remove log

Signed-off-by: belbazanas <[email protected]>

* kandel-trade: fixes

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* remove logs

Signed-off-by: belbazanas <[email protected]>

* fix parseUnits

* trade: disable cancel offer

Signed-off-by: belbazanas <[email protected]>

* add usde token logo

* fix: change skate vault list (#280)

* fix: change skate vault list

* chore: revert lockfile change

* trade: mute edit order

Signed-off-by: belbazanas <[email protected]>

* vaul: minor changes

Signed-off-by: belbazanas <[email protected]>

* vaul: minor changes

Signed-off-by: belbazanas <[email protected]>

* vaul: remove Big.js in strategies

Signed-off-by: belbazanas <[email protected]>

* ENG-268: Fix slider value calculation in Limit component (#293)

* ENG-268: Fix slider value calculation in Limit component

The commit fixes the calculation of the slider value in the Limit component. It now correctly calculates the value based on the send balance and send amount.

* fix: market order slider inout

Signed-off-by: belbazanas <[email protected]>

* refactor: minor refacto

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>
Co-authored-by: belbazanas <[email protected]>

* Synapse Widget

* Custom Rpcs

---------

Signed-off-by: belbazanas <[email protected]>
Co-authored-by: belbazanas <[email protected]>
Co-authored-by: Johan le Roch <[email protected]>
Co-authored-by: Mangrove Automation Bot <[email protected]>
Co-authored-by: Maxence Raballand <[email protected]>
Co-authored-by: Daniel <[email protected]>

* Add tab

* switch to provider

* Add blast as target chain

* refactor bridge page to handle network unsupported by the dApp for bridging

---------

Signed-off-by: belbazanas <[email protected]>
Co-authored-by: bigboydiamonds <[email protected]>
Co-authored-by: belbazanas <[email protected]>
Co-authored-by: Johan le Roch <[email protected]>
Co-authored-by: Mangrove Automation Bot <[email protected]>
Co-authored-by: Daniel <[email protected]>

* merge offers with same price on the orderbook

* Fix/eng 242 (#313)

* disable auto scroll when the user has scrolled

* eng-242: disable auto scroll when the user has scrolled

* Feat/eng 325 (#314)

* eng-325 move bridge to drop down menu

* rename bridge assets

* Add custom switch chain dialog (#316)

* WIP - Draft

* refactoring

* Refactor

* add cronos

* end mecanism

* Dialog styling

* end custom chain dialog

* fix build

* ENG-265: fix edit limit order (#299)

* trade: fix edit limit order

Signed-off-by: belbazanas <[email protected]>

* trade: save edit order wip

Signed-off-by: belbazanas <[email protected]>

* trade: edit limit order wip

Signed-off-by: belbazanas <[email protected]>

* add logs

Signed-off-by: belbazanas <[email protected]>

* ENG-265: fix edit limit order

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* ENG-267: update mangrove sdk to fix strategy min price points (#320)

Signed-off-by: belbazanas <[email protected]>

* ENG-278: remove create strat when on passive strategy tab (#319)

Signed-off-by: belbazanas <[email protected]>

* hide ms1 program banner (#322)

* eng-326: add overlay (#323)

* add return buttons to modal steps (#318)

Signed-off-by: belbazanas <[email protected]>

* Feat/eng 354 (#325)

* ENG-354: Remove smart kandel

Signed-off-by: belbazanas <[email protected]>

* ENG-354: turn validateKandelParams deposit to true

Signed-off-by: belbazanas <[email protected]>

* ENG-354: fix approval

Signed-off-by: belbazanas <[email protected]>

* ENG-354: remove comments

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* eng-359: clean and remove amplified orders everywhere (#329)

* ENG-351: add arbitrum network (#328)

Signed-off-by: belbazanas <[email protected]>

* fix arbitrum icon

* Fix/eng 361 (#330)

* eng-359: clean and remove amplified orders everywhere

* wip / debug

* refactoring / cleaning

* improve number readability

* cleaning

* show depth chart even if it's one sided book (#332)

* Fix/eng 366 (#333)

* cleaning - wip

* replace all useChainId by useAccount

* remove nuqs

* eng-367: fix add tooltip in orderbook sizes an total values (#331)

* eng-367: fix add tooltip in orderbook sizes an total values

Signed-off-by: belbazanas <[email protected]>

* eng-367: update sdk

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* eng-371: fix wrong units (#334)

* eng-371: fix wrong units

* fix wrong unit

* fix buil

* fix number of offers (#335)

* fix number of offers

* cleanup

* market order: fix not enough volume on book error when selling (#340)

* market order: fix not enough volume on book error when selling

Signed-off-by: belbazanas <[email protected]>

* remove unused logs

Signed-off-by: belbazanas <[email protected]>

---------

Signed-off-by: belbazanas <[email protected]>

* eng-363: Hide passive strategy on arbitrum & add tooltip (#338)

Signed-off-by: belbazanas <[email protected]>

* eng-358: update synapse network text (#337)

Signed-off-by: belbazanas <[email protected]>

* eng-373: remove network (#341)

* Fix limit orders (#342)

* Fix limit orders

* if GTC or PO, take into account the expiryDate

* Fix edit order sheet

* show detail in the confirm dialog

---------

Signed-off-by: belbazanas <[email protected]>
Co-authored-by: Mangrove Automation Bot <[email protected]>
Co-authored-by: belbazanas <[email protected]>
Co-authored-by: Maxence Raballand <[email protected]>
Co-authored-by: Daniel <[email protected]>
Co-authored-by: bigboydiamonds <[email protected]>
  • Loading branch information
6 people authored Aug 9, 2024
1 parent 682c528 commit 9cd294d
Show file tree
Hide file tree
Showing 97 changed files with 242 additions and 4,958 deletions.
4 changes: 2 additions & 2 deletions app/bridge/_components/warning-banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export default function WarningBanner() {
</div>
<div>
<Caption className="text-base!">
You'll need to switch back to Blast if you want to browse the rest
of the web app :{" "}
You'll need to switch back to a supported network if you want to
browse the rest of the web app :{" "}
<Button
className="text-md"
variant={"link"}
Expand Down
4 changes: 2 additions & 2 deletions app/faucet/_components/info-banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import * as wagmiChains from "wagmi/chains"
/* eslint-disable @next/next/no-img-element */
import { Text } from "@/components/typography/text"
import { Title } from "@/components/typography/title"
import { useChainId } from "wagmi"
import { useAccount } from "wagmi"

export function InfoBanner() {
const chainId = useChainId()
const { chainId } = useAccount()
return (
<div className="w-full max-w-[1252px] bg-primary-dark-green rounded-lg mx-auto flex">
<div className="h-auto w-1/3 relative rounded-lg overflow-hidden hidden xl:block">
Expand Down
4 changes: 2 additions & 2 deletions app/faucet/_components/table/components/actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Link from "next/link"
import { toast } from "sonner"
import { parseUnits, type Address } from "viem"
import {
useChainId,
useAccount,
useSimulateContract,
useWaitForTransactionReceipt,
useWriteContract,
Expand All @@ -21,7 +21,7 @@ type Props = {
}

export function Actions({ faucetToken }: Props) {
const chainId = useChainId()
const { chainId } = useAccount()
const isMgv = faucetToken.mgvTestToken
const tokenQuery = useTokenFromAddress(faucetToken.address as Address)
const mintLimit = useMintLimit(faucetToken.address as Address, !!isMgv)
Expand Down
4 changes: 2 additions & 2 deletions app/referrals/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"
import { createZodFetcher } from "zod-fetch"

import { Address, Hex, TypedDataDomain, parseAbiParameter } from "viem"
import { useAccount, useChainId, useWalletClient } from "wagmi"
import { useAccount, useWalletClient } from "wagmi"
import { startPostResponseSchema, startedGetResponseSchema } from "./schema"

const fetchWithZod = createZodFetcher()

export function useDomain() {
const chainId = useChainId()
const { chainId } = useAccount()
return {
chainId,
name: "MangroveReferral",
Expand Down
93 changes: 0 additions & 93 deletions app/strategies/(list)/_components/new-strategy-dialog.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client"

import { useQuery } from "@tanstack/react-query"
import { useAccount, useChainId } from "wagmi"
import { useAccount } from "wagmi"

import { useTokens } from "@/hooks/use-addresses"
import useIndexerSdk from "@/providers/mangrove-indexer"
Expand All @@ -19,8 +19,7 @@ export function useStrategies<T = Strategy[]>({
filters: { first = 10, skip = 0 } = {},
select,
}: Params<T> = {}) {
const chainId = useChainId()
const { address, isConnected } = useAccount()
const { address, isConnected, chainId } = useAccount()
const { indexerSdk } = useIndexerSdk()
const tokens = useTokens()
const tokensList = tokens.map((token) => token.address.toLowerCase())
Expand Down
29 changes: 27 additions & 2 deletions app/strategies/(list)/_components/tables/tables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ import {
CustomRadioGroupItem,
} from "@/components/custom-radio-group"
import { CustomTabs } from "@/components/custom-tabs"
import { useAccount } from "wagmi"
import { Strategies } from "./strategies/strategies"
import { Vaults } from "./vaults/vaults"

import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip"

enum StrategyType {
PASSIVE = "Passive",
PRO = "Pro",
Expand All @@ -21,7 +29,7 @@ export function Tables({
hideCreateStrat: (bool: boolean) => void
}) {
const [strategiesType, setStrategiesType] = React.useState(StrategyType.PRO)

const { chain } = useAccount()
React.useEffect(() => {
if (strategiesType === "Passive") {
hideCreateStrat(true)
Expand All @@ -46,8 +54,25 @@ export function Tables({
value={action}
id={action}
className="capitalize"
disabled={
action === StrategyType.PASSIVE && chain?.name === "Arbitrum One"
}
>
{action}
<TooltipProvider>
<Tooltip delayDuration={200}>
<TooltipTrigger className="hover:opacity-80 transition-opacity">
{action}
</TooltipTrigger>
<TooltipContent
hidden={
action === StrategyType.PRO ||
chain?.name !== "Arbitrum One"
}
>
Please switch to a supported network
</TooltipContent>
</Tooltip>
</TooltipProvider>
</CustomRadioGroupItem>
))}
</CustomRadioGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client"
import type { Vault } from "@/app/strategies/(list)/_schemas/vaults"
import { useQuery } from "@tanstack/react-query"
import { useAccount, useChainId, usePublicClient } from "wagmi"
import { useAccount, usePublicClient } from "wagmi"
import { getChainVaults, getVaultsInformation } from "../services/skate-vaults"

type Params<T> = {
Expand All @@ -16,22 +16,23 @@ export function useVaults<T = Vault[]>({
filters: { first = 10, skip = 0 } = {},
select,
}: Params<T> = {}) {
const chainId = useChainId()
const { chainId } = useAccount()
const publicClient = usePublicClient()
const { address: user } = useAccount()
const { data, ...rest } = useQuery({
queryKey: ["vaults", publicClient, user, chainId, first, skip],
queryFn: async (): Promise<Vault[]> => {
try {
if (!publicClient) throw new Error("Public client is not enabled")
if (!chainId) return []
const plainVaults = getChainVaults(chainId).slice(skip, skip + first)
return getVaultsInformation(publicClient, plainVaults, user)
} catch (error) {
console.error(error)
return []
}
},
enabled: !!publicClient,
enabled: !!publicClient && !!chainId,
initialData: [],
})
return {
Expand Down
58 changes: 0 additions & 58 deletions app/strategies/(list)/_providers/kandel-strategies.tsx

This file was deleted.

9 changes: 3 additions & 6 deletions app/strategies/(list)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Metadata } from "next"
import React from "react"

import { KandelStrategiesProvider } from "@/app/strategies/(list)/_providers/kandel-strategies"
import { Navbar } from "@/components/navbar"
import { IndexerSdkProvider } from "@/providers/mangrove-indexer"
import { MarketProvider } from "@/providers/market.new"
Expand All @@ -16,11 +15,9 @@ export default function Layout({ children }: React.PropsWithChildren) {
return (
<MarketProvider>
<IndexerSdkProvider>
<KandelStrategiesProvider>
<Navbar innerClasses="max-w-8xl mx-auto" />
<WarningBanner />
<main className="w-full">{children}</main>
</KandelStrategiesProvider>
<Navbar innerClasses="max-w-8xl mx-auto" />
<WarningBanner />
<main className="w-full">{children}</main>
</IndexerSdkProvider>
</MarketProvider>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ScaleLinear } from "d3-scale"

import { cn } from "@/utils"
import { BA } from "@mangrovedao/mgv/lib"
import { formatEther } from "viem"
import { TypedDistrubutionOffer } from "./geometric-distribution-dots"

type Props = {
Expand Down Expand Up @@ -44,7 +45,7 @@ export function GeometricOfferTooltip({
</div>
<div className="text-white">
<span className="text-cloud-300">Volume:</span>{" "}
{Number(hoveredGeometricOffer.gives).toFixed(
{Number(formatEther(hoveredGeometricOffer.gives, "wei")).toFixed(
(hoveredGeometricOffer.type === BA.bids ? quoteToken : baseToken)
?.displayDecimals,
)}{" "}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Props = {
xScale: ScaleLinear<number, number>
onHover?: (offer: TypedDistrubutionOffer) => void
onHoverOut?: () => void
mergedOffer: OfferParsed
mergedOffer: OfferParsed & { formattedGives?: string }
baseToken: Token
quoteToken: Token
}
Expand Down Expand Up @@ -52,7 +52,6 @@ export function MergedOfferTooltip({
quoteToken,
}: Props) {
const isLive = mergedOffer.gives > 0

return (
<TooltipWithBounds
top={height - paddingBottom}
Expand All @@ -73,7 +72,7 @@ export function MergedOfferTooltip({
</div>
<div className="text-white">
<span className="text-cloud-300">Volume:</span>{" "}
{Number(mergedOffer.gives).toFixed(
{Number(mergedOffer.formattedGives).toFixed(
(mergedOffer.ba === BA.bids ? quoteToken : baseToken)
?.displayDecimals,
)}{" "}
Expand Down
Loading

0 comments on commit 9cd294d

Please sign in to comment.