Skip to content

Commit

Permalink
Tribe Turbo (#63)
Browse files Browse the repository at this point in the history
* Turbo UI WIP

* Create Turbo landing page

* Turbo create safe (#64)

* Design first two steps of turbo modal (#66)

* Bump rari-components in Turbo (#67)

* Safe page (#70)

* fix create safe modals

* get user safes if you have any

* rename hooks to .ts

* added approval utils and integrated with createSafeAndDeposit

* deposit modal works

* boost / less works for strats

* safe utilization

* safe health on safe card

* Turbo Safe Modal (#71)

* Bump rari-components, fix type error

* Add approval modal state (#72)

* Modal Final Touches (#73)

* Progress on individual safe page (#74)

* Clean up context

* Connected Data to Safe Page (#76)

* Add deposit, withdraw, and claim interest modals (#77)

* show strategy data in table (#78)

* custom Statistics component

* update table

* moved modals into folder

* moved safe health into safe type

* Aaron's UI fixes (#79)

* Fix type error in safe strategies table (#80)

* added usdPricedTurboSafe data - updatedSafeData hook - reorg files

* fixed safe utilization errors on preview

* Statistic component, Aaron's feedback

* updated StatisticsTable

* update StatisticsTable

* 🅱️oost

* less built into boost modal

* Second ModalStep for flows + add safebalanceFei to claimable

* claiming works

* Fix type error that was breaking build (#83)

* Modify lockfile to install rari-components over https instead of ssh (#82)

* fetchmaxSafeAmount + form validation on modals

* Work on Turbo Index page (#84)

* Handle undefined strategy case (#85)

* Finish index page ui (#86)

* Turbo Safe Card update

* max boost using lens secondary

* Fix table key issue (#87)

* withdraw feature works

* CreateSafe fix

* Updated lens

* Updating addresses

* Updating params

* Fix type errors, bring in working package-lock.json

* Polish CreateSafeModal (#90)

* Add mocked net APY, create final state for deposit modal (#91)

* Stack stats in SafeCard, give Modal buttons more vertical padding (#92)

* Updating utils to match new lens

* Adding maxBoost to safe info

* Using chainID now

* Fixed deposit modal

* UI fix

* removed unnecessary queries

* Fix safeAndDeposit steps

* Comments and stats edition

* Fix type errors

* MaxDeposit button for safe creation

* Skip button fix

* Fixed allowance bug

* stepper

* Revert

* parse deposit amount

* Don't increment step if createSafe fails

* Wait until safe is created before setting loading to false

* Open Learn More Medium article in new window

* Bump rari-components

* Make checkbox smaller on success screen

* Change “back to Turbo home” to “All safes”

* boost caps // strategies filter // Safe Card refactor

* context + refactor

* approvals + err handling on modal funcs

* Fix Boost modal

* makes devnet faster

* navigate to created safe

* fix pool 156

* Bunch of stuff

* apy fix

* Fix type error

* Only show APY up to hundredths

* Make Getting Started clicks functional

* Fix disabled calculation in modals

* Resolve Aaron's notes

* updatedSafe skeleton

* Big dump flushhh

* Adding TurboOracle to constants

* created getMarketCF

* Adding simulation stats to createSafeAndDeposit

* Stats at the end

* boost caps

* lookin good big dog

* Fix build error caused by missing BalancesContext

* Fix

* agg data

* agg data

* new header

* Update SafeCard

* Make header font-weight 600

* More safe card cosemetic updates

* Add APY arrow on safe index page

* fix avg apy calc

* Fix splitHairs function

* Make Turbo Safe Page responsive

* Prefetch TRIBE token data

* admin check

* admin alert

* More mobile handling

* Getting started step styling

* Use theme colors in alerts

* Account Change

* lift boostmodal state to top

* remove rss

* many minor changes

* fix undefined bug on safe creation

* Approval fix

* Deposit modal tx rejection handle

* Modal reset after tx

* Strategy boost bug fix

* build error fix

* Refactor TurboIndex page

* small stuff

* Create Boost/Less success state (#98)

* Add claim interest success state (#99)

* Use newest version of rari-components StatisticsTable (#100)

* Update Boost Modal StatisticsTable (#101)

* Update deposit/withdraw modals (#102)

* Bump rari-components and fix button disabled hover style

* Delete dead code

* liquidation prices

* Create new index page (#103)

* ui touchups

* animations

* build err

* updated colors on deposit modal

* fix

* Deposit Modal Validation

* re-add slidefade

* bring back searchbar

* Fix landing page spacing

* Bump rari-components

* Handle DIVIDER case in UpadtingStatisticsTable

* Modal footer

* boost bug

* finally reset stepper

* merge conflix

* create safe through TurboMaster

* fix

* remove hardcap

* max withdraw

* 🐛 🔫

* fix withdraw + add anims

* trying logo anim on main page

* max withdraw on zero util

* strat names

* remove deposit input err

* remove deposit input err

* fix approve deposit flow

* delist strats + deposit fix

* collat boost cap

* small stuff

* Safes page

* Protocol safes page

* cosmetics

* disabled buttons if not admin

Co-authored-by: Koan <80938373+cryptickoan@users.noreply.github.com>
Co-authored-by: Sharad <sharadshekar@gmail.com>
Co-authored-by: cryptickoan <me@cryptickoan.com>
  • Loading branch information
4 people authored Apr 20, 2022
1 parent 1977a06 commit 94241b4
Show file tree
Hide file tree
Showing 148 changed files with 16,410 additions and 448 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
/.nyc_output
/reports


/src/static/contracts/compiled/*.ts
/src/static/compiled/*.json

Expand All @@ -35,10 +34,13 @@ cypress/screenshots
cypress/videos
cypress.env.json

tsconfig.tsbuildinfo

# vercel
.now
.vercel
.env
.env.local

.eslintcache

8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ Rari Capital's Web3 Portal.

- Run `npm run dev` to start the development server.
- Run `npm run build` to build a production bundle
- Run `npm run bump-rari-components` to automatically install the latest version (i.e. most recent commit hash) of rari-components and update `package.json`.
- Run `npm run bump-rari-components` to automatically install the latest version (i.e. most recent commit hash) of [rari-components](https://github.com/Rari-Capital/rari-components) and update `package.json`.
- Run `npm run typecheck` to typecheck

## Environment

- Set `NEXT_PUBLIC_USE_MOCKS` to `true` to test the dapp with mock objects (e.g. `NEXT_PUBLIC_USE_MOCKS=true npm run dev`).
- Currently, this env var is only used in the Turbo code — <kbd>Ctrl+F</kbd> for `process.env.NEXT_PUBLIC_USE_MOCKS` to see the specific use sites.

## Requirements

Expand Down
6 changes: 3 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ module.exports = withBundleAnalyzer({

config.module.rules.push({
test: /\.tsx?/,
// Transpile rari-components, even though it is in node_modules
include: [/node_modules\/rari-components/],
// Transpile rari-components
include: [/rari-components/],
use: "next-swc-loader",
});

return config;
},
});
});
27 changes: 14 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@0xsequence/multicall": "^0.35.5",
"@aave/protocol-v2": "^1.0.1",
"@chakra-ui/icons": "^1.0.0",
"@chakra-ui/react": "^1.8.1",
"@chakra-ui/react": "1.8.1",
"@emotion/react": "^11.0.0",
"@emotion/styled": "^11.0.0",
"@walletconnect/web3-provider": "^1.4.1",
Expand Down Expand Up @@ -35,7 +35,7 @@
"node-fetch": "^2.6.1",
"node-vibrant": "^3.1.6",
"polished": "^4.1.3",
"rari-components": "github:Rari-Capital/rari-components#1131c95058f26b36048d9cfe507abb15ae5adaa8",
"rari-components": "github:Rari-Capital/rari-components#144451807e8673b4586274adfb8e78346ab32fce",
"rari-tokens-generator": "^2.0.0",
"react": "^17.0.2",
"react-apexcharts": "1.3.7",
Expand All @@ -45,6 +45,7 @@
"react-error-boundary": "^3.0.2",
"react-fast-marquee": "^1.1.3",
"react-infinite-scroll-hook": "^4.0.1",
"react-intersection-observer": "^8.34.0",
"react-jazzicon": "^0.1.3",
"react-query": "^3.13.10",
"react-responsive-carousel": "^3.2.18",
Expand All @@ -61,7 +62,7 @@
},
"scripts": {
"bump-rari-components": "rm -rf .next && npm i \"git+https://github.com/Rari-Capital/rari-components#$(git ls-remote https://github.com/Rari-Capital/rari-components.git HEAD | awk '{ print $1}')\"",
"typecheck": "tsc --skipLibCheck -p ./tsconfig.json",
"typecheck": "tsc --noEmit",
"postinstall": "rari-tokens-generator ./src/static/compiled/tokens.json",
"start": "next start",
"build": "next build",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/turbo/isolated-actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/turbo/noseke.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/turbo/one-collateral-type.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/turbo/treasury-assets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/turbo/turbo-engine-3d-trimmed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/turbo/turbo-engine-3d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions public/static/turbo/turbo-engine-green.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/static/turbo/turbo-engine-red.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/turbo/turbo-no-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/turbo/turbo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/turbo/turbo2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/turbo/user-icons/daos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/turbo/user-icons/individuals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/turbo/user-icons/more.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/turbo/user-icons/protocols.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions src/components/pages/Fuse/FusePoolsPage/PoolRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ export const PoolRow = ({
<Center height="100%" width="13%">
<b>{poolNumber}</b>
</Center>
<Center height="100%" width="16%">
<b>{smallUsdFormatter(tvl)}</b>
</Center>
<Center height="100%" width="16%">
<b>{smallUsdFormatter(borrowed)}</b>
</Center>
<Center height="100%" width="16%">
<b>{smallUsdFormatter(tvl)}</b>
</Center>
<Center height="100%" width="16%">
<b>{smallUsdFormatter(borrowed)}</b>
</Center>
</>
)}
</Row>
Expand Down
Loading

1 comment on commit 94241b4

@vercel
Copy link

@vercel vercel bot commented on 94241b4 Apr 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.