Go to file
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
.github Linter and prettier adjustments (#50) 2022-11-09 10:04:06 +01:00
components MP-1699: Trade on Margin Account (#52) 2022-11-22 10:14:12 +01:00
config MP-1699: Trade on Margin Account (#52) 2022-11-22 10:14:12 +01:00
hooks MP-1699: Trade on Margin Account (#52) 2022-11-22 10:14:12 +01:00
pages MP-1699: Trade on Margin Account (#52) 2022-11-22 10:14:12 +01:00
public MP-1699: Trade on Margin Account (#52) 2022-11-22 10:14:12 +01:00
stores MP-1699: Trade on Margin Account (#52) 2022-11-22 10:14:12 +01:00
styles MP-2017: Deposit Funds and Account stats (#21) 2022-10-12 16:41:03 +01:00
types MP-1699: Trade on Margin Account (#52) 2022-11-22 10:14:12 +01:00
utils MP-1699: Trade on Margin Account (#52) 2022-11-22 10:14:12 +01:00
.eslintrc.json Linter and prettier adjustments (#50) 2022-11-09 10:04:06 +01:00
.gitignore sentry setup 2022-09-02 22:29:22 +01:00
.prettierrc Linter and prettier adjustments (#50) 2022-11-09 10:04:06 +01:00
generate_types.sh Withdraw assets from account (#43) 2022-11-07 16:36:12 +00:00
next.config.js fix: next build (#28) 2022-10-21 12:48:59 +02:00
package.json MP-1699: Trade on Margin Account (#52) 2022-11-22 10:14:12 +01:00
postcss.config.js initial setup wip 2022-09-02 15:30:58 +01:00
README.md Initial commit from Create Next App 2022-09-02 12:17:39 +01:00
sentry.client.config.js WIP (#12) 2022-09-29 20:21:31 +01:00
sentry.properties sentry setup 2022-09-02 22:29:22 +01:00
sentry.server.config.js WIP (#12) 2022-09-29 20:21:31 +01:00
tailwind.config.js WIP (#12) 2022-09-29 20:21:31 +01:00
tsconfig.json pages initial setup and respective navigation 2022-09-02 12:51:18 +01:00
yarn.lock MP-1699: Trade on Margin Account (#52) 2022-11-22 10:14:12 +01:00

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.