mars-v2-frontend/hooks
Gustavo Mauricio 1deba2059e
MP-1699: Trade on Margin Account (#52)
* update generated types

* added CRO to token info

* update contract addresses to match latest deployment

* feat: token prices fetched from oracle contract

* trade page initial commit

* trade asset action hook

* extract max swap amount logic into custom hook

* trade component ui adjustments

* trade container min-width and some styling improvements

* trade success message and loading indicator

* normalize naming conventions on trading

* max swap amount formula adjustments

* trade execute msg with borrow. code cleanup

* fix: click max update tokenOut amount. remove wallet from fund denom

* delay token amount decimal conversion. input formatting

* increase hardcoded gas

* renamed max swappable amount hook

* display token prices and market information on landing page

* reset trade amounts when selected account change

* max trade amount cleanup and minor performance optimizations

* fix: liabilities value with 1 hour interest buffer for trade action

* add token symbol to wallet and account labels

* swap trade pairs icon and basic functionality

* remove unnecessary optional chaining. comment adjusted

* refactor useTokenPrices to build query dynamically on tokens data

* extracted trade container and respective functionality into separate file

* fix: properly calculate positions after full swap

* mp-1218: trading using wallet
2022-11-22 10:14:12 +01:00
..
mutations MP-1699: Trade on Margin Account (#52) 2022-11-22 10:14:12 +01:00
useAccountStats.tsx Update account stats on pending action (#51) 2022-11-09 13:47:36 +01:00
useAllBalances.tsx Linter and prettier adjustments (#50) 2022-11-09 10:04:06 +01:00
useAllowedCoins.tsx Linter and prettier adjustments (#50) 2022-11-09 10:04:06 +01:00
useCalculateMaxBorrowAmount.tsx Update account stats on pending action (#51) 2022-11-09 13:47:36 +01:00
useCalculateMaxTradeAmount.tsx MP-1699: Trade on Margin Account (#52) 2022-11-22 10:14:12 +01:00
useCalculateMaxWithdrawAmount.tsx Update account stats on pending action (#51) 2022-11-09 13:47:36 +01:00
useCreditAccountPositions.tsx Linter and prettier adjustments (#50) 2022-11-09 10:04:06 +01:00
useCreditAccounts.tsx Linter and prettier adjustments (#50) 2022-11-09 10:04:06 +01:00
useMarkets.tsx MP-1699: Trade on Margin Account (#52) 2022-11-22 10:14:12 +01:00
useRedbankBalances.tsx Linter and prettier adjustments (#50) 2022-11-09 10:04:06 +01:00
useTokenBalance.tsx Linter and prettier adjustments (#50) 2022-11-09 10:04:06 +01:00
useTokenPrices.tsx MP-1699: Trade on Margin Account (#52) 2022-11-22 10:14:12 +01:00