Commit Graph

442 Commits

Author SHA1 Message Date
tjs 8168a497f6 fix account summary animation 2022-09-01 12:57:20 -04:00
tjs 43b1febc1a update client and handle undefined health values 2022-08-31 16:17:17 -04:00
tjs a4cfafb484 fix handling small decimals in swap form input 2022-08-31 11:54:43 -04:00
tjs 5832b69902 only set amountIn when swapping if amountOut is gt 0 2022-08-31 11:10:34 -04:00
tjs 9d7f8e5158 always show popular tokens in token select 2022-08-31 11:06:49 -04:00
tjs 44ae5bc6df add retryFn to ensure health simulation runs 2022-08-31 10:54:37 -04:00
tjs 9bc1b423af show all banks when funding account 2022-08-30 11:27:17 -04:00
saml33 b18d3c9049 show chart empty state on data error 2022-08-30 15:03:08 +10:00
saml33 130d5c2a50 format chart high/low decimals 2022-08-30 14:54:16 +10:00
saml33 c3fa10f26f show high/low on trade chart 2022-08-30 13:44:27 +10:00
saml33 dd4a6d4aed remove decimals from health impact 2022-08-28 21:03:15 +10:00
saml33 7435bc4ad2 align onboarding skip buttons 2022-08-27 20:09:57 +10:00
saml33 93a3990625 edit table comlumn labels 2022-08-27 19:49:32 +10:00
tjs c54fcd96ca add spinner to wallet connect 2022-08-27 04:33:21 -04:00
tjs 9c5ce70aa9 better handle error when simulating acct data 2022-08-27 03:56:59 -04:00
tjs bb9263ed0a test2 2022-08-27 01:51:14 -04:00
tjs ae0647bec2 test tokenmax issue 2022-08-27 01:48:18 -04:00
tjs cb3cc9b169 fix vault balance in withdraw modal 2022-08-27 01:28:52 -04:00
tjs d0875ba345 fix tokenbalance for max calc 2022-08-27 01:23:08 -04:00
tjs f4d155af10 add useMangoAccount hook to fix updating account page 2022-08-26 15:15:50 -04:00
tjs 6d60274fe2 fix coingecko % comparison 2022-08-26 15:14:57 -04:00
tjs 2ac137a05c use token vault balance for max amount 2022-08-26 14:19:20 -04:00
microwavedcola1 30b7226fb5 Fix display of loan origination fee
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-26 19:47:00 +02:00
tjs 0775176122 handle when vault balance is below 0 2022-08-26 13:17:31 -04:00
saml33 1d41d4ef7f add init health zero errors 2022-08-26 13:46:23 +10:00
tjs fdb6ae16ea Reload mango account on interval 2022-08-25 23:31:39 -04:00
tjs f19d02e992 fix max swap decimals 2022-08-25 20:39:17 -04:00
saml33 b70394263c move error messages into buttons 2022-08-26 10:27:05 +10:00
tjs 647454dc50 remove liquidation from health label 2022-08-25 18:03:38 -04:00
tjs 297b945a23 truncate decimals on max swap 2022-08-25 18:03:28 -04:00
tjs 8f39fb2272 smoother onboarding 2022-08-25 17:30:32 -04:00
tjs 1d5e9416d1 0.0% coingecko difference should be green 2022-08-25 17:24:10 -04:00
tjs 5108dafdfb add coingecko price comparison and borrow amount to route info 2022-08-25 16:24:37 -04:00
tjs eefa1ad718 animate health impact 2022-08-25 15:44:02 -04:00
tjshipe 0aaaafeb6c
Merge pull request #6 from blockworks-foundation/swap-health-impact
move health impact to swap form
2022-08-25 14:34:18 -04:00
tjs 8109dd2f9c allow skipping creating an account
leverage slider will work after disconnecting
2022-08-25 14:22:54 -04:00
saml33 9916747e0d move health impact to swap form 2022-08-25 23:00:42 +10:00
saml33 6bc9b28c9e fix review trade back button clickable area 2022-08-25 21:15:21 +10:00
saml33 6bbbb3c676 center review trade heading text 2022-08-25 20:52:44 +10:00
saml33 600ef0125f re-name portfolio to account 2022-08-25 20:47:34 +10:00
saml33 eeda961a9f reset borrow/withdraw amount on token change 2022-08-25 20:35:56 +10:00
saml33 f412b8bee8 reset deposit amount on token change 2022-08-25 20:32:06 +10:00
saml33 969d747a8d set button group to 100 when hitting max 2022-08-25 20:29:49 +10:00
saml33 9a84e0d722 add total deposit/borrow value to stats 2022-08-25 13:55:55 +10:00
tjs 624997dcaf reload new selected acct after closing an acct 2022-08-24 23:28:01 -04:00
saml33 643e3287ed add missing $ sign 2022-08-25 12:59:38 +10:00
saml33 8950504e56 show error when deposit amount > wallet balance 2022-08-25 12:58:31 +10:00
tjs a4aba34ebb cleanup swap max 2022-08-24 22:47:02 -04:00
tjs c6237e587f add temp deposit limit warning 2022-08-24 22:47:02 -04:00
saml33 1babb59be0 add more info to deposit modal 2022-08-25 10:53:31 +10:00
saml33 9ca67ed52c trade history decimals 2022-08-25 10:14:27 +10:00
tjs 0d23ceaa7a remove withdraw health in favor of free collateral 2022-08-24 18:22:04 -04:00
tjs cd2ad18ade update health labels 2022-08-24 11:58:01 -04:00
microwavedcola1 2274596350 format
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-24 17:40:21 +02:00
saml33 49957c70e3 change withdraw amount button text 2022-08-24 22:39:15 +10:00
saml33 d56dc3a06a show error when withdraw amount > account balance 2022-08-24 22:29:20 +10:00
saml33 c072c6b0db move account switcher to right side 2022-08-24 21:30:10 +10:00
saml33 4836d21e46 show error when no margin and swap amount > token max 2022-08-24 20:51:06 +10:00
tjs 270a319ab0 add tooltip to asset weight 2022-08-23 20:45:01 -04:00
tjs c48b9f8a95 fix withdraw modal max amount to limit to vault amount 2022-08-23 20:44:43 -04:00
tjs 7300b5eb4b ltv doesnt work, show asset liab weights 2022-08-23 19:49:36 -04:00
tjs a4d1fa797a fix utilization 2022-08-23 18:36:56 -04:00
tjs 39be3f741d add stats page 2022-08-23 18:33:09 -04:00
tjs 7506ee34fe show maint health and init health everywhere 2022-08-23 15:32:51 -04:00
tjs f3f47a102e add init health to account summary box 2022-08-23 14:13:30 -04:00
microwavedcola1 bc3101e90b match latest changes to client
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-23 16:24:47 +02:00
microwavedcola1 e1c814997a Fix
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-23 15:26:47 +02:00
saml33 daa87d033c fix double minus sign 2022-08-23 22:47:52 +10:00
saml33 f888f0211f set trade size button to 100 when clicking max 2022-08-23 22:41:37 +10:00
microwavedcola1 28f652a163
match client changes on mc/ts-client-fixes (#5)
* match client changes on mc/ts-client-fixes

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* fix commit hash for dependency

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-23 13:45:56 +02:00
saml33 83fe7c998b fix buy input load height 2022-08-23 21:13:17 +10:00
saml33 8455bc5fe8 use ETH chart for soETH 2022-08-23 20:55:22 +10:00
tjs 55912dec03 if max withdraw amount is negative use 0 2022-08-22 23:27:06 -04:00
tjs 2ec3bab9ea remove leverage number from swap 2022-08-22 22:26:59 -04:00
tjs 5bde89ee81 sort deposit withdraw tokens by usdc value 2022-08-22 22:23:26 -04:00
tjs dc966975df fix loading after closing a mango account 2022-08-22 21:47:08 -04:00
tjs 2ce386106e show sign next to health impact change 2022-08-22 14:01:06 -04:00
tjs d63bd38542 improvements to setup modal flow 2022-08-22 13:27:03 -04:00
tjs aa5ce47ef5 use tailwind breakpoints instead of isMobile variable 2022-08-22 13:19:09 -04:00
tjs 8011f4ff8e fix buy/sell links in actions menu 2022-08-21 00:08:07 -04:00
tjs c0341773e7 fix onboarding flow 2022-08-20 22:57:07 -04:00
tjs 501510eb43 fix max numbers shown in modals and swap form 2022-08-20 20:09:36 -04:00
tjs 52064b7627 disable swapping between the same tokens while using direct routes 2022-08-20 14:54:38 -04:00
tjs bea7dee84c move constants out of mangoStore.ts 2022-08-20 14:17:57 -04:00
tjs cade8d7872 latest client; fix health ratio in summary panel 2022-08-20 14:05:00 -04:00
tjs 5feb27c408 fix health after swap 2022-08-20 02:25:50 -04:00
tjs 605f49e702 fix wallet connect and disconnect 2022-08-20 02:06:00 -04:00
tjs 1a0baab8e4 fix swap form 2022-08-20 00:03:26 -04:00
tjs e36a88ddbd allow leverage sliding while not connected 2022-08-19 17:25:31 -04:00
tjs 1257c73662 fix connect account; add feature to remember last selected 2022-08-19 17:17:30 -04:00
Christian Kamm a3c37ef008 Fix HealthImpact display, use bank.uiPrice where needed 2022-08-19 16:56:22 +02:00
microwavedcola1 c88a7c71b9 fix rate display
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-19 11:59:54 +02:00
tjs c7f071641d fix more issues with wallet connect and account loading 2022-08-18 18:26:03 -04:00
tjs 9badb0dbd9 ensure client is updated with anchorprovider that has the wallet after connecting 2022-08-18 17:38:48 -04:00
tjs ae324a6da5 update to latest client and program version 2022-08-18 16:50:34 -04:00
tjs 32ca6ff2f5 add function to flip chart pair 2022-08-18 09:59:40 -04:00
saml33 a365bbbc04 disable review trade when amount in is 0 2022-08-18 16:14:15 +10:00
saml33 3e48d7cbc0 add max borrow amount to borrow modal list 2022-08-18 15:58:44 +10:00
tjs acc2a2cfdd switch amounts after flipping the token 2022-08-18 00:35:35 -04:00
saml33 0f7a1b2ad4 update slider amount prop type 2022-08-18 14:25:30 +10:00
saml33 b82259d17f remove onChange from effect dependencies 2022-08-18 13:17:22 +10:00
saml33 a74aaf4405 set swap input amount to 0 on token switch 2022-08-18 13:14:44 +10:00
tjs 8edd563239 use 0 when max amount is negative 2022-08-17 22:35:08 -04:00
tjs bec94218b5 fix decimal handling 2022-08-17 21:50:08 -04:00
saml33 44b3981e48 update slider when amountIn changes 2022-08-18 11:21:16 +10:00
saml33 f64265a316 add health impact to deposit modal 2022-08-18 09:55:46 +10:00
tjs f64f73f2b7 fix for slider bg when changing account 2022-08-17 18:17:12 -04:00
tjs e168add75c give default background size to slider 2022-08-17 17:36:38 -04:00
tjs 78e79b0715 combine jupiter route info into one component 2022-08-17 16:06:45 -04:00
tjs a7b915d071 add sheen loader for price on swap chart 2022-08-17 16:06:45 -04:00
saml33 906640c732 add health impact component 2022-08-17 22:09:40 +10:00
saml33 8a250f7f28 sort withdraw token list by account balance 2022-08-17 16:10:38 +10:00
saml33 711d1560b8 sort deposit token list by wallet balance 2022-08-17 15:15:23 +10:00
saml33 a9ac47f153 disallow close setup modal 2022-08-17 14:49:20 +10:00
saml33 a78c33aaa6 remove edit profile image until we have api 2022-08-17 14:22:55 +10:00
saml33 040d942ed9 style slider 2022-08-17 13:42:16 +10:00
tjs 17d4215572 Modal needs transform class to fix z-index issue 2022-08-16 19:57:54 -04:00
tjs 08b6da5d2f remove tailwind deprecated transform class
and remove default-transitions that weren't paired with a class change
2022-08-16 18:58:03 -04:00
tjs c035bc4655 remove animation from main lists 2022-08-16 18:29:24 -04:00
saml33 37135e35db load mango accounts 2022-08-16 22:50:08 +10:00
saml33 5dd424c8da set mango account load to false if no accounts 2022-08-16 22:20:53 +10:00
saml33 4146efac94 fix mango account load 2022-08-16 21:23:43 +10:00
tjs 72191f62ef hide profile page from onboarding until its farther along 2022-08-16 01:10:17 -04:00
tjs 4631b70d15 again fix percent select on swap 2022-08-16 00:19:09 -04:00
tjs 49e340d1f6 fix for percent select on swap form 2022-08-15 23:16:20 -04:00
saml33 0d19b462b6 update token icons 2022-08-16 12:41:06 +10:00
saml33 57120c17e0 portfolio responsive 2022-08-16 12:02:56 +10:00
saml33 9c67b18eff single component for account charts 2022-08-16 10:16:21 +10:00
tjshipe 8e3259b118
Merge pull request #4 from blockworks-foundation/fix-onboarding
fix account loading and onboarding
2022-08-15 19:10:35 -04:00
tjs 78e1fe42da show decimals on interest rates 2022-08-15 19:09:49 -04:00
saml33 7b8867781f merge main 2022-08-16 08:19:24 +10:00
tjs 6ead35fd8a wire up borrow modal; use maint health 2022-08-15 18:18:23 -04:00
tjs d3a05e01c6 fix max percentage when no margin 2022-08-15 12:02:46 -04:00
saml33 2039d4ce09 style swap setting margin switch 2022-08-15 21:52:17 +10:00
saml33 979f6aada8 load swap amount out 2022-08-15 21:28:36 +10:00
saml33 a1eb6b38d9 button hovers 2022-08-15 16:10:46 +10:00
saml33 d688a35f56 sidenav hover 2022-08-15 15:49:51 +10:00
saml33 dfbed69bcf add pnl 2022-08-15 15:43:15 +10:00
saml33 e672dd4792 style review trade panel 2022-08-14 21:56:19 +10:00
saml33 61d9b83b9a update button colors 2022-08-14 15:39:30 +10:00
saml33 7d3b16496d add interest value to token list 2022-08-14 15:11:02 +10:00
saml33 bf972eb9a9 add interest to token list 2022-08-13 21:29:48 +10:00
saml33 5ec3d74500 add cumulative interest chart 2022-08-13 20:44:13 +10:00
saml33 b419098e6c move trade history data to store 2022-08-13 16:06:09 +10:00
tjs d1acfc6d52 use new client to show pending transaction notifications 2022-08-12 17:18:12 -07:00
saml33 80ccba7b72 fix review trade back arrow 2022-08-12 22:40:26 +10:00
saml33 03c0436877 merge main 2022-08-12 22:21:23 +10:00
saml33 e7af834a2d move account stats fetching to store 2022-08-12 22:14:28 +10:00
saml33 b7a47f60fe add available balance to withdraw modal 2022-08-12 16:09:52 +10:00
saml33 4d49012eba add wallet balance to deposit list 2022-08-12 15:48:59 +10:00
saml33 94aa653817 fix account loading and onboarding 2022-08-12 14:20:17 +10:00
tjs 29da9b24f6 update decimal formatting 2022-08-11 19:27:36 -07:00
tjs f55c4a8820 use jup logo uri in token list 2022-08-11 19:27:21 -07:00
tjs fdec02b730 add back swap route options 2022-08-11 18:26:36 -07:00
tjs 403161f578 show simulated health in swap 2022-08-11 17:52:57 -07:00
tjs 0800e9f30f exclude Serum jup routes due to lg tx size 2022-08-11 17:52:57 -07:00
tjs 6630f554cc leverage slider max shouldnt exceed available deposits 2022-08-11 17:52:57 -07:00
tjs d17fb5dcd4 show max health ratio of 100 2022-08-11 12:29:07 -07:00
microwavedcola1 c148f5640a Adapt to latest ts/client changes
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-11 18:00:39 +02:00
saml33 e5ca9c4648 fix side nav alignment 2022-08-11 20:49:16 +10:00
saml33 284443204e update state variable names 2022-08-11 19:52:02 +10:00
saml33 51a00534f4 add total interest value 2022-08-11 16:23:18 +10:00
saml33 cc7ca4680f add account value api to portfolio 2022-08-11 14:09:58 +10:00
tjs 6d51bbcac0 get next account num so when we create sub accounts 2022-08-10 15:32:32 -07:00
tjs 39ee93fb37 use updated trade history fields 2022-08-10 14:52:28 -07:00
tjs d83d29b418 use selected mango account for trade history api 2022-08-10 14:33:28 -07:00
tjs 643627708b show tx id in error notifications 2022-08-10 13:42:15 -07:00
tjs 596d4713d7 exclude raydium routes due to tx size 2022-08-10 13:34:30 -07:00
tjs af25ab651f lookup swap symbol by mint address 2022-08-10 13:23:19 -07:00
tjs 002e215cb9 use explorer instead of solscan 2022-08-10 12:43:33 -07:00
saml33 6cc89d7386 add trade history 2022-08-10 21:17:10 +10:00
tjs 79f679e4ae remove unused side nav items 2022-08-09 18:21:33 -07:00
tjs 2b242d1a53 allow borrows 2022-08-09 17:14:12 -07:00
tjs ae58eecc65 use latest client to fix swap signature errors 2022-08-09 15:44:01 -07:00
tjs a3a4275462 fix chart timeframe active class 2022-08-09 10:06:36 -07:00
tjs 2514c4a223 fix withdraw modal buttons 2022-08-09 10:03:39 -07:00
tjs 730283d8c3 center loading icon after trade; reload account after editing 2022-08-08 14:45:56 -07:00
tjs 43089b195f close review trade modal after successful tx 2022-08-08 11:44:25 -07:00
tjs fab687ac87 swap settings modal 2022-08-08 10:42:18 -07:00
tjs f02dead07c fix mango acct switcher 2022-08-05 18:11:07 -04:00
tjs a417f12e8d use latest client 2022-08-04 12:42:03 -04:00
tjs b9cb38c556 use latest client to fix misordered health account bug 2022-08-04 01:26:09 -04:00
tjs 8ec490c042 extract jupiter logic into hook 2022-08-03 22:25:38 -04:00
saml33 4bcf4dee72 add other account details to portfolio 2022-08-03 22:13:40 +10:00
saml33 12101e2c9d add logo to mobile view 2022-08-03 21:16:30 +10:00
saml33 b6168b9089 review trade font size 2022-08-03 20:02:18 +10:00
saml33 210e96237d add placeholder account value chart 2022-08-03 19:49:31 +10:00
saml33 2391755ea9 fix launch modal from account summary 2022-08-03 12:26:11 +10:00
saml33 96fa045564 add account summary 2022-08-03 12:15:17 +10:00
saml33 b7cf8e2d4e remove health from account switcher 2022-08-03 10:37:42 +10:00
saml33 0f46288df6 add simple area chart 2022-08-03 10:17:42 +10:00
tjs ba39db5b9f fix link buttons 2022-08-02 15:20:27 -04:00
tjs d6d29e072b filter swap list by tokens in group 2022-08-02 14:09:29 -04:00
tjs 49f36908e8 slightly smaller switch 2022-08-02 14:09:29 -04:00
tjs 449dce1e7a move fetchJupiterTokens to zustand actions 2022-08-02 14:09:29 -04:00
saml33 c089e715e5 fix list transition 2022-08-02 20:47:24 +10:00
saml33 f87517bf1f add nft profile modal 2022-08-02 15:32:21 +10:00
saml33 8bc91139f4 add create account modal 2022-08-02 13:43:17 +10:00
saml33 a560b4294e add icon to link button 2022-08-02 12:05:38 +10:00
saml33 bc848c0042 add all mango accounts 2022-08-02 11:08:08 +10:00