Commit Graph

301 Commits

Author SHA1 Message Date
Maximilian Schneider 4d3dae3b1a load order books both from perp & spot 2021-06-17 17:07:10 -04:00
Maximilian Schneider 2307246dd0 fix deposit modal rendering 2021-06-17 14:42:39 -04:00
Tyler Shipe c6dab39463 add interest rates 2021-06-17 14:40:44 -04:00
Maximilian Schneider 275fafa4c4 refactor deposit modal 2021-06-17 14:03:47 -04:00
saml33 90cbbf8531 fix data passed to borrow chart 2021-06-17 20:14:11 +10:00
Maximilian Schneider 8aed0f0840 expose market config in store and switch between spot & perp 2021-06-17 01:38:49 -04:00
saml33 2d7783ba98 Merge branch 'stats-page' of github.com:blockworks-foundation/mango-ui-v2 into stats-page 2021-06-17 14:26:08 +10:00
saml33 5a30a1314b use current price if no match from prices api 2021-06-17 14:19:35 +10:00
Tyler Shipe cb331fb2c7 comment out stuff in the ui so it works 2021-06-16 21:50:16 -04:00
Maximilian Schneider 6c4507cfc6 fix lint errors 2021-06-16 12:17:51 -04:00
Maximilian Schneider d31eb4b119 Merge remote-tracking branch 'origin/main' into stats-page 2021-06-16 12:07:13 -04:00
saml33 107d9cb883 use historic prices for total deposits/borrows 2021-06-15 20:24:40 +10:00
Maximilian Schneider 3dbbe87ded
fix data issues when switching markets (#31) 2021-06-12 22:03:05 -04:00
Maximilian Schneider 3b66cf9090
fix volume sometimes null (#30) 2021-06-12 20:04:13 -04:00
Tyler Shipe 4476a2254e rebate gui hoster fees to users 2021-06-12 13:46:06 -04:00
saml33 e14350e624
disable 0 bal assets for deposits and fix withdraw validations (#25) 2021-06-11 14:23:51 -04:00
saml33 e5dc75456e round large numbers 2021-06-11 23:39:44 +10:00
saml33 0ec22513d6 reduce icon size to match trade page 2021-06-11 19:54:49 +10:00
saml33 c1638183db merge main 2021-06-11 11:12:35 +10:00
saml33 c69045f652 responsive and bar chart 2021-06-11 11:07:32 +10:00
saml33 a3d74a5488 total deposit/borrow value charts, new chart styles 2021-06-11 00:09:25 +10:00
ImpossiblePairs 2f066cb92c
Updated TradeForm.tsx UI Bugs
Added handling of USDT orders below minimum size (e.g. $1), removed ability to execute trades at half minimum order size due to rounding, and allowing user input leading with numerical input that is not strictly a number (e.g. decimal point).
2021-06-09 15:30:53 -07:00
Tyler Shipe 956664b91f show accounts in select when length is greater than two 2021-06-09 12:28:33 -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 e68211a56b adding settle all button temporarily to test issue in ui 2021-06-08 18:49:53 -04:00
Tyler Shipe 15bb7c56d1 fix link 2021-06-08 11:04:56 -04:00
Tyler Shipe 1afe59e4e0 update modal with sol srm info 2021-06-08 10:59:39 -04:00
Tyler Shipe 9e16290300 fix NaN on account change modal 2021-06-07 19:33:59 -04:00
Tyler Shipe 31dc68d120 add back fee discounts table 2021-06-07 18:06:00 -04:00
Tyler Shipe 485718cd1b fix borrow modal 2021-06-07 17:56:56 -04:00
Tyler Shipe 330ef82a32 fix default margin account select 2021-06-07 16:55:10 -04:00
Tyler Shipe aa5355e70c fix pnl on accounts page 2021-06-07 13:28:54 -04:00
Tyler Shipe 3a57263452 fix pnl 2021-06-07 13:01:41 -04:00
Tyler Shipe c44105e4cd fetch trade history when switching accounts 2021-06-07 13:00:00 -04:00
Tyler Shipe 448d6e0bc3 fix leverage colors 2021-06-05 18:10:34 -04:00
Maximilian Schneider 7fb654f2c9 withdraw modal shows now more decimals 2021-06-05 18:01:01 -04:00
Tyler Shipe e5167bdcbc fix apy and apr 2021-06-05 15:53:19 -04:00
Tyler Shipe b67f676383 add useOraclePrice hook and show in market header 2021-06-05 14:40:56 -04:00
Tyler Shipe c90efd5b63 simplify utc dates in market header 2021-06-05 14:40:07 -04:00
Tyler Shipe a1d572048b removed leverage indicator on deposit and withdraw modals 2021-06-05 14:01:00 -04:00
Maximilian Schneider e346eb2472 remove drop down from top bar 2021-06-05 13:31:06 -04:00
Tyler Shipe 39a9507756 default borrows to off when withdrawing 2021-06-05 13:05:40 -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
Tyler Shipe ab277fee2b yarn lint and yarn format 2021-05-31 16:30:59 -04:00
saml33 8865278212
remove placement prop (#20) 2021-05-31 14:41:48 +03:00
saml33 407bdd8c0d
increase dropdown box max-height (#19) 2021-05-27 16:44:25 +03:00
Maximilian Schneider 7558165c27
Auto create associated token account on withdrawal (#18)
* Auto create associated token account on withdrawal
* simplify withdraw and default to USDC
2021-05-27 16:40:11 +03:00
saml33 da7af24d2b
Use asset balances instead of accounts for withdraw (#17)
* use asset balances instead of accounts for withdraw
* borrow zero balance assets
2021-05-27 14:35:15 +03:00
saml33 9755666be9
remove scrollbar from balanceinfo panel (#13) 2021-05-22 21:51:15 +03:00
Ralfs 64d35f9a0a fix wront quoteAmount in tradeForm 2021-05-22 01:26:31 +03:00
Ralfs d239416364 more cleanup and add txid link when transaction error 2021-05-22 01:00:39 +03:00
Ralfs 329a2cd302 removed fee discount tab and sol retain deposit 2021-05-21 23:58:01 +03:00
Ralfs 7a110f9ea5 Fixed build bugs 2021-05-20 23:43:18 +03:00
Ralfs a00adc54d6 Support wrapped SOL 2021-05-20 21:51:00 +03:00
Ralfs 021e2988bb Added icon and fixed a check for token length 2021-05-20 14:35:35 +03:00
Ralfs a58a32e9a1 Lint fixes 2021-05-20 14:21:36 +03:00
Maximilian Schneider 935129c45e
simulate withdraw operation so we can preview equity & coll (#10)
* show margin details in withdraw ui

Co-authored-by: saml33 <slam.uke@gmail.com>
2021-05-18 19:27:09 +03:00
saml33 8aa8c5929b
improve connect wallet button styles (#11) 2021-05-18 13:57:10 +03:00
saml33 a49f7e2fe9
add market data header to trade page (#9)
* add market data header to trade page
2021-05-18 08:33:04 +03:00
saml33 8e4bd926a7
improve alert modal buttons and fix alerts not loading on connect wallet (#8) 2021-05-10 23:32:21 +03:00
saml33 806b527502
Bring alert details and notifications into the UI (#5)
* hook to get alerts, add triggered alerts to alerts list
* alerts page, count unseen alerts, clear alerts from nav view
* consolidate components, add custom value to alert modal dropdown, sort margin accounts alphanumerically
* ring bell when count increments and ping animation on count
* create/fetch alerts from store, filter by account, populate modal state from triggered alert
* fix alert sorting
* enable MA selection also for re-activate
2021-05-07 22:41:26 +03:00
Tyler Shipe 3a3682c085 Disable srm deposit button if srm wallet account doesn't exist 2021-05-05 12:43:13 -04:00
Tyler Shipe 1ebae0eb07 show srm deposit and withdraw when margin acc doesnt exist 2021-05-04 19:24:43 -04:00
Tyler Shipe 02b2fed058 better handle latency from wallet providers 2021-05-04 19:19:48 -04:00
Maximilian Schneider 260715cc6f prevent react list key error on margin info render 2021-05-02 23:36:13 +03:00
Maximilian Schneider 9c0c94eb4b fix broken margin account selector invocation 2021-05-02 15:58:12 +03:00
Tyler Shipe 3de58a6f31 Merge remote-tracking branch 'origin/alerts-modal' into main 2021-05-02 00:39:20 -04:00
Tyler Shipe 9cc7eaf559 increase grid columns 2021-05-02 00:33:27 -04:00
saml33 fd7e5df1f6 add ratio alert presets and empty state for no margin accounts 2021-05-02 14:22:32 +10:00
Tyler Shipe f61c9b5fa8 Merge remote-tracking branch 'origin/alerts-modal' into main 2021-05-01 18:09:44 -04:00
Tyler Shipe 9755aef1be load orderbook for market 2021-05-01 16:30:05 -04:00
saml33 23220e3555 trigger set alerts modal from margininfo 2021-05-02 00:02:21 +10:00
Tyler Shipe 9dc5b1479b update labels on interest 2021-04-29 18:14:19 -04:00
Tyler Shipe a0ef8f1e8e better handling of rounding issues in borrow and withdraw 2021-04-29 17:27:13 -04:00
Tyler Shipe fe5172803a handle missing tokens for srm 2021-04-29 16:28:55 -04:00
Tyler Shipe 6fbd949b9f Use the vip-api endpoint 2021-04-29 13:42:53 -04:00
Tyler Shipe 4a091882a9 disable study templates 2021-04-29 11:09:35 -04:00
Tyler Shipe 3a5040f515 reduce call to rpc endpoint 2021-04-29 11:08:36 -04:00
Tyler Shipe 3ff07f452e combine market state keys 2021-04-29 10:38:28 -04:00
Tyler Shipe 64437f6a85 remove percent reduction in borrow and withdraw transaction 2021-04-28 23:15:42 -04:00
Tyler Shipe af33279f42 show to correct account address in deposit modal 2021-04-26 13:09:03 -04:00
Tyler Shipe 51e6d4c1cc remove loading state and add .flash class to visualize book updates 2021-04-26 11:20:55 -04:00
saml33 dbf6e7087f layout toggle for orderbook 2021-04-26 22:53:27 +10:00
Tyler Shipe f18d61b216 add margin account selector 2021-04-26 01:26:12 -04:00
Tyler Shipe 16003fd8cf fix recent trades and add update delays after srm deposit and withdraw 2021-04-25 18:57:16 -04:00
Tyler Shipe f95988c88b fix safari button styling 2021-04-25 17:22:14 -04:00
Tyler Shipe e3986a26a0 pass in a PublicKey instead of the string 2021-04-25 13:23:06 -04:00
Tyler Shipe 526236e46f fix console error with localstorage hook 2021-04-25 13:08:11 -04:00
Tyler Shipe 2d489b29c4 add Lagzda's alerts 2021-04-24 22:10:28 -04:00
Tyler Shipe aa389c15fc reduce left side padding 2021-04-24 18:23:01 -04:00
saml33 fc751fe00c
More timeframes to charts and chart theming (#2)
* topbar action tooltips. flip refresh icon. max with borrow button
* more timeframes and chart theming
* fix asymmetric header button
2021-04-25 01:02:13 +03:00
Tyler Shipe 861eb34a76 add settle borrow instruction to deposit transaction 2021-04-22 16:20:57 -04:00
Tyler Shipe 7d26ec8fac only borrow if toggle is true in modal 2021-04-22 13:31:09 -04:00
Tyler Shipe a23eff8d9c better rounding in margin account panel 2021-04-22 13:04:42 -04:00
Tyler Shipe 18a794e6b4 update table descriptions 2021-04-22 11:43:20 -04:00
Tyler Shipe 3870d62f09 add temporary link to previous site design 2021-04-22 11:33:40 -04:00
Tyler Shipe d35521556d remove unused class 2021-04-22 11:22:07 -04:00
Tyler Shipe adad2a967f remove unused functions in withdraw modal 2021-04-22 11:12:23 -04:00
Tyler Shipe d61e64a681 Merge remote-tracking branch 'origin/withdraw-modal-styling' into main 2021-04-22 11:01:55 -04:00
Tyler Shipe 99567c9afe add connect and disconnect for mobile 2021-04-22 11:00:13 -04:00
Tyler Shipe 1f07e78aca add tooltip to reset layout button 2021-04-22 10:45:36 -04:00
saml33 7027657357 add spin to refresh icon 2021-04-22 23:10:43 +10:00
saml33 e1186840b2 button to reset layout and added time to trade history 2021-04-22 22:33:35 +10:00
saml33 a749d9c531 add borrow details to withdraw modal 2021-04-22 20:31:55 +10:00
saml33 e1dd3980b8 hide settle button and small styling updates 2021-04-21 22:45:03 +10:00
saml33 9a3ef99b3d include borrow switch and styling 2021-04-21 10:39:19 +10:00
Tyler Shipe 4de2c58ebb hide balance header in withdraw modal until balances are displayed 2021-04-20 18:13:35 -04:00
Tyler Shipe 64600035e5 fix balance display in deposit modal 2021-04-20 18:10:10 -04:00
Tyler Shipe 767facf575 always show settle all button until show/hide logic is updated 2021-04-20 14:45:23 -04:00
Tyler Shipe 3db7ed86a5 extract borrowAndWithdraw from ui to mango-client pkg 2021-04-20 14:14:45 -04:00
Tyler Shipe 7b8035e960 Merge remote-tracking branch 'origin/table-styling' into main 2021-04-20 12:46:41 -04:00
Tyler Shipe 349966cb7e upgrade to mango-client 0.1.12 and add refresh button to account select 2021-04-20 11:46:56 -04:00
saml33 4285339e5a responsive tables and start on stats page 2021-04-21 00:19:08 +10:00
Tyler Shipe 74d9f70dbf implement withdraw max with borrow 2021-04-20 10:09:25 -04:00
Tyler Shipe a11758784c wip 2021-04-19 12:54:35 -04:00
Tyler Shipe 9bd0736053 fix trade form typo from styling merge 2021-04-19 12:54:04 -04:00
Tyler Shipe 61a920f017 hide some ui changes so we can deploy 2021-04-19 12:15:49 -04:00
saml33 72e70ad488 market pair header concept 2021-04-19 23:45:59 +10:00
saml33 54054880a7 add symbol to account selectors, add max-height to listbox options and remove overflow-hidden from modal 2021-04-19 13:21:22 +10:00
saml33 f6938720be connect wallet button to seperate componenet and secondary connect wallet button styling 2021-04-19 11:58:16 +10:00
saml33 64f9c44224 small fixes and enable connect wallet on tradeform 2021-04-19 08:18:23 +10:00
saml33 59a840f8c5 modal, tradeform, input styling updates 2021-04-18 23:45:11 +10:00
Tyler Shipe 4cab843315 fix saved grid layout and add formatting for some large nums 2021-04-18 20:50:25 +10:00
saml33 91c996c0e1 tradeform input styles 2021-04-18 20:34:37 +10: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 22435a7185 Fix deposit and withdraw modals 2021-04-16 17:09:17 -04:00
Tyler Shipe 80c8ba512a persist layout to local storage 2021-04-16 16:17:33 -04:00
Tyler Shipe e5f4433a2e Fix document.body for next.js ssr 2021-04-16 15:07:59 -04:00
Tyler Shipe 232b839a55 Fix buttons with missing text color and fix floating element radius 2021-04-16 14:55:48 -04:00
Tyler Shipe b22ac152bd Add new tooltip component 2021-04-16 14:16:31 -04:00
saml33 06ae85f26f trade form styling 2021-04-17 00:08:33 +10:00
saml33 f66710f14a font styling 2021-04-16 21:50:56 +10:00
Tyler Shipe b5d72c0b55 remove ant library and fix tailwind config for lato 2021-04-15 23:32:03 -04:00
Tyler Shipe 8d0019de47 fix for updating after cancel order 2021-04-15 18:45:26 -04:00
Tyler Shipe ecf81a41b8 fix issue with wallet disconnect when changing pages 2021-04-15 17:54:42 -04:00
Tyler Shipe 50dd3b618e add small ux fixes from alpha feedback 2021-04-15 17:36:55 -04:00
Tyler Shipe 9c2ed9bcce remove extra notifications 2021-04-15 16:14:57 -04:00
Tyler Shipe 07dcd658ea remove passhref 2021-04-15 16:06:42 -04:00
Tyler Shipe efe5698af4 Fix pnl display and better err handling on fetching fills 2021-04-15 15:05:48 -04:00
Tyler Shipe b2e35ecb28 remove trade history table loader for now 2021-04-15 13:52:25 -04:00
Tyler Shipe 3160dacb92 fix trade history table 2021-04-15 13:20:24 -04:00
Tyler Shipe d10fae2d01 testing scroll bar css classes on linux 2021-04-15 12:50:28 -04:00
Tyler Shipe e33bc5feca add alpha popup message 2021-04-15 12:34:59 -04:00
Tyler Shipe 839c27f635 allow floating element to accept classNames 2021-04-15 12:13:16 -04:00
Tyler Shipe e765ffa3d7 revert button text change and remove extra notifications 2021-04-15 11:57:00 -04:00
Tyler Shipe e6909363a7 fix light theme button text so it's visible 2021-04-15 11:41:25 -04:00
Tyler Shipe 87de55fd38 Merge remote-tracking branch 'origin/wallet-select' into main 2021-04-15 10:40:21 -04:00
saml33 b2837801c0 move and resize styling 2021-04-15 23:22:39 +10:00