Commit Graph

30 Commits

Author SHA1 Message Date
saml33 3b28b3aba9
Estimated liquidation price (#52)
* estimate liquidation price

* make space for elp in margininfo

* display N/A if account won't be liq'd
ensure recalculation on market change

Co-authored-by: dboures <dboures@att.net>
2021-07-19 12:30:00 +02:00
rjpeterson 0ef18df358
Make orderbook depth change dynamically with layout (#41)
* Make orderbook size change dynamically with layout

This change causes the depth value passed to the orderbook component to change in response to the height of the resizable container.
This allows users to show more or less of the depth of the orderbook depending on their preference.
Old behavior was to always show a depth of 8 rows regardless of the size of the container.

* revert changes to yarn.lock

* adjust depth formula, add assymetric depth in vertical mode

The depth of the orderbook now more closely matches the size of the container.
The scrollbar has also been disabled in the orderbook panel to enable the space to be used as efficiently as possible without the annoyance of the scrollbar appearing.
The vertical orientation of the orderbook now allows an odd number of ask rows and an even number of bid rows if it is able to use more of the available space.

* Make orderbook depth adjust on breakpoint change

Add orderbookDepth state which is managed by onBreakpointChange and onLayoutChange functions.

* Add orderbookDepth value to useMangoStore

* Simplify state management and move orderbook adjustments into useEffect

Remove orderbook state object from useMangoStore
This change solves the issue of the orderbook not adjusting on a new session, as well eliminates instances of repeated calls to adjustOrderBook()

* Fix lodash compile errors
2021-07-05 22:10:35 +02:00
saml33 4062b7fe82
Validate min-size and fix misaligned trade page layout (#29)
* validate min-size and fix misaligned trade page layout

* check for null market
2021-06-22 13:50:56 +02:00
Tyler Shipe 4476a2254e rebate gui hoster fees to users 2021-06-12 13:46:06 -04:00
Tyler Shipe f3a86a5a0c combine quote currency balances now that we're showing all markets 2021-06-09 11:52:32 -04:00
Tyler Shipe eac4adc18f add main action buttons below balances 2021-06-05 12:14:34 -04:00
saml33 3b5f22b815
User account page (#22)
* layout, overview, start on assets, borrows and open orders

* trade history, sortable data hook for tables, borrow page

* handle deposit and withdraw buttons

* borrow modal ui and integration + settle borrow for individual assets

* in orders balance to asset table and totals, responsive css, new connected wallet button + small tweaks

* account switch/creation flow

* accounts modal, update to usebalances hook

* handle settle, deposit before settle, save last account

* disable borrow/withdraw button when no account
2021-06-05 10:11:44 -04:00
saml33 9755666be9
remove scrollbar from balanceinfo panel (#13) 2021-05-22 21:51:15 +03:00
Tyler Shipe 9cc7eaf559 increase grid columns 2021-05-02 00:33:27 -04:00
saml33 23220e3555 trigger set alerts modal from margininfo 2021-05-02 00:02:21 +10:00
saml33 dbf6e7087f layout toggle for orderbook 2021-04-26 22:53:27 +10:00
Tyler Shipe aa389c15fc reduce left side padding 2021-04-24 18:23:01 -04:00
saml33 e1186840b2 button to reset layout and added time to trade history 2021-04-22 22:33:35 +10:00
Tyler Shipe ea015a4dc9 fix saved grid layout and add formatting for some large nums 2021-04-17 20:04:18 -04:00
Tyler Shipe 2ce9d53b7c oops 2021-04-16 17:54:46 -04:00
Tyler Shipe fc6f642bde Fix local storage for layout on first load 2021-04-16 17:40:20 -04:00
Tyler Shipe 80c8ba512a persist layout to local storage 2021-04-16 16:17:33 -04:00
saml33 f66710f14a font styling 2021-04-16 21:50:56 +10:00
Tyler Shipe faa466ca17 prevent extra rerenders 2021-04-15 02:16:36 -04:00
Tyler Shipe 59f1156703 Add UiLock toggle and themed the stats page 2021-04-13 12:51:42 -04:00
Tyler Shipe 6605cbdd48 convert trade form inputs to tailwind and continue theming 2021-04-12 16:01:55 -04:00
Tyler Shipe 932b52f649 remove xwind and convert to className prop 2021-04-12 12:49:02 -04:00
Tyler Shipe b5562c161c wip: wire up deposit withdraw modals 2021-04-09 10:27:49 -04:00
Tyler Shipe 10e4fff211 add stats page 2021-04-07 19:06:02 -04:00
Tyler Shipe 4eccd0c74a created balances and fee discounts components 2021-04-07 17:49:37 -04:00
Tyler Shipe ea376cc166 add user info tabs 2021-04-06 13:25:07 -04:00
Tyler Shipe ac631f1fd5 add recent market trades box 2021-04-05 16:48:24 -04:00
Tyler Shipe 45e278e331 fix orderbook styling 2021-04-05 15:03:20 -04:00
Tyler Shipe 82b091434e wip: wiring up global state to components 2021-04-05 10:40:58 -04:00
Tyler Shipe f03f1919a4 add trade form component 2021-04-02 14:26:21 -04:00