Commit Graph

319 Commits

Author SHA1 Message Date
Kieran Gillen c1507c234f Merge branch 'main' of github.com:blockworks-foundation/mango-ui-v3 into kierangillen/wallet-updates 2022-03-24 18:41:25 +01:00
tjs af2965098b fix notifications, use accountsdb to fetch mango accts 2022-03-24 01:50:33 -04:00
Kieran Gillen cd8549b1dc Reverts revert wallet adapter 2022-03-22 10:18:58 +01:00
Luc Succes 7316a16e46 Merges main 2022-03-21 14:07:25 -04:00
tjs d62fb894e1 reset trade history in wallet 2022-03-20 21:48:07 -04:00
tjs fa7edcc119 switch away from toLocaleString
toLocaleString is quite slow
2022-03-20 21:30:12 -04:00
tjs 32fc5052e9 store order lines in mango store and show preferences in local storage 2022-03-20 18:50:05 -04:00
tjs 2fd1e8676c more type checks 2022-03-20 04:07:03 -04:00
tjs 4c0eb2114e refactor trade history to use the mango store
reduces rerenders
update usePerpPosition with tradeHistory
2022-03-20 04:06:30 -04:00
saml33 e9550fddda
Markets Page (#182)
* update api endpoint

* update to new api
2022-03-19 17:57:54 +01:00
tjs 9ce177ca3d Revert solana wallet adapter 2022-03-18 14:41:23 -04:00
tjs 45127eb8c0 use latest mango client 2022-03-18 10:34:46 -04:00
saml33 af9505ac22 format numbers 2022-03-18 08:01:16 +11:00
Kieran Gillen 23b1feb941 Merge branch 'main' of github.com:blockworks-foundation/mango-ui-v3 into add-wallet-adapter 2022-03-17 13:06:28 +01:00
tjs f8a0849c40 update zustand store types to work with zustand 3.7 2022-03-16 17:27:26 -04:00
Kieran Gillen 0a033e50d8 Merge branch 'main' of github.com:blockworks-foundation/mango-ui-v3 into add-wallet-adapter 2022-03-15 15:14:52 +01:00
Kieran Gillen d46376649c Updates WalletAdapter type 2022-03-15 14:52:28 +01:00
tjs 597c930b98 use blockhash that expires with timeout 2022-03-13 19:26:30 -04:00
tjs 98a60b6f67 add check that market is loaded 2022-03-11 13:37:52 -05:00
saml33 d4d3cb1eea move size rounding to hook 2022-03-11 13:02:36 +11:00
tjs 59978a9973 fix bug with returning the correct market to decode bookside 2022-03-09 17:46:10 -05:00
tjs 5654ddcb9e parse account info on update 2022-03-09 17:39:57 -05:00
dd e49025c9a2 Set proper decimals in BalancesTable; 2022-02-28 12:51:10 -05:00
dd 5d7599ef97 optimizations; Add more commas to large numbers; NO MERGE STILL UNFINISHED 2022-02-28 12:51:03 -05:00
saml33 5117617259 add size and referral qr 2022-02-24 15:50:52 +11:00
tjs 7ca2e6d31f update navigation transitions and ordering 2022-02-18 17:24:06 -05:00
tjs 138a664c77 fetch market info on an interval 2022-02-18 11:39:43 -05:00
saml33 97d6a4f993 implement pr feedback 2022-02-18 14:32:48 +11:00
tjs 73c3d111cf Merge branch 'main' into share-positions-2 2022-02-15 10:44:10 -05:00
tjs 86874a87e0 show fee discount in trade form 2022-02-14 17:23:57 -05:00
tjs d31dbc5bb8 use latest client; update fee display 2022-02-14 16:42:32 -05:00
tjs f54af5c787 add ref links 2022-02-14 12:17:11 -05:00
tjs 3ad223f95b add types to the store set function 2022-02-10 12:49:59 -05:00
tjs 366617dc5c fix type errors 2022-02-09 11:28:57 -05:00
tjs f4ba160686 share position modal 2022-02-08 13:50:44 -05:00
Tyler Shipe 0ddcf8c2c2 update order book on trade history change 2022-02-05 16:09:18 -05:00
Tyler Shipe a6d432f32d utilize zustand for perppositions 2022-01-27 22:57:18 -05:00
Tyler Shipe 8f27393c22 reload open orders more frequently 2022-01-27 12:24:15 -05:00
Tyler Shipe 2355dfcaa6 store openOrders in zustand 2022-01-27 11:57:36 -05:00
Tyler Shipe 351bc5d11d ensure mango account is loaded before connecting wallet 2022-01-26 13:37:02 -05:00
Tyler Shipe a1f3485687 fix pagination 2022-01-20 12:09:19 -06:00
Tyler Shipe 1c2e89b00d don't geo block on devnet 2022-01-20 11:48:42 -06:00
Tyler Shipe e0a539382e fix trade history pagination 2022-01-19 17:43:50 -06:00
Vidor Gencel b59abf5f80
Profile Picture Support (#134)
* render profile picture

* update profile picture package

* Include PFP only if set

* no need to wait pfp to load

Co-authored-by: Maximilian Schneider <mail@maximilianschneider.net>
2022-01-18 10:26:13 -08:00
Tyler Shipe 679064d8a2 only update mango account at most once per sec and check last slot 2022-01-17 14:23:06 -06:00
Tyler Shipe fe4130ca4b v3.3 supports closing mango accounts 2022-01-16 18:35:47 -06:00
Tyler Shipe 9ba98b1e82 handle notifications when closing account 2022-01-15 18:14:20 -06:00
Tyler Shipe e1114d7477 handle when perpmarket isnt loaded yet 2022-01-12 16:46:41 -06:00
Tyler Shipe bf9215562b fix error boundary env var 2021-12-30 21:00:42 -05:00
Tyler Shipe 0f13c748e4 add jupiter ag swap 2021-12-17 16:02:02 -05:00
Tyler Shipe 714de8e34f update srm fees 2021-12-08 12:27:48 -05:00
Tyler Shipe f0edd15fef move state out of parent components that were causing additional renders 2021-12-07 23:14:00 -05:00
Tyler Shipe 5a7a95842b always show liq price in account info 2021-12-06 15:14:29 -05:00
Tyler Shipe 855a6e6d58 add ws watching for mangoAccount 2021-12-05 20:13:23 -05:00
dd 60b2c4b92d updated MarketClose to have maxSlippage at 2.5% 2021-12-03 00:15:03 -05:00
dd 588ae8dd18 Looks like max slippage on perp Market orders is working 2021-12-02 21:38:44 -05:00
dd f248ab7805 Added code for maxSlippage and removal of market order type; Changed mark price to just be book mid. 2021-12-02 17:33:35 -05:00
Tyler Shipe 84233b2a56 improve rerender when cancelling orders for a market other than the one selected 2021-11-30 18:35:49 -05:00
Tyler Shipe 2d824c2213 add lastUpdatedAt to improve useMangoAccount rerendering trigger 2021-11-30 16:04:55 -05:00
Tyler Shipe 4eb7cd3934 forceReload components when mango account is updated in store 2021-11-30 12:32:14 -05:00
Riordan Panayides 2f6ceef7a9 Revert UK IP block 2021-11-23 13:36:48 +00:00
Denmark 36f6585b6a
add bitpie wallet (#86) 2021-11-23 13:25:31 +01:00
Riordan Panayides edac2473fc Allow UK spot trading 2021-11-22 23:54:51 +00:00
Riordan Panayides dd6ea25527
Block UK users :( 2021-11-22 22:48:44 +00:00
Tyler Shipe 6ed230d900 add deposit and withdraw history to account page 2021-11-17 15:51:17 +00:00
Tyler Shipe a1e0e82990 reconnect to phantom on each page change 2021-11-15 18:27:57 +00:00
Tyler Shipe af88a1486d support solflare extension 2021-11-14 18:58:30 +00:00
Tyler Shipe 010be224e0 remove console logs 2021-11-14 18:57:00 +00:00
saml33 d216ec1f1a add solflare 2021-11-10 22:46:54 +11:00
saml33 859432fdb2 fix: match oracle and markprice decimals to tick size 2021-11-02 20:43:28 +11:00
Tyler Shipe cb462eb47a fix: error when hourly interest is undefined 2021-11-01 11:14:43 -04:00
Tyler Shipe 6b28aa3666 Merge branch 'hourly-stats-tables' into main 2021-10-27 12:44:09 -04:00
Tyler Shipe 97250b8c74 immediately refresh order book when switching markets 2021-10-27 11:53:07 -04:00
Tyler Shipe 3da0b240f5 add paginated tables for account interest and funding 2021-10-25 15:21:54 -04:00
Tyler Shipe eecf9a919d move useOrderbook login into useHydrateStore to reduce rerenders 2021-10-21 15:45:13 -04:00
rjpeterson bf679598bb
Add next-i18next translation framework & Traditional and Simplified Chinese UI Translations (#54)
* start english localization

* fix typo

* add to english localization

* add some zh translations, fix discrepencies in en

* add more chinese translations

* finish trad chinese translations

* add simplified folder, add locales.json with meta info, add latest ui updates in english

* add latest ui changes for chinese-trad and sort

* fix typo

* convert trad to simp

* Update common.json

* add review changes by @HZ2078

* fix typos

* add latest ui changes

* new ui change & trad-simp convert

* delete monospace from locales.json

* add next-i18next translation framework. Add translations up to #103

* replace more html with traslate tags

* lint & add more phrases

* add missing translations

* add language select dropdown

* add new update transltations

* add latest gui update translations

* add useTranslation to lang switch

* sort common.json, add lang descriptions

* update netlify config to support i18n

* make translations more consistent

Co-authored-by: Hz2078 <92381714+HZ2078@users.noreply.github.com>
Co-authored-by: Tyler Shipe <tjshipe@gmail.com>
2021-10-20 13:42:40 +01:00
Tyler Shipe c53c35b2e4 fix: handle when no funding stats exist for acct 2021-10-18 18:00:47 -04:00
Tyler Shipe e049456edd MSRM deposit and withdraw 2021-10-18 16:38:03 -04:00
Tyler Shipe 3b65fed87d fix: format decimals for perp trigger orders 2021-10-12 16:59:21 -04:00
Maximilian Schneider 93abdab9f6 Merge remote-tracking branch 'origin/main' into max/stoploss 2021-10-05 23:02:01 +02:00
Maximilian Schneider 97bb02e593
show unsettled pnl (#46)
* display unsettled pnl more dominantly (#43)

* display perp markets that have unsettled pnl

* fix dependencies to a working version

* add back unrealized pnl vs unsettled pnl

* add todo

* settle all

* cleanup

* catch error

* fix crash in market position & refactor

* bugfixes

* correct unrealized pnl
* remove unsetlled pnl from table
* only show unsettled balances after closing position
2021-10-05 22:22:47 +02:00
Maximilian Schneider eb2568672c fix fee calc & respect reduceOnly 2021-10-01 18:21:09 +02:00
Tyler Shipe 7feb881bb3 rename fetchMangoAccounts to fetchAllMangoAccounts; prefer reloadMangoAccount over fetchAllMangoAccounts 2021-09-29 18:09:58 -04:00
Maximilian Schneider 724bb77ef4 fetch open orders on wallet connect 2021-09-23 22:52:16 +02:00
Maximilian Schneider d310e0b66f [wip] visualize & cancel trigger order and fuck up order reloading 😭 2021-09-23 13:50:34 +02:00
Maximilian Schneider 5da4887736 add slope wallet 2021-09-21 12:08:28 +02:00
saml33 9123e63344
Trade page mobile (#35)
* mobile styles for chart, position, account

* mobile styles for trade form

* trade page mobile styles

* tab layout

* fix unknown property fill-rule

* test swipeable tabs

* fix container height

* fix orderbook mobile styles

* account page mobile styles

* fix swipeable container height

* stats page mobile styles
2021-09-20 02:36:02 +02:00
Tyler Shipe efe7990056 update useEffect dependencies 2021-09-14 14:09:33 -04:00
Tyler Shipe c1269298b9 use custom endpoint url 2021-09-13 17:14:59 -04:00
Tyler Shipe 13a48cd2dc use cloudflare worker in ipAddress hook 2021-09-10 16:10:22 -04:00
Tyler Shipe 732d854c36 add manual refresh to ui 2021-09-09 20:23:02 -04:00
Tyler Shipe 5bcec8dd69 change interval to refresh trade history 2021-09-08 14:08:54 -04:00
Tyler Shipe fa082d09bd change reload mango acct interval time 2021-09-08 13:52:52 -04:00
Tyler Shipe 33070aef91 reduce getProgramAccount calls 2021-09-07 19:31:02 -04:00
tjshipe 3c38928ffc
Merge pull request #24 from rjpeterson/orderbook-grouping
Orderbook grouping
2021-09-07 17:23:50 -04:00
Tyler Shipe 58737a9783 fewer getProgramAccount calls 2021-09-07 15:56:25 -04:00
Tyler Shipe 7416988dcd Revert "wip"
This reverts commit ebf0e6fa4d2d9640afa938a9aaee6b0fc95815a4.
2021-09-06 12:59:13 -04:00
Tyler Shipe cf20d48c51 wip 2021-09-06 12:59:13 -04:00
Riordan Panayides c4707086ed Fix stats service URL 2021-09-06 12:59:13 -04:00
Riordan Panayides 5c752cca78 Add funding rate and open interest graphs 2021-09-06 12:59:13 -04:00