v2.0.6 (#651)
* Build(deps): bump @splinetool/runtime from 0.9.477 to 0.9.482 (#544) Bumps @splinetool/runtime from 0.9.477 to 0.9.482. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump @types/node from 20.7.0 to 20.8.6 (#548) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.7.0 to 20.8.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump @sentry/nextjs from 7.73.0 to 7.74.0 (#545) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.73.0 to 7.74.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.73.0...7.74.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Mp 3245 usehlsvaults hook (#541) * ✨ routing and pages for HLS * ✨ create hooks for fetching HLS vaults and Strategies * Share accounts (#539) * feat: do not redirect to wallet on portfolio page * fix: use connected wallet for AccountMenu * fix: fixed ghost AccountDetails * feat: created ShareBar and share functionality * fix: don’t show shareBar if no address is present * fix: stupid 'next/navigation' * tidy: format * fix: fixed tests * ✨ routing and pages for HLS (#538) * 🐛 use useAccountIds * fix: fixed the tests * fix: accountIds is now a suspense --------- Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> * 🐛 fix build --------- Co-authored-by: Linkie Link <linkielink.dev@gmail.com> * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * added hatched health masks (#552) * added hatched health masks * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * sneak: change filled to used * fix: fixed the foregroundColor on increase and my ocd * ♻️ refactor table (Farm) (#555) * ♻️ refactor table (Farm) * 🧽 clean up PR * 🧽 clean up PR * Build(deps): bump @babel/traverse from 7.21.2 to 7.23.2 (#554) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.2 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: rename withdraw to unlend (#557) * Full refactor tables (#556) * 📈 Improve structure generic Table component * ♻️ Update Borrow Table and overall structure of Table comp * ♻️ Update Lend table * ✨ add loading state for lend table * 🧪 Fix unit tests * ✨ Add available HLS Vaults page (#558) * Table updates (#559) * fix: adjusted table colors and hover interactions * fix: added actionButtons back and changed lend to APY * fix: build update * tidy: fixed the CircularProgress indicators on the loading modals * fix: relative import * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * Mp 3480 persist last trading pair (#578) * MP-3480: remove favourite asset and prepare localStore * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * MP-3480: persist trading pair * fix: updated according to feedback * fix: remove pair from Trading View header --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> * post update hotfixes (#580) * fix: fixed showing 0 on farm page if no desposited vaults * fix: chnage USDC’s name to Noble * v2.0.1 (#579) (#582) * Build(deps): bump @splinetool/runtime from 0.9.477 to 0.9.482 (#544) Bumps @splinetool/runtime from 0.9.477 to 0.9.482. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... * Build(deps-dev): bump @types/node from 20.7.0 to 20.8.6 (#548) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.7.0 to 20.8.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... * Build(deps): bump @sentry/nextjs from 7.73.0 to 7.74.0 (#545) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.73.0 to 7.74.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.73.0...7.74.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... * Mp 3245 usehlsvaults hook (#541) * ✨ routing and pages for HLS * ✨ create hooks for fetching HLS vaults and Strategies * Share accounts (#539) * feat: do not redirect to wallet on portfolio page * fix: use connected wallet for AccountMenu * fix: fixed ghost AccountDetails * feat: created ShareBar and share functionality * fix: don’t show shareBar if no address is present * fix: stupid 'next/navigation' * tidy: format * fix: fixed tests * ✨ routing and pages for HLS (#538) * 🐛 use useAccountIds * fix: fixed the tests * fix: accountIds is now a suspense --------- * 🐛 fix build --------- * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * added hatched health masks (#552) * added hatched health masks * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * sneak: change filled to used * fix: fixed the foregroundColor on increase and my ocd * ♻️ refactor table (Farm) (#555) * ♻️ refactor table (Farm) * 🧽 clean up PR * 🧽 clean up PR * Build(deps): bump @babel/traverse from 7.21.2 to 7.23.2 (#554) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.2 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... * fix: rename withdraw to unlend (#557) * Full refactor tables (#556) * 📈 Improve structure generic Table component * ♻️ Update Borrow Table and overall structure of Table comp * ♻️ Update Lend table * ✨ add loading state for lend table * 🧪 Fix unit tests * ✨ Add available HLS Vaults page (#558) * Table updates (#559) * fix: adjusted table colors and hover interactions * fix: added actionButtons back and changed lend to APY * fix: build update * tidy: fixed the CircularProgress indicators on the loading modals * fix: relative import * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * Mp 3480 persist last trading pair (#578) * MP-3480: remove favourite asset and prepare localStore * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * MP-3480: persist trading pair * fix: updated according to feedback * fix: remove pair from Trading View header --------- --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Linkie Link <linkielink.dev@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * v2.0.1 (#579) (#583) * Build(deps): bump @splinetool/runtime from 0.9.477 to 0.9.482 (#544) Bumps @splinetool/runtime from 0.9.477 to 0.9.482. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... * Build(deps-dev): bump @types/node from 20.7.0 to 20.8.6 (#548) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.7.0 to 20.8.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... * Build(deps): bump @sentry/nextjs from 7.73.0 to 7.74.0 (#545) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.73.0 to 7.74.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.73.0...7.74.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... * Mp 3245 usehlsvaults hook (#541) * ✨ routing and pages for HLS * ✨ create hooks for fetching HLS vaults and Strategies * Share accounts (#539) * feat: do not redirect to wallet on portfolio page * fix: use connected wallet for AccountMenu * fix: fixed ghost AccountDetails * feat: created ShareBar and share functionality * fix: don’t show shareBar if no address is present * fix: stupid 'next/navigation' * tidy: format * fix: fixed tests * ✨ routing and pages for HLS (#538) * 🐛 use useAccountIds * fix: fixed the tests * fix: accountIds is now a suspense --------- * 🐛 fix build --------- * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * added hatched health masks (#552) * added hatched health masks * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * sneak: change filled to used * fix: fixed the foregroundColor on increase and my ocd * ♻️ refactor table (Farm) (#555) * ♻️ refactor table (Farm) * 🧽 clean up PR * 🧽 clean up PR * Build(deps): bump @babel/traverse from 7.21.2 to 7.23.2 (#554) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.2 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... * fix: rename withdraw to unlend (#557) * Full refactor tables (#556) * 📈 Improve structure generic Table component * ♻️ Update Borrow Table and overall structure of Table comp * ♻️ Update Lend table * ✨ add loading state for lend table * 🧪 Fix unit tests * ✨ Add available HLS Vaults page (#558) * Table updates (#559) * fix: adjusted table colors and hover interactions * fix: added actionButtons back and changed lend to APY * fix: build update * tidy: fixed the CircularProgress indicators on the loading modals * fix: relative import * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * Mp 3480 persist last trading pair (#578) * MP-3480: remove favourite asset and prepare localStore * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * MP-3480: persist trading pair * fix: updated according to feedback * fix: remove pair from Trading View header --------- --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> * Asset select overflow (#584) * v2.0.1 (#579) * Build(deps): bump @splinetool/runtime from 0.9.477 to 0.9.482 (#544) Bumps @splinetool/runtime from 0.9.477 to 0.9.482. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump @types/node from 20.7.0 to 20.8.6 (#548) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.7.0 to 20.8.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump @sentry/nextjs from 7.73.0 to 7.74.0 (#545) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.73.0 to 7.74.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.73.0...7.74.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Mp 3245 usehlsvaults hook (#541) * ✨ routing and pages for HLS * ✨ create hooks for fetching HLS vaults and Strategies * Share accounts (#539) * feat: do not redirect to wallet on portfolio page * fix: use connected wallet for AccountMenu * fix: fixed ghost AccountDetails * feat: created ShareBar and share functionality * fix: don’t show shareBar if no address is present * fix: stupid 'next/navigation' * tidy: format * fix: fixed tests * ✨ routing and pages for HLS (#538) * 🐛 use useAccountIds * fix: fixed the tests * fix: accountIds is now a suspense --------- Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> * 🐛 fix build --------- Co-authored-by: Linkie Link <linkielink.dev@gmail.com> * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * added hatched health masks (#552) * added hatched health masks * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * sneak: change filled to used * fix: fixed the foregroundColor on increase and my ocd * ♻️ refactor table (Farm) (#555) * ♻️ refactor table (Farm) * 🧽 clean up PR * 🧽 clean up PR * Build(deps): bump @babel/traverse from 7.21.2 to 7.23.2 (#554) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.2 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: rename withdraw to unlend (#557) * Full refactor tables (#556) * 📈 Improve structure generic Table component * ♻️ Update Borrow Table and overall structure of Table comp * ♻️ Update Lend table * ✨ add loading state for lend table * 🧪 Fix unit tests * ✨ Add available HLS Vaults page (#558) * Table updates (#559) * fix: adjusted table colors and hover interactions * fix: added actionButtons back and changed lend to APY * fix: build update * tidy: fixed the CircularProgress indicators on the loading modals * fix: relative import * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * Mp 3480 persist last trading pair (#578) * MP-3480: remove favourite asset and prepare localStore * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * MP-3480: persist trading pair * fix: updated according to feedback * fix: remove pair from Trading View header --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> * Build(deps): bump @splinetool/runtime from 0.9.477 to 0.9.482 (#544) Bumps @splinetool/runtime from 0.9.477 to 0.9.482. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump @types/node from 20.7.0 to 20.8.6 (#548) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.7.0 to 20.8.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump @sentry/nextjs from 7.73.0 to 7.74.0 (#545) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.73.0 to 7.74.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.73.0...7.74.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Mp 3245 usehlsvaults hook (#541) * ✨ routing and pages for HLS * ✨ create hooks for fetching HLS vaults and Strategies * Share accounts (#539) * feat: do not redirect to wallet on portfolio page * fix: use connected wallet for AccountMenu * fix: fixed ghost AccountDetails * feat: created ShareBar and share functionality * fix: don’t show shareBar if no address is present * fix: stupid 'next/navigation' * tidy: format * fix: fixed tests * ✨ routing and pages for HLS (#538) * 🐛 use useAccountIds * fix: fixed the tests * fix: accountIds is now a suspense --------- Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> * 🐛 fix build --------- Co-authored-by: Linkie Link <linkielink.dev@gmail.com> * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * added hatched health masks (#552) * added hatched health masks * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * sneak: change filled to used * fix: fixed the foregroundColor on increase and my ocd * ♻️ refactor table (Farm) (#555) * ♻️ refactor table (Farm) * 🧽 clean up PR * 🧽 clean up PR * fix: rename withdraw to unlend (#557) * Full refactor tables (#556) * 📈 Improve structure generic Table component * ♻️ Update Borrow Table and overall structure of Table comp * ♻️ Update Lend table * ✨ add loading state for lend table * 🧪 Fix unit tests * ✨ Add available HLS Vaults page (#558) * Table updates (#559) * fix: adjusted table colors and hover interactions * fix: added actionButtons back and changed lend to APY * fix: build update * tidy: fixed the CircularProgress indicators on the loading modals * fix: relative import * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * post update hotfixes (#580) * fix: fixed showing 0 on farm page if no desposited vaults * fix: chnage USDC’s name to Noble * v2.0.1 (#579) (#582) * Build(deps): bump @splinetool/runtime from 0.9.477 to 0.9.482 (#544) Bumps @splinetool/runtime from 0.9.477 to 0.9.482. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... * Build(deps-dev): bump @types/node from 20.7.0 to 20.8.6 (#548) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.7.0 to 20.8.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... * Build(deps): bump @sentry/nextjs from 7.73.0 to 7.74.0 (#545) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.73.0 to 7.74.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.73.0...7.74.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... * Mp 3245 usehlsvaults hook (#541) * ✨ routing and pages for HLS * ✨ create hooks for fetching HLS vaults and Strategies * Share accounts (#539) * feat: do not redirect to wallet on portfolio page * fix: use connected wallet for AccountMenu * fix: fixed ghost AccountDetails * feat: created ShareBar and share functionality * fix: don’t show shareBar if no address is present * fix: stupid 'next/navigation' * tidy: format * fix: fixed tests * ✨ routing and pages for HLS (#538) * 🐛 use useAccountIds * fix: fixed the tests * fix: accountIds is now a suspense --------- * 🐛 fix build --------- * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * added hatched health masks (#552) * added hatched health masks * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * sneak: change filled to used * fix: fixed the foregroundColor on increase and my ocd * ♻️ refactor table (Farm) (#555) * ♻️ refactor table (Farm) * 🧽 clean up PR * 🧽 clean up PR * Build(deps): bump @babel/traverse from 7.21.2 to 7.23.2 (#554) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.2 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... * fix: rename withdraw to unlend (#557) * Full refactor tables (#556) * 📈 Improve structure generic Table component * ♻️ Update Borrow Table and overall structure of Table comp * ♻️ Update Lend table * ✨ add loading state for lend table * 🧪 Fix unit tests * ✨ Add available HLS Vaults page (#558) * Table updates (#559) * fix: adjusted table colors and hover interactions * fix: added actionButtons back and changed lend to APY * fix: build update * tidy: fixed the CircularProgress indicators on the loading modals * fix: relative import * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * Mp 3480 persist last trading pair (#578) * MP-3480: remove favourite asset and prepare localStore * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * MP-3480: persist trading pair * fix: updated according to feedback * fix: remove pair from Trading View header --------- --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Linkie Link <linkielink.dev@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * v2.0.1 (#579) (#583) * Build(deps): bump @splinetool/runtime from 0.9.477 to 0.9.482 (#544) Bumps @splinetool/runtime from 0.9.477 to 0.9.482. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... * Build(deps-dev): bump @types/node from 20.7.0 to 20.8.6 (#548) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.7.0 to 20.8.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... * Build(deps): bump @sentry/nextjs from 7.73.0 to 7.74.0 (#545) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.73.0 to 7.74.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.73.0...7.74.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... * Mp 3245 usehlsvaults hook (#541) * ✨ routing and pages for HLS * ✨ create hooks for fetching HLS vaults and Strategies * Share accounts (#539) * feat: do not redirect to wallet on portfolio page * fix: use connected wallet for AccountMenu * fix: fixed ghost AccountDetails * feat: created ShareBar and share functionality * fix: don’t show shareBar if no address is present * fix: stupid 'next/navigation' * tidy: format * fix: fixed tests * ✨ routing and pages for HLS (#538) * 🐛 use useAccountIds * fix: fixed the tests * fix: accountIds is now a suspense --------- * 🐛 fix build --------- * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * added hatched health masks (#552) * added hatched health masks * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * sneak: change filled to used * fix: fixed the foregroundColor on increase and my ocd * ♻️ refactor table (Farm) (#555) * ♻️ refactor table (Farm) * 🧽 clean up PR * 🧽 clean up PR * Build(deps): bump @babel/traverse from 7.21.2 to 7.23.2 (#554) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.2 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... * fix: rename withdraw to unlend (#557) * Full refactor tables (#556) * 📈 Improve structure generic Table component * ♻️ Update Borrow Table and overall structure of Table comp * ♻️ Update Lend table * ✨ add loading state for lend table * 🧪 Fix unit tests * ✨ Add available HLS Vaults page (#558) * Table updates (#559) * fix: adjusted table colors and hover interactions * fix: added actionButtons back and changed lend to APY * fix: build update * tidy: fixed the CircularProgress indicators on the loading modals * fix: relative import * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * Mp 3480 persist last trading pair (#578) * MP-3480: remove favourite asset and prepare localStore * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * MP-3480: persist trading pair * fix: updated according to feedback * fix: remove pair from Trading View header --------- --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> * fix: fixed the asset select overflow --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> * fix: fixed the AccountDetails position * fix: update * Hotfixes v2.0.1 (#581) (#585) * Build(deps): bump @splinetool/runtime from 0.9.477 to 0.9.482 (#544) Bumps @splinetool/runtime from 0.9.477 to 0.9.482. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... * Build(deps-dev): bump @types/node from 20.7.0 to 20.8.6 (#548) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.7.0 to 20.8.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... * Build(deps): bump @sentry/nextjs from 7.73.0 to 7.74.0 (#545) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.73.0 to 7.74.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.73.0...7.74.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... * Mp 3245 usehlsvaults hook (#541) * ✨ routing and pages for HLS * ✨ create hooks for fetching HLS vaults and Strategies * Share accounts (#539) * feat: do not redirect to wallet on portfolio page * fix: use connected wallet for AccountMenu * fix: fixed ghost AccountDetails * feat: created ShareBar and share functionality * fix: don’t show shareBar if no address is present * fix: stupid 'next/navigation' * tidy: format * fix: fixed tests * ✨ routing and pages for HLS (#538) * 🐛 use useAccountIds * fix: fixed the tests * fix: accountIds is now a suspense --------- * 🐛 fix build --------- * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * added hatched health masks (#552) * added hatched health masks * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * sneak: change filled to used * fix: fixed the foregroundColor on increase and my ocd * ♻️ refactor table (Farm) (#555) * ♻️ refactor table (Farm) * 🧽 clean up PR * 🧽 clean up PR * Build(deps): bump @babel/traverse from 7.21.2 to 7.23.2 (#554) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.2 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... * fix: rename withdraw to unlend (#557) * Full refactor tables (#556) * 📈 Improve structure generic Table component * ♻️ Update Borrow Table and overall structure of Table comp * ♻️ Update Lend table * ✨ add loading state for lend table * 🧪 Fix unit tests * ✨ Add available HLS Vaults page (#558) * Table updates (#559) * fix: adjusted table colors and hover interactions * fix: added actionButtons back and changed lend to APY * fix: build update * tidy: fixed the CircularProgress indicators on the loading modals * fix: relative import * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * Mp 3480 persist last trading pair (#578) * MP-3480: remove favourite asset and prepare localStore * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * MP-3480: persist trading pair * fix: updated according to feedback * fix: remove pair from Trading View header --------- * post update hotfixes (#580) * fix: fixed showing 0 on farm page if no desposited vaults * fix: chnage USDC’s name to Noble * v2.0.1 (#579) (#582) * Build(deps): bump @splinetool/runtime from 0.9.477 to 0.9.482 (#544) Bumps @splinetool/runtime from 0.9.477 to 0.9.482. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... * Build(deps-dev): bump @types/node from 20.7.0 to 20.8.6 (#548) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.7.0 to 20.8.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... * Build(deps): bump @sentry/nextjs from 7.73.0 to 7.74.0 (#545) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.73.0 to 7.74.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.73.0...7.74.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... * Mp 3245 usehlsvaults hook (#541) * ✨ routing and pages for HLS * ✨ create hooks for fetching HLS vaults and Strategies * Share accounts (#539) * feat: do not redirect to wallet on portfolio page * fix: use connected wallet for AccountMenu * fix: fixed ghost AccountDetails * feat: created ShareBar and share functionality * fix: don’t show shareBar if no address is present * fix: stupid 'next/navigation' * tidy: format * fix: fixed tests * ✨ routing and pages for HLS (#538) * 🐛 use useAccountIds * fix: fixed the tests * fix: accountIds is now a suspense --------- * 🐛 fix build --------- * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * added hatched health masks (#552) * added hatched health masks * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * sneak: change filled to used * fix: fixed the foregroundColor on increase and my ocd * ♻️ refactor table (Farm) (#555) * ♻️ refactor table (Farm) * 🧽 clean up PR * 🧽 clean up PR * Build(deps): bump @babel/traverse from 7.21.2 to 7.23.2 (#554) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.2 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... * fix: rename withdraw to unlend (#557) * Full refactor tables (#556) * 📈 Improve structure generic Table component * ♻️ Update Borrow Table and overall structure of Table comp * ♻️ Update Lend table * ✨ add loading state for lend table * 🧪 Fix unit tests * ✨ Add available HLS Vaults page (#558) * Table updates (#559) * fix: adjusted table colors and hover interactions * fix: added actionButtons back and changed lend to APY * fix: build update * tidy: fixed the CircularProgress indicators on the loading modals * fix: relative import * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * Mp 3480 persist last trading pair (#578) * MP-3480: remove favourite asset and prepare localStore * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * MP-3480: persist trading pair * fix: updated according to feedback * fix: remove pair from Trading View header --------- --------- * v2.0.1 (#579) (#583) * Build(deps): bump @splinetool/runtime from 0.9.477 to 0.9.482 (#544) Bumps @splinetool/runtime from 0.9.477 to 0.9.482. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... * Build(deps-dev): bump @types/node from 20.7.0 to 20.8.6 (#548) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.7.0 to 20.8.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... * Build(deps): bump @sentry/nextjs from 7.73.0 to 7.74.0 (#545) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.73.0 to 7.74.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.73.0...7.74.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... * Mp 3245 usehlsvaults hook (#541) * ✨ routing and pages for HLS * ✨ create hooks for fetching HLS vaults and Strategies * Share accounts (#539) * feat: do not redirect to wallet on portfolio page * fix: use connected wallet for AccountMenu * fix: fixed ghost AccountDetails * feat: created ShareBar and share functionality * fix: don’t show shareBar if no address is present * fix: stupid 'next/navigation' * tidy: format * fix: fixed tests * ✨ routing and pages for HLS (#538) * 🐛 use useAccountIds * fix: fixed the tests * fix: accountIds is now a suspense --------- * 🐛 fix build --------- * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * added hatched health masks (#552) * added hatched health masks * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * sneak: change filled to used * fix: fixed the foregroundColor on increase and my ocd * ♻️ refactor table (Farm) (#555) * ♻️ refactor table (Farm) * 🧽 clean up PR * 🧽 clean up PR * Build(deps): bump @babel/traverse from 7.21.2 to 7.23.2 (#554) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.2 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... * fix: rename withdraw to unlend (#557) * Full refactor tables (#556) * 📈 Improve structure generic Table component * ♻️ Update Borrow Table and overall structure of Table comp * ♻️ Update Lend table * ✨ add loading state for lend table * 🧪 Fix unit tests * ✨ Add available HLS Vaults page (#558) * Table updates (#559) * fix: adjusted table colors and hover interactions * fix: added actionButtons back and changed lend to APY * fix: build update * tidy: fixed the CircularProgress indicators on the loading modals * fix: relative import * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * Mp 3480 persist last trading pair (#578) * MP-3480: remove favourite asset and prepare localStore * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * MP-3480: persist trading pair * fix: updated according to feedback * fix: remove pair from Trading View header --------- --------- * Asset select overflow (#584) * v2.0.1 (#579) * Build(deps): bump @splinetool/runtime from 0.9.477 to 0.9.482 (#544) Bumps @splinetool/runtime from 0.9.477 to 0.9.482. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... * Build(deps-dev): bump @types/node from 20.7.0 to 20.8.6 (#548) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.7.0 to 20.8.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... * Build(deps): bump @sentry/nextjs from 7.73.0 to 7.74.0 (#545) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.73.0 to 7.74.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.73.0...7.74.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... * Mp 3245 usehlsvaults hook (#541) * ✨ routing and pages for HLS * ✨ create hooks for fetching HLS vaults and Strategies * Share accounts (#539) * feat: do not redirect to wallet on portfolio page * fix: use connected wallet for AccountMenu * fix: fixed ghost AccountDetails * feat: created ShareBar and share functionality * fix: don’t show shareBar if no address is present * fix: stupid 'next/navigation' * tidy: format * fix: fixed tests * ✨ routing and pages for HLS (#538) * 🐛 use useAccountIds * fix: fixed the tests * fix: accountIds is now a suspense --------- * 🐛 fix build --------- * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * added hatched health masks (#552) * added hatched health masks * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * sneak: change filled to used * fix: fixed the foregroundColor on increase and my ocd * ♻️ refactor table (Farm) (#555) * ♻️ refactor table (Farm) * 🧽 clean up PR * 🧽 clean up PR * Build(deps): bump @babel/traverse from 7.21.2 to 7.23.2 (#554) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.2 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... * fix: rename withdraw to unlend (#557) * Full refactor tables (#556) * 📈 Improve structure generic Table component * ♻️ Update Borrow Table and overall structure of Table comp * ♻️ Update Lend table * ✨ add loading state for lend table * 🧪 Fix unit tests * ✨ Add available HLS Vaults page (#558) * Table updates (#559) * fix: adjusted table colors and hover interactions * fix: added actionButtons back and changed lend to APY * fix: build update * tidy: fixed the CircularProgress indicators on the loading modals * fix: relative import * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * Mp 3480 persist last trading pair (#578) * MP-3480: remove favourite asset and prepare localStore * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * MP-3480: persist trading pair * fix: updated according to feedback * fix: remove pair from Trading View header --------- --------- * Build(deps): bump @splinetool/runtime from 0.9.477 to 0.9.482 (#544) Bumps @splinetool/runtime from 0.9.477 to 0.9.482. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... * Build(deps-dev): bump @types/node from 20.7.0 to 20.8.6 (#548) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.7.0 to 20.8.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... * Build(deps): bump @sentry/nextjs from 7.73.0 to 7.74.0 (#545) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.73.0 to 7.74.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.73.0...7.74.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... * Mp 3245 usehlsvaults hook (#541) * ✨ routing and pages for HLS * ✨ create hooks for fetching HLS vaults and Strategies * Share accounts (#539) * feat: do not redirect to wallet on portfolio page * fix: use connected wallet for AccountMenu * fix: fixed ghost AccountDetails * feat: created ShareBar and share functionality * fix: don’t show shareBar if no address is present * fix: stupid 'next/navigation' * tidy: format * fix: fixed tests * ✨ routing and pages for HLS (#538) * 🐛 use useAccountIds * fix: fixed the tests * fix: accountIds is now a suspense --------- * 🐛 fix build --------- * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * added hatched health masks (#552) * added hatched health masks * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * sneak: change filled to used * fix: fixed the foregroundColor on increase and my ocd * ♻️ refactor table (Farm) (#555) * ♻️ refactor table (Farm) * 🧽 clean up PR * 🧽 clean up PR * fix: rename withdraw to unlend (#557) * Full refactor tables (#556) * 📈 Improve structure generic Table component * ♻️ Update Borrow Table and overall structure of Table comp * ♻️ Update Lend table * ✨ add loading state for lend table * 🧪 Fix unit tests * ✨ Add available HLS Vaults page (#558) * Table updates (#559) * fix: adjusted table colors and hover interactions * fix: added actionButtons back and changed lend to APY * fix: build update * tidy: fixed the CircularProgress indicators on the loading modals * fix: relative import * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * post update hotfixes (#580) * fix: fixed showing 0 on farm page if no desposited vaults * fix: chnage USDC’s name to Noble * v2.0.1 (#579) (#582) * Build(deps): bump @splinetool/runtime from 0.9.477 to 0.9.482 (#544) Bumps @splinetool/runtime from 0.9.477 to 0.9.482. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... * Build(deps-dev): bump @types/node from 20.7.0 to 20.8.6 (#548) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.7.0 to 20.8.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... * Build(deps): bump @sentry/nextjs from 7.73.0 to 7.74.0 (#545) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.73.0 to 7.74.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.73.0...7.74.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... * Mp 3245 usehlsvaults hook (#541) * ✨ routing and pages for HLS * ✨ create hooks for fetching HLS vaults and Strategies * Share accounts (#539) * feat: do not redirect to wallet on portfolio page * fix: use connected wallet for AccountMenu * fix: fixed ghost AccountDetails * feat: created ShareBar and share functionality * fix: don’t show shareBar if no address is present * fix: stupid 'next/navigation' * tidy: format * fix: fixed tests * ✨ routing and pages for HLS (#538) * 🐛 use useAccountIds * fix: fixed the tests * fix: accountIds is now a suspense --------- * 🐛 fix build --------- * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * added hatched health masks (#552) * added hatched health masks * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * sneak: change filled to used * fix: fixed the foregroundColor on increase and my ocd * ♻️ refactor table (Farm) (#555) * ♻️ refactor table (Farm) * 🧽 clean up PR * 🧽 clean up PR * Build(deps): bump @babel/traverse from 7.21.2 to 7.23.2 (#554) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.2 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... * fix: rename withdraw to unlend (#557) * Full refactor tables (#556) * 📈 Improve structure generic Table component * ♻️ Update Borrow Table and overall structure of Table comp * ♻️ Update Lend table * ✨ add loading state for lend table * 🧪 Fix unit tests * ✨ Add available HLS Vaults page (#558) * Table updates (#559) * fix: adjusted table colors and hover interactions * fix: added actionButtons back and changed lend to APY * fix: build update * tidy: fixed the CircularProgress indicators on the loading modals * fix: relative import * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * Mp 3480 persist last trading pair (#578) * MP-3480: remove favourite asset and prepare localStore * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * MP-3480: persist trading pair * fix: updated according to feedback * fix: remove pair from Trading View header --------- --------- * v2.0.1 (#579) (#583) * Build(deps): bump @splinetool/runtime from 0.9.477 to 0.9.482 (#544) Bumps @splinetool/runtime from 0.9.477 to 0.9.482. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... * Build(deps-dev): bump @types/node from 20.7.0 to 20.8.6 (#548) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.7.0 to 20.8.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... * Build(deps): bump @sentry/nextjs from 7.73.0 to 7.74.0 (#545) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.73.0 to 7.74.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.73.0...7.74.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... * Mp 3245 usehlsvaults hook (#541) * ✨ routing and pages for HLS * ✨ create hooks for fetching HLS vaults and Strategies * Share accounts (#539) * feat: do not redirect to wallet on portfolio page * fix: use connected wallet for AccountMenu * fix: fixed ghost AccountDetails * feat: created ShareBar and share functionality * fix: don’t show shareBar if no address is present * fix: stupid 'next/navigation' * tidy: format * fix: fixed tests * ✨ routing and pages for HLS (#538) * 🐛 use useAccountIds * fix: fixed the tests * fix: accountIds is now a suspense --------- * 🐛 fix build --------- * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * added hatched health masks (#552) * added hatched health masks * Mp 2837 pre commit hook (#549) * MP-2837: added husys and lint-staged * MP-2837: enabled lint-staged * MP-2837: setup .prettierignore * MP-2837: setup .prettierignore * MP-3483: all Depo. Caps are now % filled (#551) * MP-3487: changed the copy of the bridging intro screen (#553) * MP-3482: replaced Max LTV with Max. Leverage (#550) * sneak: change filled to used * fix: fixed the foregroundColor on increase and my ocd * ♻️ refactor table (Farm) (#555) * ♻️ refactor table (Farm) * 🧽 clean up PR * 🧽 clean up PR * Build(deps): bump @babel/traverse from 7.21.2 to 7.23.2 (#554) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.2 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... * fix: rename withdraw to unlend (#557) * Full refactor tables (#556) * 📈 Improve structure generic Table component * ♻️ Update Borrow Table and overall structure of Table comp * ♻️ Update Lend table * ✨ add loading state for lend table * 🧪 Fix unit tests * ✨ Add available HLS Vaults page (#558) * Table updates (#559) * fix: adjusted table colors and hover interactions * fix: added actionButtons back and changed lend to APY * fix: build update * tidy: fixed the CircularProgress indicators on the loading modals * fix: relative import * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * Mp 3480 persist last trading pair (#578) * MP-3480: remove favourite asset and prepare localStore * env: updated shuttle, keplr and version (#566) * fix: fixed dust left when trying to buy max amount without leverage (#565) * feat: added squidrouter to the bridges (#561) * feat: added squidrouter to the bridges * fix: copy update * MP-3521: updated the APR calculation (#572) * Table fixes (#563) * fix: fixed the sorting of the tables * fix: added sorting functions * fix: farm sorting for deposit cap * fix: fixed Row types * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.5 to 0.5.6 (#567) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.5 to 0.5.6. - [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... * Build(deps): bump react-router-dom from 6.16.0 to 6.17.0 (#571) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... * ✨ HLS: Add info modal (#573) * MP-3484: remember summaryAccount tabs and auto expand both (#574) * User feedback (#575) * feat: added debt indicator and adjusted the borrowModal * fix: wallet interaction fix * Add usdc noble (#576) * env: added USDC.n * env: updated usdc noble variables * fix: fixed the pool on USDC for devnet purposes * 🐛 Fix initial status of chart (#577) * MP-3480: persist trading pair * fix: updated according to feedback * fix: remove pair from Trading View header --------- --------- * fix: fixed the asset select overflow --------- * fix: fixed the AccountDetails position * fix: update --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: prevent permanent account updates by trade page (#587) * fix: keep the selected accountId if its present int the url (#588) * Link changelog (#589) * env: update RPC endpoint * feat: added changelog link to the footer version * Refactor balances table (#590) * env: update env.example after last sync * tidy: refactored AccountBalancesTable * fix: updated isCard to hideCard * fix: do update the health on sliding the margin back to 0 (#593) * fix: disable highlighting on non-expandable rows (#592) * Healthfactor adjustments (#594) * fix: do update the health on sliding the margin back to 0 * MP-3531: first updates on the health bars * fix: added exponential function for health percentage * fix: build fix * tidy: refactor * tidy: cleanup * feat: added new curve * fix: base set to 3.5 * env: version update * 🌟 Add HLS Vault Modal (#595) * 🌟 Add HLS Vault Modal * 🛠️ Fix failing build * fix: keep the selected accountId if its present int the url (#588) * Link changelog (#589) * env: update RPC endpoint * feat: added changelog link to the footer version * Refactor balances table (#590) * env: update env.example after last sync * tidy: refactored AccountBalancesTable * fix: updated isCard to hideCard * fix: do update the health on sliding the margin back to 0 (#593) * fix: disable highlighting on non-expandable rows (#592) * Healthfactor adjustments (#594) * fix: do update the health on sliding the margin back to 0 * MP-3531: first updates on the health bars * fix: added exponential function for health percentage * fix: build fix * tidy: refactor * tidy: cleanup * feat: added new curve * fix: base set to 3.5 * env: version update * 🌟 Add HLS Vault Modal * Use `DisplayCurrency` in subtitle header * 🔥Remove redundant component --------- Co-authored-by: Linkie Link <linkielink.dev@gmail.com> * fix: if HF > 1 and health === 0, return health 1 (#601) * MP-3540: added liquidity warning (#605) * Oracle update button (#606) * feat: added a resync button to the header * fix: updated the text * fix: remove pulsing * fix: fixed the checkbox not being clickable after select (#608) * Mp 3360 create vault position (#607) * 🔧 Small fixes * ✨ Deposit into HLS Vault + Groudnwork for HLS Staking * Adjusted according to feedback * Adjusted according to feedback * Build(deps-dev): bump eslint-config-next from 13.5.4 to 14.0.0 (#599) Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 13.5.4 to 14.0.0. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/commits/v14.0.0/packages/eslint-config-next) --- updated-dependencies: - dependency-name: eslint-config-next dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump recharts from 2.8.0 to 2.9.0 (#598) Bumps [recharts](https://github.com/recharts/recharts) from 2.8.0 to 2.9.0. - [Release notes](https://github.com/recharts/recharts/releases) - [Changelog](https://github.com/recharts/recharts/blob/master/CHANGELOG.md) - [Commits](https://github.com/recharts/recharts/compare/v2.8.0...v2.9.0) --- updated-dependencies: - dependency-name: recharts dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump @types/react from 18.2.28 to 18.2.33 (#596) Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.28 to 18.2.33. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump crypto-js from 4.1.1 to 4.2.0 (#591) Bumps [crypto-js](https://github.com/brix/crypto-js) from 4.1.1 to 4.2.0. - [Commits](https://github.com/brix/crypto-js/compare/4.1.1...4.2.0) --- updated-dependencies: - dependency-name: crypto-js dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump @types/lodash.throttle from 4.1.7 to 4.1.8 (#569) Bumps [@types/lodash.throttle](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash.throttle) from 4.1.7 to 4.1.8. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash.throttle) --- updated-dependencies: - dependency-name: "@types/lodash.throttle" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: waiting for script to be ready (#609) * fix: show a loading state of the trading chart (#610) * fix: show a loading state of the trading chart * tidy: refactor * Feedback implementation (#611) * env: update wallet volnurabilities * fix: always render TradingChart container * fix: amounts can be a fraction of MIN_AMOUNT * feat: added clickaway handler * tidy: refactor * fix: size below 0.00001 is possible for BTC and WETH * fix: fixed tests * Mp 3367 staking interactions (#613) * ♻️ Refactor borrowRate to be in full numbers * ✨Enter into HLS Staking strategy * ✨HLS Staking deposited table + Portfolio pages * tidy: refactored the masks for HealthBar --------- Co-authored-by: Linkie Link <linkielink.dev@gmail.com> * ✨Added dropdown button (#614) * ✨Add basic modal for HLS staking (#615) * Hls staking manage actions (#622) * ✨Add basic modal for HLS staking * ✨UI components for Manage * ✨All Manage actions (except change lev) * 🐛hls intro icons + checkbox, hide repay when no debt, clickable dropdown * fix build * Pyth history feed (#623) * MP-3556: first PythDataFeed class * fix: fixed the timestamp * fix: fixed the chart data * fix: fixed the prices * fix: fixed the math and decimal scale * tidy: refactor * fix: update the pythFeedId * fix: updated OsmosisTheGraphDataFeed * fix: add a fallback for non pyth data * tidy: refactor * fix: adjusted to feedback * Tia and stosmo (#627) * feat: listed TIA and stOSMO * fix: fixed USDC * tidy: refactor the token logos * Hls leverage (#628) * ✨Add basic modal for HLS staking * ✨UI components for Manage * ✨All Manage actions (except change lev) * 🐛hls intro icons + checkbox, hide repay when no debt, clickable dropdown * fix build * ✨finish all actiosn for HLS staking * 🐛clean up tooltip props * tidy: updated the token logos (#629) * tidy: updated the token logos * feat: added dydx * hotfix: quickfix for Trade * fix: inverted the charts * fix: fixed the chart description * fix: assets * Build(deps): bump @keplr-wallet/cosmos from 0.12.39 to 0.12.42 (#634) Bumps @keplr-wallet/cosmos from 0.12.39 to 0.12.42. --- updated-dependencies: - dependency-name: "@keplr-wallet/cosmos" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Borrow Rate to APY (#632) * fix: changed Borrow Rate to Borrow Rate APY * fix: regarding feedback * Auto repay on trade (#631) * fix: fixed the trading chart load * fix: prevent wrapped checkboxes to be double clicked * fix: refactored funding account modal * fix: fixed modal classes * fix: adjusted width classes * fix: fixed updating states * tidy: format * fix: fixed the slider masks * fix: fixed the slider masks * listed: TIA and USDT * fix: fixed the slider initial position * env: version update * fix: fixed priceFeedIds * Hls latest (#637) * env: enable HLS * feat: added background and orb fading * tidy: updated the token logos (#629) * tidy: updated the token logos * feat: added dydx * fix: increase load spead of trading charts * feat: first version of the UI shift * Deployment for HLS testing * ✨ add APY to HLS staking * ✨ add APY account overview and summary * fix: fixed the intro component visibility * ✨ add warning messages HLS * fix: menu order * ✨ implement live APRs * auto-select first account, add no balance message * enable tabs for hls, fix net APY for deposit * fix button for hls, sorting apy and console warnings * disable feature flag HLS * fix slider * update routing --------- Co-authored-by: Linkie Link <linkielink.dev@gmail.com> * Build(deps): bump postcss from 8.4.23 to 8.4.31 (#624) Bumps [postcss](https://github.com/postcss/postcss) from 8.4.23 to 8.4.31. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.4.23...8.4.31) --- updated-dependencies: - dependency-name: postcss dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump zustand from 4.4.3 to 4.4.6 (#621) Bumps [zustand](https://github.com/pmndrs/zustand) from 4.4.3 to 4.4.6. - [Release notes](https://github.com/pmndrs/zustand/releases) - [Commits](https://github.com/pmndrs/zustand/compare/v4.4.3...v4.4.6) --- updated-dependencies: - dependency-name: zustand dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump @sentry/nextjs from 7.74.0 to 7.77.0 (#625) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.74.0 to 7.77.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.74.0...7.77.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump @types/react-dom from 18.2.13 to 18.2.15 (#633) Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 18.2.13 to 18.2.15. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom) --- updated-dependencies: - dependency-name: "@types/react-dom" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump eslint from 8.51.0 to 8.53.0 (#620) Bumps [eslint](https://github.com/eslint/eslint) from 8.51.0 to 8.53.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.51.0...v8.53.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump eslint-plugin-import from 2.28.1 to 2.29.0 (#617) Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.28.1 to 2.29.0. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.28.1...v2.29.0) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * MP-3564: added navigation dropdown and Governance NavLink (#639) * MP-2887: added ICNS and ICP support (#638) * MP-2887: added ICNS and ICP support : * fix: removed unessecary package * Build(deps): bump recharts from 2.9.0 to 2.10.1 (#640) Bumps [recharts](https://github.com/recharts/recharts) from 2.9.0 to 2.10.1. - [Release notes](https://github.com/recharts/recharts/releases) - [Changelog](https://github.com/recharts/recharts/blob/master/CHANGELOG.md) - [Commits](https://github.com/recharts/recharts/compare/v2.9.0...v2.10.1) --- updated-dependencies: - dependency-name: recharts dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump eslint from 8.53.0 to 8.54.0 (#641) Bumps [eslint](https://github.com/eslint/eslint) from 8.53.0 to 8.54.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.53.0...v8.54.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump @types/react-helmet from 6.1.7 to 6.1.9 (#642) Bumps [@types/react-helmet](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-helmet) from 6.1.7 to 6.1.9. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-helmet) --- updated-dependencies: - dependency-name: "@types/react-helmet" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump @types/lodash.debounce from 4.0.7 to 4.0.9 (#643) Bumps [@types/lodash.debounce](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash.debounce) from 4.0.7 to 4.0.9. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash.debounce) --- updated-dependencies: - dependency-name: "@types/lodash.debounce" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update HC for Margin trade and HLS (#645) * Update HC for Margin trade and HLS * fix relative imports * fix: added clickaway handler and fixed z-index issues (#646) * v2.0.6 and use feature flag for auto repay (#650) * 🐛incorrect deposit cap utilization (#647) * Initialize perps (#648) * setup routing * add basic perps interface * small fix * feat: listed dydx and AKT (#652) * Deposit Cap and Utilization Fix (#654) * fix: fixed the deposit cap and total supplied / utilization rate * fix: fixed build * fix: fixed build * fix: avoid deposit cap usage over 100% * refactor market data apy/ltv * fix: fixed the withdraw from vaults modal * tidy: refactor --------- Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> * stATOM and stOSMO TradingView support (#653) * feat: listed dydx and AKT * fix: removed theGraph support for now * ✨finish adding liquidation price (#649) * ✨finish adding liquidation price * fix minor issues * v2.0.6 and use feature flag for auto repay (#650) * 🐛incorrect deposit cap utilization (#647) * Initialize perps (#648) * setup routing * add basic perps interface * small fix * feat: listed dydx and AKT (#652) * Deposit Cap and Utilization Fix (#654) * fix: fixed the deposit cap and total supplied / utilization rate * fix: fixed build * fix: fixed build * fix: avoid deposit cap usage over 100% * refactor market data apy/ltv * fix: fixed the withdraw from vaults modal * tidy: refactor --------- Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> * stATOM and stOSMO TradingView support (#653) * feat: listed dydx and AKT * fix: removed theGraph support for now * adjust liq price loading and null/0 values --------- Co-authored-by: Linkie Link <linkielink.dev@gmail.com> * Auto Lend Switch (#660) * refactor: moved the autolend logic to the switch * tidy: update default value * adjust logic of auto-lend for switch component --------- Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Linkie Link <linkielink.dev@gmail.com>
This commit is contained in:
parent
b0c9cca51c
commit
9c9aebd2b5
@ -33,4 +33,5 @@ NEXT_PUBLIC_CANDLES_ENDPOINT_PYTH=https://benchmarks.pyth.network
|
|||||||
NEXT_PUBLIC_WALLET_CONNECT_ID=d93fdffb159bae5ec87d8fee4cdbb045
|
NEXT_PUBLIC_WALLET_CONNECT_ID=d93fdffb159bae5ec87d8fee4cdbb045
|
||||||
CHARTING_LIBRARY_REPOSITORY=github.com/tradingview/charting_library
|
CHARTING_LIBRARY_REPOSITORY=github.com/tradingview/charting_library
|
||||||
CHARTING_LIBRARY_ACCESS_TOKEN=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
|
CHARTING_LIBRARY_ACCESS_TOKEN=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
|
||||||
CHARTING_LIBRARY_USERNAME=mars-git-demo
|
CHARTING_LIBRARY_USERNAME=mars-git-demo
|
||||||
|
NEXT_PUBLIC_STRIDE_APRS=https://edge.stride.zone/api/stake-stats
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { fireEvent, render, screen } from '@testing-library/react'
|
import { fireEvent, render } from '@testing-library/react'
|
||||||
import BigNumber from 'bignumber.js'
|
import BigNumber from 'bignumber.js'
|
||||||
|
|
||||||
import TokenInput from 'components/TokenInput'
|
import TokenInput from 'components/TokenInput'
|
||||||
@ -27,59 +27,70 @@ describe('<TokenInput />', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('should render', () => {
|
it('should render', () => {
|
||||||
const { container } = render(<TokenInput {...defaultProps} />)
|
const { container } = render(<TokenInput warningMessages={[]} {...defaultProps} />)
|
||||||
expect(container).toBeInTheDocument()
|
expect(container).toBeInTheDocument()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should handle `className` prop correctly', () => {
|
it('should handle `className` prop correctly', () => {
|
||||||
const testClass = 'test-class'
|
const testClass = 'test-class'
|
||||||
const { getByTestId } = render(<TokenInput {...defaultProps} className={testClass} />)
|
const { getByTestId } = render(
|
||||||
|
<TokenInput warningMessages={[]} {...defaultProps} className={testClass} />,
|
||||||
|
)
|
||||||
expect(getByTestId('token-input-component')).toHaveClass(testClass)
|
expect(getByTestId('token-input-component')).toHaveClass(testClass)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should handle `disabled` prop correctly', () => {
|
it('should handle `disabled` prop correctly', () => {
|
||||||
const { getByTestId } = render(<TokenInput {...defaultProps} disabled={true} />)
|
const { getByTestId } = render(
|
||||||
|
<TokenInput warningMessages={[]} {...defaultProps} disabled={true} />,
|
||||||
|
)
|
||||||
expect(getByTestId('token-input-component')).toHaveClass('pointer-events-none', 'opacity-50')
|
expect(getByTestId('token-input-component')).toHaveClass('pointer-events-none', 'opacity-50')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should handle `maxText` prop correctly', () => {
|
it('should handle `maxText` prop correctly', () => {
|
||||||
const { getByTestId } = render(<TokenInput {...defaultProps} maxText='Max' />)
|
const { getByTestId } = render(
|
||||||
|
<TokenInput warningMessages={[]} {...defaultProps} maxText='Max' />,
|
||||||
|
)
|
||||||
expect(getByTestId('token-input-max-button')).toBeInTheDocument()
|
expect(getByTestId('token-input-max-button')).toBeInTheDocument()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should handle `warning` prop correctly', () => {
|
|
||||||
const { getByTestId } = render(<TokenInput {...defaultProps} warning='Warning' />)
|
|
||||||
expect(getByTestId('token-input-wrapper')).toHaveClass('border-warning')
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('should render the max button', () => {
|
describe('should render the max button', () => {
|
||||||
it('when `maxText` prop is defined', () => {
|
it('when `maxText` prop is defined', () => {
|
||||||
const { getByTestId } = render(<TokenInput {...defaultProps} maxText='Max' />)
|
const { getByTestId } = render(
|
||||||
|
<TokenInput warningMessages={[]} {...defaultProps} maxText='Max' />,
|
||||||
|
)
|
||||||
expect(getByTestId('token-input-max-button')).toBeInTheDocument()
|
expect(getByTestId('token-input-max-button')).toBeInTheDocument()
|
||||||
})
|
})
|
||||||
it('not when `maxText` prop is undefined', () => {
|
it('not when `maxText` prop is undefined', () => {
|
||||||
const { queryByTestId } = render(<TokenInput {...defaultProps} />)
|
const { queryByTestId } = render(<TokenInput warningMessages={[]} {...defaultProps} />)
|
||||||
expect(queryByTestId('token-input-max-button')).not.toBeInTheDocument()
|
expect(queryByTestId('token-input-max-button')).not.toBeInTheDocument()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('should render <Select />', () => {
|
describe('should render <Select />', () => {
|
||||||
it('when `hasSelect` prop is true and balances is defined', () => {
|
it('when `hasSelect` prop is true and balances is defined', () => {
|
||||||
const { getByTestId } = render(<TokenInput {...defaultProps} balances={[]} hasSelect />)
|
const { getByTestId } = render(
|
||||||
|
<TokenInput warningMessages={[]} {...defaultProps} balances={[]} hasSelect />,
|
||||||
|
)
|
||||||
expect(getByTestId('select-component')).toBeInTheDocument()
|
expect(getByTestId('select-component')).toBeInTheDocument()
|
||||||
})
|
})
|
||||||
it('not when `hasSelect` prop is true and balances is not defined', () => {
|
it('not when `hasSelect` prop is true and balances is not defined', () => {
|
||||||
const { queryByTestId } = render(<TokenInput {...defaultProps} hasSelect />)
|
const { queryByTestId } = render(
|
||||||
|
<TokenInput warningMessages={[]} {...defaultProps} hasSelect />,
|
||||||
|
)
|
||||||
expect(queryByTestId('select-component')).not.toBeInTheDocument()
|
expect(queryByTestId('select-component')).not.toBeInTheDocument()
|
||||||
})
|
})
|
||||||
it('not when `hasSelect` prop is false and balances is defined', () => {
|
it('not when `hasSelect` prop is false and balances is defined', () => {
|
||||||
const { queryByTestId } = render(<TokenInput {...defaultProps} balances={[]} />)
|
const { queryByTestId } = render(
|
||||||
|
<TokenInput warningMessages={[]} {...defaultProps} balances={[]} />,
|
||||||
|
)
|
||||||
expect(queryByTestId('select-component')).not.toBeInTheDocument()
|
expect(queryByTestId('select-component')).not.toBeInTheDocument()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should call onMaxBtnClick when the user clicks on max button', () => {
|
it('should call onMaxBtnClick when the user clicks on max button', () => {
|
||||||
const { getByTestId } = render(<TokenInput {...defaultProps} maxText='max' />)
|
const { getByTestId } = render(
|
||||||
|
<TokenInput warningMessages={[]} {...defaultProps} maxText='max' />,
|
||||||
|
)
|
||||||
const maxBtn = getByTestId('token-input-max-button')
|
const maxBtn = getByTestId('token-input-max-button')
|
||||||
fireEvent.click(maxBtn)
|
fireEvent.click(maxBtn)
|
||||||
expect(defaultProps.onChange).toBeCalledWith(defaultProps.max)
|
expect(defaultProps.onChange).toBeCalledWith(defaultProps.max)
|
||||||
|
20
package.json
20
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mars-v2-frontend",
|
"name": "mars-v2-frontend",
|
||||||
"version": "2.0.5",
|
"version": "2.0.6",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "yarn validate-env && next build",
|
"build": "yarn validate-env && next build",
|
||||||
@ -25,14 +25,16 @@
|
|||||||
"@cosmjs/cosmwasm-stargate": "^0.31.1",
|
"@cosmjs/cosmwasm-stargate": "^0.31.1",
|
||||||
"@delphi-labs/shuttle-react": "^3.10.0",
|
"@delphi-labs/shuttle-react": "^3.10.0",
|
||||||
"@keplr-wallet/cosmos": "^0.12.42",
|
"@keplr-wallet/cosmos": "^0.12.42",
|
||||||
"@sentry/nextjs": "^7.74.0",
|
"@sentry/nextjs": "^7.77.0",
|
||||||
"@splinetool/react-spline": "^2.2.6",
|
"@splinetool/react-spline": "^2.2.6",
|
||||||
"@splinetool/runtime": "^0.9.482",
|
"@splinetool/runtime": "^0.9.482",
|
||||||
|
"@tailwindcss/container-queries": "^0.1.1",
|
||||||
"@tanstack/react-table": "^8.10.6",
|
"@tanstack/react-table": "^8.10.6",
|
||||||
"@tippyjs/react": "^4.2.6",
|
"@tippyjs/react": "^4.2.6",
|
||||||
"bignumber.js": "^9.1.2",
|
"bignumber.js": "^9.1.2",
|
||||||
"classnames": "^2.3.2",
|
"classnames": "^2.3.2",
|
||||||
"debounce-promise": "^3.1.2",
|
"debounce-promise": "^3.1.2",
|
||||||
|
"ibc-domains-sdk": "^1.1.0",
|
||||||
"lodash.debounce": "^4.0.8",
|
"lodash.debounce": "^4.0.8",
|
||||||
"lodash.throttle": "^4.1.1",
|
"lodash.throttle": "^4.1.1",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
@ -47,29 +49,29 @@
|
|||||||
"react-spring": "^9.7.3",
|
"react-spring": "^9.7.3",
|
||||||
"react-toastify": "^9.1.3",
|
"react-toastify": "^9.1.3",
|
||||||
"react-use-clipboard": "^1.0.9",
|
"react-use-clipboard": "^1.0.9",
|
||||||
"recharts": "^2.9.0",
|
"recharts": "^2.10.1",
|
||||||
"swr": "^2.2.4",
|
"swr": "^2.2.4",
|
||||||
"tailwind-scrollbar-hide": "^1.1.7",
|
"tailwind-scrollbar-hide": "^1.1.7",
|
||||||
"zustand": "^4.4.3"
|
"zustand": "^4.4.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@svgr/webpack": "^8.1.0",
|
"@svgr/webpack": "^8.1.0",
|
||||||
"@testing-library/jest-dom": "^5.17.0",
|
"@testing-library/jest-dom": "^5.17.0",
|
||||||
"@testing-library/react": "^14.0.0",
|
"@testing-library/react": "^14.0.0",
|
||||||
"@types/debounce-promise": "^3.1.7",
|
"@types/debounce-promise": "^3.1.7",
|
||||||
"@types/lodash.debounce": "^4.0.7",
|
"@types/lodash.debounce": "^4.0.9",
|
||||||
"@types/lodash.throttle": "^4.1.8",
|
"@types/lodash.throttle": "^4.1.8",
|
||||||
"@types/node": "^20.8.6",
|
"@types/node": "^20.8.6",
|
||||||
"@types/react": "18.2.33",
|
"@types/react": "18.2.33",
|
||||||
"@types/react-dom": "18.2.13",
|
"@types/react-dom": "18.2.15",
|
||||||
"@types/react-helmet": "^6.1.7",
|
"@types/react-helmet": "^6.1.9",
|
||||||
"autoprefixer": "^10.4.16",
|
"autoprefixer": "^10.4.16",
|
||||||
"babel-jest": "^29.7.0",
|
"babel-jest": "^29.7.0",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"dotenv-cli": "^7.3.0",
|
"dotenv-cli": "^7.3.0",
|
||||||
"eslint": "^8.51.0",
|
"eslint": "^8.54.0",
|
||||||
"eslint-config-next": "^14.0.0",
|
"eslint-config-next": "^14.0.0",
|
||||||
"eslint-plugin-import": "^2.28.1",
|
"eslint-plugin-import": "^2.29.0",
|
||||||
"husky": "^8.0.3",
|
"husky": "^8.0.3",
|
||||||
"identity-obj-proxy": "^3.0.0",
|
"identity-obj-proxy": "^3.0.0",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
|
BIN
public/images/bg-intro-hls.png
Normal file
BIN
public/images/bg-intro-hls.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
BIN
public/images/bg-intro-hls.webp
Normal file
BIN
public/images/bg-intro-hls.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
@ -60,3 +60,4 @@ export const totalDepositCache: Cache<TotalDepositResponse> = new Map()
|
|||||||
export const allParamsCache: Cache<AssetParamsBaseForAddr[]> = new Map()
|
export const allParamsCache: Cache<AssetParamsBaseForAddr[]> = new Map()
|
||||||
export const underlyingDebtCache: Cache<string> = new Map()
|
export const underlyingDebtCache: Cache<string> = new Map()
|
||||||
export const previewDepositCache: Cache<{ vaultAddress: string; amount: string }> = new Map()
|
export const previewDepositCache: Cache<{ vaultAddress: string; amount: string }> = new Map()
|
||||||
|
export const stakingAprCache: Cache<StakingApr[]> = new Map()
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import { CosmWasmClient } from '@cosmjs/cosmwasm-stargate'
|
import { CosmWasmClient } from '@cosmjs/cosmwasm-stargate'
|
||||||
|
|
||||||
import { ENV } from 'constants/env'
|
import { ENV } from 'constants/env'
|
||||||
|
import { ICNSQueryClient } from 'types/classes/ICNSClient.client'
|
||||||
import { MarsAccountNftQueryClient } from 'types/generated/mars-account-nft/MarsAccountNft.client'
|
import { MarsAccountNftQueryClient } from 'types/generated/mars-account-nft/MarsAccountNft.client'
|
||||||
import { MarsCreditManagerQueryClient } from 'types/generated/mars-credit-manager/MarsCreditManager.client'
|
import { MarsCreditManagerQueryClient } from 'types/generated/mars-credit-manager/MarsCreditManager.client'
|
||||||
import { MarsIncentivesQueryClient } from 'types/generated/mars-incentives/MarsIncentives.client'
|
import { MarsIncentivesQueryClient } from 'types/generated/mars-incentives/MarsIncentives.client'
|
||||||
import { MarsOracleOsmosisQueryClient } from 'types/generated/mars-oracle-osmosis/MarsOracleOsmosis.client'
|
|
||||||
import { MarsRedBankQueryClient } from 'types/generated/mars-red-bank/MarsRedBank.client'
|
|
||||||
import { MarsMockVaultQueryClient } from 'types/generated/mars-mock-vault/MarsMockVault.client'
|
import { MarsMockVaultQueryClient } from 'types/generated/mars-mock-vault/MarsMockVault.client'
|
||||||
|
import { MarsOracleOsmosisQueryClient } from 'types/generated/mars-oracle-osmosis/MarsOracleOsmosis.client'
|
||||||
import { MarsParamsQueryClient } from 'types/generated/mars-params/MarsParams.client'
|
import { MarsParamsQueryClient } from 'types/generated/mars-params/MarsParams.client'
|
||||||
|
import { MarsRedBankQueryClient } from 'types/generated/mars-red-bank/MarsRedBank.client'
|
||||||
import { MarsSwapperOsmosisQueryClient } from 'types/generated/mars-swapper-osmosis/MarsSwapperOsmosis.client'
|
import { MarsSwapperOsmosisQueryClient } from 'types/generated/mars-swapper-osmosis/MarsSwapperOsmosis.client'
|
||||||
|
|
||||||
let _cosmWasmClient: CosmWasmClient
|
let _cosmWasmClient: CosmWasmClient
|
||||||
@ -18,6 +19,7 @@ let _redBankQueryClient: MarsRedBankQueryClient
|
|||||||
let _paramsQueryClient: MarsParamsQueryClient
|
let _paramsQueryClient: MarsParamsQueryClient
|
||||||
let _incentivesQueryClient: MarsIncentivesQueryClient
|
let _incentivesQueryClient: MarsIncentivesQueryClient
|
||||||
let _swapperOsmosisClient: MarsSwapperOsmosisQueryClient
|
let _swapperOsmosisClient: MarsSwapperOsmosisQueryClient
|
||||||
|
let _ICNSQueryClient: ICNSQueryClient
|
||||||
|
|
||||||
const getClient = async () => {
|
const getClient = async () => {
|
||||||
try {
|
try {
|
||||||
@ -134,14 +136,28 @@ const getSwapperQueryClient = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
const getICNSQueryClient = async () => {
|
||||||
getClient,
|
try {
|
||||||
getAccountNftQueryClient,
|
if (!_ICNSQueryClient) {
|
||||||
getCreditManagerQueryClient,
|
const client = await getClient()
|
||||||
getParamsQueryClient,
|
_ICNSQueryClient = new ICNSQueryClient(client)
|
||||||
getOracleQueryClient,
|
}
|
||||||
getRedBankQueryClient,
|
|
||||||
getVaultQueryClient,
|
return _ICNSQueryClient
|
||||||
getIncentivesQueryClient,
|
} catch (error) {
|
||||||
getSwapperQueryClient,
|
throw error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
getAccountNftQueryClient,
|
||||||
|
getClient,
|
||||||
|
getCreditManagerQueryClient,
|
||||||
|
getICNSQueryClient,
|
||||||
|
getIncentivesQueryClient,
|
||||||
|
getOracleQueryClient,
|
||||||
|
getParamsQueryClient,
|
||||||
|
getRedBankQueryClient,
|
||||||
|
getSwapperQueryClient,
|
||||||
|
getVaultQueryClient,
|
||||||
}
|
}
|
||||||
|
22
src/api/hls/getAprs.ts
Normal file
22
src/api/hls/getAprs.ts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import { cacheFn, stakingAprCache } from 'api/cache'
|
||||||
|
import { ENV } from 'constants/env'
|
||||||
|
|
||||||
|
export default async function getStakingAprs() {
|
||||||
|
try {
|
||||||
|
return cacheFn(() => fetchAprs(), stakingAprCache, `stakingAprs`)
|
||||||
|
} catch (error) {
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface StakingAprResponse {
|
||||||
|
stats: StakingApr[]
|
||||||
|
}
|
||||||
|
|
||||||
|
async function fetchAprs(): Promise<StakingApr[]> {
|
||||||
|
const url = ENV.STRIDE_APRS
|
||||||
|
|
||||||
|
const response = await fetch(url)
|
||||||
|
const body = (await response.json()) as StakingAprResponse
|
||||||
|
return body.stats
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
import { getParamsQueryClient } from 'api/cosmwasm-client'
|
import { getParamsQueryClient } from 'api/cosmwasm-client'
|
||||||
|
import getStakingAprs from 'api/hls/getAprs'
|
||||||
import getAssetParams from 'api/params/getAssetParams'
|
import getAssetParams from 'api/params/getAssetParams'
|
||||||
import { getStakingAssets } from 'utils/assets'
|
import { getAssetByDenom, getStakingAssets } from 'utils/assets'
|
||||||
import { BN } from 'utils/helpers'
|
import { BN } from 'utils/helpers'
|
||||||
import { resolveHLSStrategies } from 'utils/resolvers'
|
import { resolveHLSStrategies } from 'utils/resolvers'
|
||||||
|
|
||||||
@ -17,8 +18,11 @@ export default async function getHLSStakingAssets() {
|
|||||||
client.totalDeposit({ denom: strategy.denoms.deposit }),
|
client.totalDeposit({ denom: strategy.denoms.deposit }),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const aprs = await getStakingAprs()
|
||||||
|
|
||||||
return Promise.all(depositCaps$).then((depositCaps) => {
|
return Promise.all(depositCaps$).then((depositCaps) => {
|
||||||
return depositCaps.map((depositCap, index) => {
|
return depositCaps.map((depositCap, index) => {
|
||||||
|
const borrowSymbol = getAssetByDenom(strategies[index].denoms.borrow)?.symbol
|
||||||
return {
|
return {
|
||||||
...strategies[index],
|
...strategies[index],
|
||||||
depositCap: {
|
depositCap: {
|
||||||
@ -26,7 +30,7 @@ export default async function getHLSStakingAssets() {
|
|||||||
used: BN(depositCap.amount),
|
used: BN(depositCap.amount),
|
||||||
max: BN(depositCap.cap),
|
max: BN(depositCap.cap),
|
||||||
},
|
},
|
||||||
apy: 18, // TODO: Actually implement the APY here!
|
apy: (aprs.find((stakingApr) => stakingApr.denom === borrowSymbol)?.strideYield || 0) * 100,
|
||||||
} as HLSStrategy
|
} as HLSStrategy
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import getMarket from 'api/markets/getMarket'
|
|
||||||
import getTotalActiveEmissionValue from 'api/incentives/getTotalActiveEmissionValue'
|
import getTotalActiveEmissionValue from 'api/incentives/getTotalActiveEmissionValue'
|
||||||
|
import getMarket from 'api/markets/getMarket'
|
||||||
import getUnderlyingLiquidityAmount from 'api/markets/getMarketUnderlyingLiquidityAmount'
|
import getUnderlyingLiquidityAmount from 'api/markets/getMarketUnderlyingLiquidityAmount'
|
||||||
import { BN } from 'utils/helpers'
|
|
||||||
import { SECONDS_IN_A_YEAR } from 'utils/constants'
|
|
||||||
import getPrice from 'api/prices/getPrice'
|
import getPrice from 'api/prices/getPrice'
|
||||||
import { ASSETS } from 'constants/assets'
|
import { ASSETS } from 'constants/assets'
|
||||||
import { byDenom } from 'utils/array'
|
import { byDenom } from 'utils/array'
|
||||||
|
import { SECONDS_IN_A_YEAR } from 'utils/constants'
|
||||||
|
import { BN } from 'utils/helpers'
|
||||||
|
|
||||||
export default async function calculateAssetIncentivesApy(
|
export default async function calculateAssetIncentivesApy(
|
||||||
denom: string,
|
denom: string,
|
||||||
@ -29,7 +29,7 @@ export default async function calculateAssetIncentivesApy(
|
|||||||
.shiftedBy(-assetDecimals)
|
.shiftedBy(-assetDecimals)
|
||||||
.multipliedBy(assetPrice)
|
.multipliedBy(assetPrice)
|
||||||
|
|
||||||
const marketReturns = BN(market.liquidityRate).multipliedBy(marketLiquidityValue)
|
const marketReturns = BN(market.apy.deposit).multipliedBy(marketLiquidityValue)
|
||||||
const annualEmission = totalActiveEmissionValue.multipliedBy(SECONDS_IN_A_YEAR)
|
const annualEmission = totalActiveEmissionValue.multipliedBy(SECONDS_IN_A_YEAR)
|
||||||
|
|
||||||
const totalAnnualReturnsValue = annualEmission.plus(marketReturns)
|
const totalAnnualReturnsValue = annualEmission.plus(marketReturns)
|
||||||
|
@ -17,7 +17,7 @@ export default async function getMarketBorrowings(): Promise<BorrowAsset[]> {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
...asset,
|
...asset,
|
||||||
borrowRate: market.borrowRate ?? 0,
|
borrowRate: market.apy.borrow ?? 0,
|
||||||
liquidity: {
|
liquidity: {
|
||||||
amount: BN(amount),
|
amount: BN(amount),
|
||||||
value: BN(amount).multipliedBy(price),
|
value: BN(amount).multipliedBy(price),
|
||||||
|
42
src/api/swap/getPools.ts
Normal file
42
src/api/swap/getPools.ts
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import { ENV } from 'constants/env'
|
||||||
|
|
||||||
|
const url = `${ENV.URL_REST}osmosis/gamm/v1beta1/pools/`
|
||||||
|
export default async function getPools(poolIds: string[]): Promise<Pool[]> {
|
||||||
|
const promises = poolIds.map((poolId) => fetch(url + poolId))
|
||||||
|
|
||||||
|
const responses = await Promise.all(promises)
|
||||||
|
|
||||||
|
return await Promise.all(responses.map(async (pool) => (await pool.json()).pool as Pool))
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Pool {
|
||||||
|
'@type': string
|
||||||
|
address: string
|
||||||
|
future_pool_governor: string
|
||||||
|
id: string
|
||||||
|
pool_assets?: PoolAsset[]
|
||||||
|
pool_liquidity?: PoolLiquidity[]
|
||||||
|
pool_params: PoolParams
|
||||||
|
total_shares: TotalShares
|
||||||
|
total_weight: string
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PoolAsset {
|
||||||
|
token: TotalShares
|
||||||
|
weight: string
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PoolLiquidity {
|
||||||
|
amount: string
|
||||||
|
denom: string
|
||||||
|
}
|
||||||
|
interface TotalShares {
|
||||||
|
amount: string
|
||||||
|
denom: string
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PoolParams {
|
||||||
|
exit_fee: string
|
||||||
|
smooth_weight_change_params: null
|
||||||
|
swap_fee: string
|
||||||
|
}
|
13
src/api/wallets/getICNS.ts
Normal file
13
src/api/wallets/getICNS.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { getICNSQueryClient } from 'api/cosmwasm-client'
|
||||||
|
import { ENV } from 'constants/env'
|
||||||
|
import { ChainInfoID } from 'types/enums/wallet'
|
||||||
|
|
||||||
|
export default async function getICNS(address?: string): Promise<ICNSResult | undefined> {
|
||||||
|
if (!address || ENV.CHAIN_ID !== ChainInfoID.Osmosis1) return
|
||||||
|
try {
|
||||||
|
const icnsQueryClient = await getICNSQueryClient()
|
||||||
|
return icnsQueryClient.primaryName({ address })
|
||||||
|
} catch (ex) {
|
||||||
|
throw ex
|
||||||
|
}
|
||||||
|
}
|
@ -13,7 +13,7 @@ interface Props {
|
|||||||
export default function Apr(props: Props) {
|
export default function Apr(props: Props) {
|
||||||
const { markets, type, denom, apy } = props
|
const { markets, type, denom, apy } = props
|
||||||
|
|
||||||
if (type === 'deposits') return <p className='w-full text-xs text-right number'>–</p>
|
if (apy === 0) return <p className='w-full text-xs text-right number'>–</p>
|
||||||
const isEnabled = markets.find(byDenom(denom))?.borrowEnabled ?? false
|
const isEnabled = markets.find(byDenom(denom))?.borrowEnabled ?? false
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -32,6 +32,7 @@ export default function Size(props: Props) {
|
|||||||
|
|
||||||
const color = getAmountChangeColor(type, amountChange)
|
const color = getAmountChangeColor(type, amountChange)
|
||||||
const className = classNames('text-xs text-right', color)
|
const className = classNames('text-xs text-right', color)
|
||||||
|
const allowZero = !amountChange.isZero()
|
||||||
|
|
||||||
if (size >= 1)
|
if (size >= 1)
|
||||||
return (
|
return (
|
||||||
@ -44,11 +45,12 @@ export default function Size(props: Props) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const formattedAmount = formatAmountToPrecision(size, MAX_AMOUNT_DECIMALS)
|
const formattedAmount = formatAmountToPrecision(size, MAX_AMOUNT_DECIMALS)
|
||||||
const lowAmount = formattedAmount === 0 ? MIN_AMOUNT : Math.max(formattedAmount, MIN_AMOUNT)
|
const minimumAmount = allowZero ? 0 : MIN_AMOUNT
|
||||||
|
const lowAmount = formattedAmount === 0 ? minimumAmount : Math.max(formattedAmount, MIN_AMOUNT)
|
||||||
return (
|
return (
|
||||||
<FormattedNumber
|
<FormattedNumber
|
||||||
className={className}
|
className={className}
|
||||||
smallerThanThreshold={formattedAmount < MIN_AMOUNT}
|
smallerThanThreshold={!allowZero && formattedAmount < MIN_AMOUNT}
|
||||||
amount={lowAmount}
|
amount={lowAmount}
|
||||||
options={{
|
options={{
|
||||||
maxDecimals: MAX_AMOUNT_DECIMALS,
|
maxDecimals: MAX_AMOUNT_DECIMALS,
|
||||||
|
@ -24,12 +24,17 @@ export const valueSortingFn = (a: Row<AccountBalanceRow>, b: Row<AccountBalanceR
|
|||||||
export default function Value(props: Props) {
|
export default function Value(props: Props) {
|
||||||
const { amountChange, type, value } = props
|
const { amountChange, type, value } = props
|
||||||
const color = getAmountChangeColor(type, amountChange)
|
const color = getAmountChangeColor(type, amountChange)
|
||||||
|
const allowZero = !amountChange.isZero()
|
||||||
const coin = new BNCoin({
|
const coin = new BNCoin({
|
||||||
denom: ORACLE_DENOM,
|
denom: ORACLE_DENOM,
|
||||||
amount: value,
|
amount: value,
|
||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DisplayCurrency coin={coin} className={classNames('text-xs text-right', color)} showZero />
|
<DisplayCurrency
|
||||||
|
coin={coin}
|
||||||
|
className={classNames('text-xs text-right', color)}
|
||||||
|
showZero={!allowZero}
|
||||||
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ import { getPage, getRoute } from 'utils/route'
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
account: Account
|
account: Account
|
||||||
|
isHls?: boolean
|
||||||
lendingData: LendingMarketTableData[]
|
lendingData: LendingMarketTableData[]
|
||||||
borrowingData: BorrowMarketTableData[]
|
borrowingData: BorrowMarketTableData[]
|
||||||
hideCard?: boolean
|
hideCard?: boolean
|
||||||
@ -32,6 +33,7 @@ export default function AccountBalancesTable(props: Props) {
|
|||||||
updatedAccount,
|
updatedAccount,
|
||||||
lendingData,
|
lendingData,
|
||||||
borrowingData,
|
borrowingData,
|
||||||
|
isHls: props.isHls,
|
||||||
})
|
})
|
||||||
|
|
||||||
const columns = useAccountBalancesColumns()
|
const columns = useAccountBalancesColumns()
|
||||||
@ -72,13 +74,13 @@ export default function AccountBalancesTable(props: Props) {
|
|||||||
return (
|
return (
|
||||||
<Table
|
<Table
|
||||||
title='Balances'
|
title='Balances'
|
||||||
isBalancesTable={true}
|
|
||||||
columns={columns}
|
columns={columns}
|
||||||
data={accountBalanceData}
|
data={accountBalanceData}
|
||||||
tableBodyClassName={classNames(tableBodyClassName, 'text-white/60')}
|
tableBodyClassName={classNames(tableBodyClassName, 'text-white/60')}
|
||||||
initialSorting={[]}
|
initialSorting={[]}
|
||||||
spacingClassName='p-2'
|
spacingClassName='p-2'
|
||||||
hideCard={hideCard}
|
hideCard={hideCard}
|
||||||
|
isBalancesTable
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -5,13 +5,13 @@ import {
|
|||||||
getVaultAccountBalanceRow,
|
getVaultAccountBalanceRow,
|
||||||
} from 'components/Account/AccountBalancesTable/functions'
|
} from 'components/Account/AccountBalancesTable/functions'
|
||||||
import { ASSETS } from 'constants/assets'
|
import { ASSETS } from 'constants/assets'
|
||||||
|
import useHLSStakingAssets from 'hooks/useHLSStakingAssets'
|
||||||
import usePrices from 'hooks/usePrices'
|
import usePrices from 'hooks/usePrices'
|
||||||
import { byDenom } from 'utils/array'
|
import { byDenom } from 'utils/array'
|
||||||
import { convertLiquidityRateToAPR } from 'utils/formatters'
|
|
||||||
import { convertAprToApy } from 'utils/parsers'
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
account: Account
|
account: Account
|
||||||
|
isHls?: boolean
|
||||||
updatedAccount?: Account
|
updatedAccount?: Account
|
||||||
lendingData: LendingMarketTableData[]
|
lendingData: LendingMarketTableData[]
|
||||||
borrowingData: BorrowMarketTableData[]
|
borrowingData: BorrowMarketTableData[]
|
||||||
@ -20,6 +20,7 @@ interface Props {
|
|||||||
export default function useAccountBalanceData(props: Props) {
|
export default function useAccountBalanceData(props: Props) {
|
||||||
const { account, updatedAccount, lendingData, borrowingData } = props
|
const { account, updatedAccount, lendingData, borrowingData } = props
|
||||||
|
|
||||||
|
const { data: hlsStrategies } = useHLSStakingAssets()
|
||||||
const { data: prices } = usePrices()
|
const { data: prices } = usePrices()
|
||||||
|
|
||||||
return useMemo<AccountBalanceRow[]>(() => {
|
return useMemo<AccountBalanceRow[]>(() => {
|
||||||
@ -33,18 +34,18 @@ export default function useAccountBalanceData(props: Props) {
|
|||||||
accountDeposits.forEach((deposit) => {
|
accountDeposits.forEach((deposit) => {
|
||||||
const asset = ASSETS.find(byDenom(deposit.denom))
|
const asset = ASSETS.find(byDenom(deposit.denom))
|
||||||
if (!asset) return
|
if (!asset) return
|
||||||
const apy = 0
|
const apy = props.isHls
|
||||||
|
? hlsStrategies.find((strategy) => strategy.denoms.deposit === asset.denom)?.apy ?? 0
|
||||||
|
: 0
|
||||||
const prevDeposit = updatedAccount ? account?.deposits.find(byDenom(deposit.denom)) : deposit
|
const prevDeposit = updatedAccount ? account?.deposits.find(byDenom(deposit.denom)) : deposit
|
||||||
deposits.push(getAssetAccountBalanceRow('deposits', asset, prices, deposit, apy, prevDeposit))
|
deposits.push(getAssetAccountBalanceRow('deposits', asset, prices, deposit, apy, prevDeposit))
|
||||||
})
|
})
|
||||||
|
|
||||||
const lends = accountLends.map((lending) => {
|
const lends = accountLends.map((lending) => {
|
||||||
const asset = ASSETS.find(byDenom(lending.denom)) ?? ASSETS[0]
|
const asset = ASSETS.find(byDenom(lending.denom)) ?? ASSETS[0]
|
||||||
const apr = convertLiquidityRateToAPR(
|
const apy =
|
||||||
lendingData.find((market) => market.asset.denom === lending.denom)?.marketLiquidityRate ??
|
lendingData.find((market) => market.asset.denom === lending.denom)?.apy.deposit ?? 0
|
||||||
0,
|
|
||||||
)
|
|
||||||
const apy = convertAprToApy(apr, 365)
|
|
||||||
const prevLending = updatedAccount
|
const prevLending = updatedAccount
|
||||||
? account?.lends.find((position) => position.denom === lending.denom)
|
? account?.lends.find((position) => position.denom === lending.denom)
|
||||||
: lending
|
: lending
|
||||||
@ -61,12 +62,12 @@ export default function useAccountBalanceData(props: Props) {
|
|||||||
|
|
||||||
const debts = accountDebts.map((debt) => {
|
const debts = accountDebts.map((debt) => {
|
||||||
const asset = ASSETS.find(byDenom(debt.denom)) ?? ASSETS[0]
|
const asset = ASSETS.find(byDenom(debt.denom)) ?? ASSETS[0]
|
||||||
const apy = borrowingData.find((market) => market.asset.denom === debt.denom)?.borrowRate ?? 0
|
const apy = borrowingData.find((market) => market.asset.denom === debt.denom)?.apy.borrow ?? 0
|
||||||
const prevDebt = updatedAccount
|
const prevDebt = updatedAccount
|
||||||
? account?.debts.find((position) => position.denom === debt.denom)
|
? account?.debts.find((position) => position.denom === debt.denom)
|
||||||
: debt
|
: debt
|
||||||
return getAssetAccountBalanceRow('borrowing', asset, prices, debt, apy, prevDebt)
|
return getAssetAccountBalanceRow('borrowing', asset, prices, debt, apy, prevDebt)
|
||||||
})
|
})
|
||||||
return [...deposits, ...lends, ...vaults, ...debts]
|
return [...deposits, ...lends, ...vaults, ...debts]
|
||||||
}, [prices, account, updatedAccount, borrowingData, lendingData])
|
}, [updatedAccount, account, props.isHls, hlsStrategies, prices, lendingData, borrowingData])
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import Text from 'components/Text'
|
|||||||
import { BN_ZERO, MAX_AMOUNT_DECIMALS } from 'constants/math'
|
import { BN_ZERO, MAX_AMOUNT_DECIMALS } from 'constants/math'
|
||||||
import { ORACLE_DENOM } from 'constants/oracle'
|
import { ORACLE_DENOM } from 'constants/oracle'
|
||||||
import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData'
|
import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData'
|
||||||
|
import useHLSStakingAssets from 'hooks/useHLSStakingAssets'
|
||||||
import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData'
|
import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData'
|
||||||
import usePrices from 'hooks/usePrices'
|
import usePrices from 'hooks/usePrices'
|
||||||
import useStore from 'store'
|
import useStore from 'store'
|
||||||
@ -21,6 +22,7 @@ import {
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
account: Account
|
account: Account
|
||||||
|
isHls?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ItemProps {
|
interface ItemProps {
|
||||||
@ -37,6 +39,7 @@ export default function AccountComposition(props: Props) {
|
|||||||
const { account } = props
|
const { account } = props
|
||||||
const hasChanged = !!updatedAccount
|
const hasChanged = !!updatedAccount
|
||||||
const { data: prices } = usePrices()
|
const { data: prices } = usePrices()
|
||||||
|
const { data: hlsStrategies } = useHLSStakingAssets()
|
||||||
const { data } = useBorrowMarketAssetsTableData(false)
|
const { data } = useBorrowMarketAssetsTableData(false)
|
||||||
const borrowAssetsData = useMemo(() => data?.allAssets || [], [data])
|
const borrowAssetsData = useMemo(() => data?.allAssets || [], [data])
|
||||||
const { availableAssets: lendingAvailableAssets, accountLentAssets } =
|
const { availableAssets: lendingAvailableAssets, accountLentAssets } =
|
||||||
@ -72,15 +75,30 @@ export default function AccountComposition(props: Props) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const apr = useMemo(
|
const apr = useMemo(
|
||||||
() => calculateAccountApr(account, borrowAssetsData, lendingAssetsData, prices),
|
() =>
|
||||||
[account, borrowAssetsData, lendingAssetsData, prices],
|
calculateAccountApr(
|
||||||
|
account,
|
||||||
|
borrowAssetsData,
|
||||||
|
lendingAssetsData,
|
||||||
|
prices,
|
||||||
|
hlsStrategies,
|
||||||
|
props.isHls,
|
||||||
|
),
|
||||||
|
[account, borrowAssetsData, hlsStrategies, lendingAssetsData, prices, props.isHls],
|
||||||
)
|
)
|
||||||
const updatedApr = useMemo(
|
const updatedApr = useMemo(
|
||||||
() =>
|
() =>
|
||||||
updatedAccount
|
updatedAccount
|
||||||
? calculateAccountApr(updatedAccount, borrowAssetsData, lendingAssetsData, prices)
|
? calculateAccountApr(
|
||||||
|
updatedAccount,
|
||||||
|
borrowAssetsData,
|
||||||
|
lendingAssetsData,
|
||||||
|
prices,
|
||||||
|
hlsStrategies,
|
||||||
|
props.isHls,
|
||||||
|
)
|
||||||
: BN_ZERO,
|
: BN_ZERO,
|
||||||
[updatedAccount, borrowAssetsData, lendingAssetsData, prices],
|
[updatedAccount, borrowAssetsData, lendingAssetsData, prices, hlsStrategies, props.isHls],
|
||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -23,6 +23,7 @@ import useAccounts from 'hooks/useAccounts'
|
|||||||
import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData'
|
import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData'
|
||||||
import useCurrentAccount from 'hooks/useCurrentAccount'
|
import useCurrentAccount from 'hooks/useCurrentAccount'
|
||||||
import useHealthComputer from 'hooks/useHealthComputer'
|
import useHealthComputer from 'hooks/useHealthComputer'
|
||||||
|
import useHLSStakingAssets from 'hooks/useHLSStakingAssets'
|
||||||
import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData'
|
import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData'
|
||||||
import useLocalStorage from 'hooks/useLocalStorage'
|
import useLocalStorage from 'hooks/useLocalStorage'
|
||||||
import usePrices from 'hooks/usePrices'
|
import usePrices from 'hooks/usePrices'
|
||||||
@ -36,14 +37,16 @@ import {
|
|||||||
|
|
||||||
export default function AccountDetailsController() {
|
export default function AccountDetailsController() {
|
||||||
const address = useStore((s) => s.address)
|
const address = useStore((s) => s.address)
|
||||||
|
const isHLS = useStore((s) => s.isHLS)
|
||||||
const { data: accounts, isLoading } = useAccounts('default', address)
|
const { data: accounts, isLoading } = useAccounts('default', address)
|
||||||
const { data: accountIds } = useAccountIds(address, false)
|
const { data: accountIds } = useAccountIds(address, false)
|
||||||
const accountId = useAccountId()
|
const accountId = useAccountId()
|
||||||
|
|
||||||
const account = useCurrentAccount()
|
const account = useCurrentAccount()
|
||||||
const focusComponent = useStore((s) => s.focusComponent)
|
const focusComponent = useStore((s) => s.focusComponent)
|
||||||
const isOwnAccount = accountId && accountIds?.includes(accountId)
|
const isOwnAccount = accountId && accountIds?.includes(accountId)
|
||||||
|
|
||||||
if (!address || focusComponent || !isOwnAccount) return null
|
if (!address || focusComponent || !isOwnAccount || isHLS) return null
|
||||||
|
|
||||||
if ((isLoading && accountId && !focusComponent) || !account) return <Skeleton />
|
if ((isLoading && accountId && !focusComponent) || !account) return <Skeleton />
|
||||||
|
|
||||||
@ -57,6 +60,7 @@ interface Props {
|
|||||||
function AccountDetails(props: Props) {
|
function AccountDetails(props: Props) {
|
||||||
const { account } = props
|
const { account } = props
|
||||||
const location = useLocation()
|
const location = useLocation()
|
||||||
|
const { data: hlsStrategies } = useHLSStakingAssets()
|
||||||
const [reduceMotion] = useLocalStorage<boolean>(
|
const [reduceMotion] = useLocalStorage<boolean>(
|
||||||
LocalStorageKeys.REDUCE_MOTION,
|
LocalStorageKeys.REDUCE_MOTION,
|
||||||
DEFAULT_SETTINGS.reduceMotion,
|
DEFAULT_SETTINGS.reduceMotion,
|
||||||
@ -94,8 +98,15 @@ function AccountDetails(props: Props) {
|
|||||||
)
|
)
|
||||||
const apr = useMemo(
|
const apr = useMemo(
|
||||||
() =>
|
() =>
|
||||||
calculateAccountApr(updatedAccount ?? account, borrowAssetsData, lendingAssetsData, prices),
|
calculateAccountApr(
|
||||||
[account, borrowAssetsData, lendingAssetsData, prices, updatedAccount],
|
updatedAccount ?? account,
|
||||||
|
borrowAssetsData,
|
||||||
|
lendingAssetsData,
|
||||||
|
prices,
|
||||||
|
hlsStrategies,
|
||||||
|
account.kind === 'high_levered_strategy',
|
||||||
|
),
|
||||||
|
[account, borrowAssetsData, hlsStrategies, lendingAssetsData, prices, updatedAccount],
|
||||||
)
|
)
|
||||||
const isFullWidth = location.pathname.includes('trade') || location.pathname === '/'
|
const isFullWidth = location.pathname.includes('trade') || location.pathname === '/'
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ import WalletBridges from 'components/Wallet/WalletBridges'
|
|||||||
import { DEFAULT_SETTINGS } from 'constants/defaultSettings'
|
import { DEFAULT_SETTINGS } from 'constants/defaultSettings'
|
||||||
import { LocalStorageKeys } from 'constants/localStorageKeys'
|
import { LocalStorageKeys } from 'constants/localStorageKeys'
|
||||||
import { BN_ZERO } from 'constants/math'
|
import { BN_ZERO } from 'constants/math'
|
||||||
import useAutoLend from 'hooks/useAutoLend'
|
|
||||||
import useLocalStorage from 'hooks/useLocalStorage'
|
import useLocalStorage from 'hooks/useLocalStorage'
|
||||||
import useMarketAssets from 'hooks/useMarketAssets'
|
import useMarketAssets from 'hooks/useMarketAssets'
|
||||||
import useToggle from 'hooks/useToggle'
|
import useToggle from 'hooks/useToggle'
|
||||||
@ -34,20 +33,17 @@ interface Props {
|
|||||||
|
|
||||||
export default function AccountFundContent(props: Props) {
|
export default function AccountFundContent(props: Props) {
|
||||||
const deposit = useStore((s) => s.deposit)
|
const deposit = useStore((s) => s.deposit)
|
||||||
const accounts = useStore((s) => s.accounts)
|
|
||||||
const walletAssetModal = useStore((s) => s.walletAssetsModal)
|
const walletAssetModal = useStore((s) => s.walletAssetsModal)
|
||||||
const [isConfirming, setIsConfirming] = useState(false)
|
const [isConfirming, setIsConfirming] = useState(false)
|
||||||
const [lendAssets, setLendAssets] = useLocalStorage<boolean>(
|
const [lendAssets] = useLocalStorage<boolean>(
|
||||||
LocalStorageKeys.LEND_ASSETS,
|
LocalStorageKeys.LEND_ASSETS,
|
||||||
DEFAULT_SETTINGS.lendAssets,
|
DEFAULT_SETTINGS.lendAssets,
|
||||||
)
|
)
|
||||||
const [fundingAssets, setFundingAssets] = useState<BNCoin[]>([])
|
const [fundingAssets, setFundingAssets] = useState<BNCoin[]>([])
|
||||||
const { data: marketAssets } = useMarketAssets()
|
const { data: marketAssets } = useMarketAssets()
|
||||||
const { data: walletBalances } = useWalletBalances(props.address)
|
const { data: walletBalances } = useWalletBalances(props.address)
|
||||||
const { autoLendEnabledAccountIds } = useAutoLend()
|
|
||||||
const [isLending, toggleIsLending] = useToggle(lendAssets)
|
const [isLending, toggleIsLending] = useToggle(lendAssets)
|
||||||
const { simulateDeposits } = useUpdatedAccount(props.account)
|
const { simulateDeposits } = useUpdatedAccount(props.account)
|
||||||
const autoLendEnabled = autoLendEnabledAccountIds.includes(props.accountId)
|
|
||||||
const baseAsset = getBaseAsset()
|
const baseAsset = getBaseAsset()
|
||||||
|
|
||||||
const hasAssetSelected = fundingAssets.length > 0
|
const hasAssetSelected = fundingAssets.length > 0
|
||||||
@ -134,14 +130,6 @@ export default function AccountFundContent(props: Props) {
|
|||||||
})
|
})
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
toggleIsLending(autoLendEnabled)
|
|
||||||
}, [autoLendEnabled, toggleIsLending])
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (accounts?.length === 1 && isLending) setLendAssets(true)
|
|
||||||
}, [isLending, accounts, lendAssets, setLendAssets])
|
|
||||||
|
|
||||||
const depositCapReachedCoins = useMemo(() => {
|
const depositCapReachedCoins = useMemo(() => {
|
||||||
const depositCapReachedCoins: BNCoin[] = []
|
const depositCapReachedCoins: BNCoin[] = []
|
||||||
fundingAssets.forEach((asset) => {
|
fundingAssets.forEach((asset) => {
|
||||||
@ -181,6 +169,7 @@ export default function AccountFundContent(props: Props) {
|
|||||||
balances={balances}
|
balances={balances}
|
||||||
maxText='Max'
|
maxText='Max'
|
||||||
disabled={isConfirming}
|
disabled={isConfirming}
|
||||||
|
warningMessages={[]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
@ -204,8 +193,6 @@ export default function AccountFundContent(props: Props) {
|
|||||||
<SwitchAutoLend
|
<SwitchAutoLend
|
||||||
className='pt-4 mt-4 border border-transparent border-t-white/10'
|
className='pt-4 mt-4 border border-transparent border-t-white/10'
|
||||||
accountId={props.accountId}
|
accountId={props.accountId}
|
||||||
value={!props.isFullPage ? isLending : undefined}
|
|
||||||
onChange={!props.isFullPage ? toggleIsLending : undefined}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
|
@ -8,6 +8,7 @@ import SwitchAutoLend from 'components/Switch/SwitchAutoLend'
|
|||||||
import useAccount from 'hooks/useAccount'
|
import useAccount from 'hooks/useAccount'
|
||||||
import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData'
|
import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData'
|
||||||
import useHealthComputer from 'hooks/useHealthComputer'
|
import useHealthComputer from 'hooks/useHealthComputer'
|
||||||
|
import useHLSStakingAssets from 'hooks/useHLSStakingAssets'
|
||||||
import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData'
|
import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData'
|
||||||
import usePrices from 'hooks/usePrices'
|
import usePrices from 'hooks/usePrices'
|
||||||
import useStore from 'store'
|
import useStore from 'store'
|
||||||
@ -23,6 +24,8 @@ export default function AccountStats(props: Props) {
|
|||||||
const { accountId, isActive, setShowMenu } = props
|
const { accountId, isActive, setShowMenu } = props
|
||||||
const { data: account } = useAccount(accountId)
|
const { data: account } = useAccount(accountId)
|
||||||
const { data: prices } = usePrices()
|
const { data: prices } = usePrices()
|
||||||
|
const { data: hlsStrategies } = useHLSStakingAssets()
|
||||||
|
|
||||||
const positionBalance = useMemo(
|
const positionBalance = useMemo(
|
||||||
() => (!account ? null : calculateAccountBalanceValue(account, prices)),
|
() => (!account ? null : calculateAccountBalanceValue(account, prices)),
|
||||||
[account, prices],
|
[account, prices],
|
||||||
@ -38,8 +41,17 @@ export default function AccountStats(props: Props) {
|
|||||||
)
|
)
|
||||||
const apr = useMemo(
|
const apr = useMemo(
|
||||||
() =>
|
() =>
|
||||||
!account ? null : calculateAccountApr(account, borrowAssetsData, lendingAssetsData, prices),
|
!account
|
||||||
[account, borrowAssetsData, lendingAssetsData, prices],
|
? null
|
||||||
|
: calculateAccountApr(
|
||||||
|
account,
|
||||||
|
borrowAssetsData,
|
||||||
|
lendingAssetsData,
|
||||||
|
prices,
|
||||||
|
hlsStrategies,
|
||||||
|
account.kind === 'high_levered_strategy',
|
||||||
|
),
|
||||||
|
[account, borrowAssetsData, hlsStrategies, lendingAssetsData, prices],
|
||||||
)
|
)
|
||||||
|
|
||||||
const deleteAccountHandler = useCallback(() => {
|
const deleteAccountHandler = useCallback(() => {
|
||||||
|
@ -27,7 +27,7 @@ export default function AccountList(props: Props) {
|
|||||||
const { pathname } = useLocation()
|
const { pathname } = useLocation()
|
||||||
const currentAccountId = useAccountId()
|
const currentAccountId = useAccountId()
|
||||||
const address = useStore((s) => s.address)
|
const address = useStore((s) => s.address)
|
||||||
const { data: accountIds } = useAccountIds(address)
|
const { data: accountIds } = useAccountIds(address, true, true)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!currentAccountId) return
|
if (!currentAccountId) return
|
||||||
|
@ -25,6 +25,7 @@ import { calculateAccountBalanceValue, calculateAccountLeverage } from 'utils/ac
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
account: Account
|
account: Account
|
||||||
|
isHls?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function AccountSummary(props: Props) {
|
export default function AccountSummary(props: Props) {
|
||||||
@ -124,7 +125,9 @@ export default function AccountSummary(props: Props) {
|
|||||||
{
|
{
|
||||||
title: `Credit Account ${props.account.id} Composition`,
|
title: `Credit Account ${props.account.id} Composition`,
|
||||||
renderContent: () =>
|
renderContent: () =>
|
||||||
props.account ? <AccountComposition account={props.account} /> : null,
|
props.account ? (
|
||||||
|
<AccountComposition account={props.account} isHls={props.isHls} />
|
||||||
|
) : null,
|
||||||
isOpen: accountSummaryTabs[0],
|
isOpen: accountSummaryTabs[0],
|
||||||
toggleOpen: (index: number) => handleToggle(index),
|
toggleOpen: (index: number) => handleToggle(index),
|
||||||
renderSubTitle: () => <></>,
|
renderSubTitle: () => <></>,
|
||||||
@ -138,6 +141,7 @@ export default function AccountSummary(props: Props) {
|
|||||||
borrowingData={borrowAssetsData}
|
borrowingData={borrowAssetsData}
|
||||||
lendingData={lendingAssetsData}
|
lendingData={lendingAssetsData}
|
||||||
hideCard
|
hideCard
|
||||||
|
isHls={props.isHls}
|
||||||
/>
|
/>
|
||||||
) : null,
|
) : null,
|
||||||
isOpen: accountSummaryTabs[1],
|
isOpen: accountSummaryTabs[1],
|
||||||
|
@ -1,17 +1,36 @@
|
|||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
|
import { useLocation } from 'react-router-dom'
|
||||||
|
import { useEffect, useMemo } from 'react'
|
||||||
|
|
||||||
import { DEFAULT_SETTINGS } from 'constants/defaultSettings'
|
import { DEFAULT_SETTINGS } from 'constants/defaultSettings'
|
||||||
import { LocalStorageKeys } from 'constants/localStorageKeys'
|
import { LocalStorageKeys } from 'constants/localStorageKeys'
|
||||||
import useLocalStorage from 'hooks/useLocalStorage'
|
import useLocalStorage from 'hooks/useLocalStorage'
|
||||||
|
import useStore from 'store'
|
||||||
|
import { getPage } from 'utils/route'
|
||||||
|
|
||||||
export default function Background() {
|
export default function Background() {
|
||||||
const [reduceMotion] = useLocalStorage<boolean>(
|
const [reduceMotion] = useLocalStorage<boolean>(
|
||||||
LocalStorageKeys.REDUCE_MOTION,
|
LocalStorageKeys.REDUCE_MOTION,
|
||||||
DEFAULT_SETTINGS.reduceMotion,
|
DEFAULT_SETTINGS.reduceMotion,
|
||||||
)
|
)
|
||||||
|
const { pathname } = useLocation()
|
||||||
|
const page = getPage(pathname)
|
||||||
|
const isHLS = useMemo(() => page.split('-')[0] === 'hls', [page])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
useStore.setState({ isHLS })
|
||||||
|
}, [isHLS])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='background pointer-events-none fixed inset-0 h-full w-full overflow-hidden bg-body'>
|
<div
|
||||||
|
className={classNames(
|
||||||
|
'fixed inset-0',
|
||||||
|
'w-full h-full',
|
||||||
|
'overflow-hidden pointer-events-none background ',
|
||||||
|
isHLS ? 'bg-body-hls' : 'bg-body',
|
||||||
|
!reduceMotion && 'transition-bg duration-1000 delay-300',
|
||||||
|
)}
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
'fixed',
|
'fixed',
|
||||||
@ -19,9 +38,11 @@ export default function Background() {
|
|||||||
'min-h-[150px] min-w-[150px]',
|
'min-h-[150px] min-w-[150px]',
|
||||||
'max-h-[500px] max-w-[500px]',
|
'max-h-[500px] max-w-[500px]',
|
||||||
'left-[-10vw] top-[-10vw]',
|
'left-[-10vw] top-[-10vw]',
|
||||||
'bg-orb-primary blur-orb-primary ',
|
'blur-orb-primary',
|
||||||
|
isHLS ? ' bg-orb-primary-hls' : 'bg-orb-primary',
|
||||||
'translate-x-0 translate-y-0 rounded-full opacity-20',
|
'translate-x-0 translate-y-0 rounded-full opacity-20',
|
||||||
!reduceMotion && 'animate-[float_120s_ease-in-out_infinite_2s]',
|
!reduceMotion && 'animate-[float_120s_ease-in-out_infinite_2s]',
|
||||||
|
!reduceMotion && 'transition-bg duration-1000 delay-300',
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
@ -30,10 +51,11 @@ export default function Background() {
|
|||||||
'h-[40vw] w-[40vw]',
|
'h-[40vw] w-[40vw]',
|
||||||
'min-h-[400px] min-w-[400px]',
|
'min-h-[400px] min-w-[400px]',
|
||||||
'max-h-[1000px] max-w-[1000px]',
|
'max-h-[1000px] max-w-[1000px]',
|
||||||
'bottom-[-10vw] right-[-8vw]',
|
'bottom-[-20vw] right-[-10vw]',
|
||||||
'bg-orb-secondary blur-orb-secondary',
|
'blur-orb-secondary',
|
||||||
|
isHLS ? ' bg-orb-secondary-hls' : 'bg-orb-secondary',
|
||||||
'translate-x-0 translate-y-0 rounded-full opacity-30',
|
'translate-x-0 translate-y-0 rounded-full opacity-30',
|
||||||
!reduceMotion && 'animate-[float_150s_ease-in-out_infinite_1s]',
|
!reduceMotion && 'transition-bg duration-1000 delay-300',
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
@ -43,9 +65,11 @@ export default function Background() {
|
|||||||
'min-h-[120px] min-w-[120px]',
|
'min-h-[120px] min-w-[120px]',
|
||||||
'max-h-[600px] max-w-[600px]',
|
'max-h-[600px] max-w-[600px]',
|
||||||
'right-[-4vw] top-[-10vw]',
|
'right-[-4vw] top-[-10vw]',
|
||||||
'bg-orb-tertiary blur-orb-tertiary ',
|
'blur-orb-tertiary ',
|
||||||
|
isHLS ? ' bg-orb-tertiary-hls' : 'bg-orb-tertiary',
|
||||||
'translate-x-0 translate-y-0 rounded-full opacity-20',
|
'translate-x-0 translate-y-0 rounded-full opacity-20',
|
||||||
!reduceMotion && 'animate-[float_180s_ease-in_infinite]',
|
!reduceMotion && 'animate-[float_180s_ease-in_infinite]',
|
||||||
|
!reduceMotion && 'transition-bg duration-1000 delay-300',
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
|
|
||||||
import AvailableBorrowingsTable from 'components/Borrow/Table/AvailableBorrowingsTable'
|
import AvailableBorrowingsTable from 'components/Borrow/Table/AvailableBorrowingsTable'
|
||||||
import DepositedBorrowingsTable from 'components/Borrow/Table/DepositedBorrowingsTable'
|
import DepositedBorrowingsTable from 'components/Borrow/Table/DepositedBorrowingsTable'
|
||||||
import { BN_ZERO } from 'constants/math'
|
import { BN_ZERO } from 'constants/math'
|
||||||
@ -24,13 +22,18 @@ function Fallback() {
|
|||||||
const assets = getBorrowEnabledAssets()
|
const assets = getBorrowEnabledAssets()
|
||||||
const data: BorrowMarketTableData[] = assets.map((asset) => ({
|
const data: BorrowMarketTableData[] = assets.map((asset) => ({
|
||||||
asset,
|
asset,
|
||||||
borrowRate: null,
|
apy: {
|
||||||
|
borrow: 0,
|
||||||
|
deposit: 0,
|
||||||
|
},
|
||||||
|
ltv: {
|
||||||
|
max: 0,
|
||||||
|
liq: 0,
|
||||||
|
},
|
||||||
liquidity: null,
|
liquidity: null,
|
||||||
marketMaxLtv: 0,
|
|
||||||
marketDepositAmount: BN_ZERO,
|
marketDepositAmount: BN_ZERO,
|
||||||
marketLiquidityRate: 0,
|
marketLiquidityRate: 0,
|
||||||
marketLiquidityAmount: BN_ZERO,
|
marketLiquidityAmount: BN_ZERO,
|
||||||
marketLiquidationThreshold: 0,
|
|
||||||
}))
|
}))
|
||||||
|
|
||||||
return <AvailableBorrowingsTable data={data} isLoading />
|
return <AvailableBorrowingsTable data={data} isLoading />
|
||||||
|
@ -18,7 +18,7 @@ export default function useAvailableColumns() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
...BORROW_RATE_META,
|
...BORROW_RATE_META,
|
||||||
cell: ({ row }) => <BorrowRate borrowRate={row.original.borrowRate} />,
|
cell: ({ row }) => <BorrowRate borrowRate={row.original.apy.borrow} />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...LIQUIDITY_META,
|
...LIQUIDITY_META,
|
||||||
|
@ -24,7 +24,7 @@ export default function useDepositedColumns() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
...BORROW_RATE_META,
|
...BORROW_RATE_META,
|
||||||
cell: ({ row }) => <BorrowRate borrowRate={row.original.borrowRate} />,
|
cell: ({ row }) => <BorrowRate borrowRate={row.original.apy.borrow} />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...LIQUIDITY_META,
|
...LIQUIDITY_META,
|
||||||
|
@ -12,7 +12,7 @@ export default function DepositCapCell(props: Props) {
|
|||||||
.dividedBy(props.depositCap.max.multipliedBy(VAULT_DEPOSIT_BUFFER))
|
.dividedBy(props.depositCap.max.multipliedBy(VAULT_DEPOSIT_BUFFER))
|
||||||
.multipliedBy(100)
|
.multipliedBy(100)
|
||||||
.integerValue()
|
.integerValue()
|
||||||
|
const depositCapUsed = Math.min(percent.toNumber(), 100)
|
||||||
const decimals = getAssetByDenom(props.depositCap.denom)?.decimals ?? 6
|
const decimals = getAssetByDenom(props.depositCap.denom)?.decimals ?? 6
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -27,7 +27,7 @@ export default function DepositCapCell(props: Props) {
|
|||||||
}
|
}
|
||||||
sub={
|
sub={
|
||||||
<FormattedNumber
|
<FormattedNumber
|
||||||
amount={percent.toNumber()}
|
amount={depositCapUsed}
|
||||||
options={{ minDecimals: 2, maxDecimals: 2, suffix: '% Filled' }}
|
options={{ minDecimals: 2, maxDecimals: 2, suffix: '% Filled' }}
|
||||||
className='text-xs'
|
className='text-xs'
|
||||||
animate
|
animate
|
||||||
|
@ -7,7 +7,7 @@ interface Props {
|
|||||||
|
|
||||||
export default function Divider(props: Props) {
|
export default function Divider(props: Props) {
|
||||||
if (props.orientation === 'vertical') {
|
if (props.orientation === 'vertical') {
|
||||||
return <div className={classNames('h-full w-[1px] bg-white/10', props.className)}></div>
|
return <div className={classNames(props.className, 'h-full w-[1px] bg-white/10')}></div>
|
||||||
}
|
}
|
||||||
return <div className={classNames('h-[1px] w-full bg-white/10', props.className)}></div>
|
return <div className={classNames('h-[1px] w-full bg-white/10', props.className)}></div>
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
|
|
||||||
import AvailableLendsTable from 'components/Earn/Lend/Table/AvailableLendsTable'
|
import AvailableLendsTable from 'components/Earn/Lend/Table/AvailableLendsTable'
|
||||||
import DepositedLendsTable from 'components/Earn/Lend/Table/DepositedLendsTable'
|
import DepositedLendsTable from 'components/Earn/Lend/Table/DepositedLendsTable'
|
||||||
import { BN_ZERO } from 'constants/math'
|
import { BN_ZERO } from 'constants/math'
|
||||||
@ -26,11 +24,21 @@ function Fallback() {
|
|||||||
asset,
|
asset,
|
||||||
marketDepositCap: BN_ZERO,
|
marketDepositCap: BN_ZERO,
|
||||||
borrowEnabled: false,
|
borrowEnabled: false,
|
||||||
marketMaxLtv: 0,
|
|
||||||
marketDepositAmount: BN_ZERO,
|
marketDepositAmount: BN_ZERO,
|
||||||
marketLiquidityRate: 0,
|
|
||||||
marketLiquidityAmount: BN_ZERO,
|
marketLiquidityAmount: BN_ZERO,
|
||||||
marketLiquidationThreshold: 0,
|
cap: {
|
||||||
|
max: BN_ZERO,
|
||||||
|
used: BN_ZERO,
|
||||||
|
denom: asset.denom,
|
||||||
|
},
|
||||||
|
apy: {
|
||||||
|
borrow: 0,
|
||||||
|
deposit: 0,
|
||||||
|
},
|
||||||
|
ltv: {
|
||||||
|
max: 0,
|
||||||
|
liq: 0,
|
||||||
|
},
|
||||||
}))
|
}))
|
||||||
|
|
||||||
return <AvailableLendsTable data={data} isLoading />
|
return <AvailableLendsTable data={data} isLoading />
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import AssetRate from 'components/Asset/AssetRate'
|
import AssetRate from 'components/Asset/AssetRate'
|
||||||
import Loading from 'components/Loading'
|
import Loading from 'components/Loading'
|
||||||
import { convertAprToApy } from 'utils/parsers'
|
|
||||||
|
|
||||||
export const APY_META = { accessorKey: 'marketLiquidityRate', header: 'APY' }
|
export const APY_META = { accessorKey: 'apy.deposit', header: 'APY' }
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
marketLiquidityRate: number
|
apy: number
|
||||||
borrowEnabled: boolean
|
borrowEnabled: boolean
|
||||||
isLoading: boolean
|
isLoading: boolean
|
||||||
}
|
}
|
||||||
@ -14,7 +13,7 @@ export default function Apr(props: Props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<AssetRate
|
<AssetRate
|
||||||
rate={convertAprToApy(props.marketLiquidityRate ?? 0, 365)}
|
rate={props.apy ?? 0}
|
||||||
isEnabled={props.borrowEnabled}
|
isEnabled={props.borrowEnabled}
|
||||||
className='justify-end text-xs'
|
className='justify-end text-xs'
|
||||||
type='apy'
|
type='apy'
|
||||||
|
@ -17,10 +17,10 @@ export const marketDepositCapSortingFn = (
|
|||||||
): number => {
|
): number => {
|
||||||
const assetA = a.original.asset
|
const assetA = a.original.asset
|
||||||
const assetB = b.original.asset
|
const assetB = b.original.asset
|
||||||
if (!a.original.marketDepositCap || !b.original.marketDepositCap) return 0
|
if (!a.original.cap.max || !b.original.cap.max) return 0
|
||||||
|
|
||||||
const marketDepositCapA = demagnify(a.original.marketDepositCap, assetA)
|
const marketDepositCapA = demagnify(a.original.cap.max, assetA)
|
||||||
const marketDepositCapB = demagnify(b.original.marketDepositCap, assetB)
|
const marketDepositCapB = demagnify(b.original.cap.max, assetB)
|
||||||
return marketDepositCapA - marketDepositCapB
|
return marketDepositCapA - marketDepositCapB
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,22 +30,23 @@ interface Props {
|
|||||||
}
|
}
|
||||||
export default function DepositCap(props: Props) {
|
export default function DepositCap(props: Props) {
|
||||||
if (props.isLoading) return <Loading />
|
if (props.isLoading) return <Loading />
|
||||||
const { marketDepositCap, marketDepositAmount, asset } = props.data
|
const { cap, asset } = props.data
|
||||||
const percent = marketDepositAmount.dividedBy(marketDepositCap).multipliedBy(100)
|
const percent = cap.used.dividedBy(cap.max).multipliedBy(100)
|
||||||
|
const depositCapUsed = Math.min(percent.toNumber(), 100)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TitleAndSubCell
|
<TitleAndSubCell
|
||||||
className='text-xs'
|
className='text-xs'
|
||||||
title={
|
title={
|
||||||
<FormattedNumber
|
<FormattedNumber
|
||||||
amount={marketDepositCap.toNumber()}
|
amount={cap.max.toNumber()}
|
||||||
options={{ abbreviated: true, decimals: asset.decimals }}
|
options={{ abbreviated: true, decimals: asset.decimals }}
|
||||||
animate
|
animate
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
sub={
|
sub={
|
||||||
<FormattedNumber
|
<FormattedNumber
|
||||||
amount={percent.toNumber()}
|
amount={depositCapUsed}
|
||||||
options={{ minDecimals: 2, maxDecimals: 2, suffix: '% used' }}
|
options={{ minDecimals: 2, maxDecimals: 2, suffix: '% used' }}
|
||||||
animate
|
animate
|
||||||
/>
|
/>
|
||||||
|
@ -26,7 +26,7 @@ export default function useAvailableColumns(props: Props) {
|
|||||||
<Apy
|
<Apy
|
||||||
isLoading={props.isLoading}
|
isLoading={props.isLoading}
|
||||||
borrowEnabled={row.original.borrowEnabled}
|
borrowEnabled={row.original.borrowEnabled}
|
||||||
marketLiquidityRate={row.original.marketLiquidityRate}
|
apy={row.original.apy.deposit}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
@ -37,7 +37,7 @@ export default function useDepositedColumns(props: Props) {
|
|||||||
<Apy
|
<Apy
|
||||||
isLoading={props.isLoading}
|
isLoading={props.isLoading}
|
||||||
borrowEnabled={row.original.borrowEnabled}
|
borrowEnabled={row.original.borrowEnabled}
|
||||||
marketLiquidityRate={row.original.marketLiquidityRate}
|
apy={row.original.apy.deposit}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
@ -8,7 +8,7 @@ import { DocURL } from 'types/enums/docURL'
|
|||||||
export default function HlsFarmIntro() {
|
export default function HlsFarmIntro() {
|
||||||
return (
|
return (
|
||||||
<Intro
|
<Intro
|
||||||
bg='farm'
|
bg='hls-farm'
|
||||||
text={
|
text={
|
||||||
<>
|
<>
|
||||||
<span className='text-white'>Leveraged farming</span> is a strategy where users borrow
|
<span className='text-white'>Leveraged farming</span> is a strategy where users borrow
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
import { useCallback } from 'react'
|
import { useCallback } from 'react'
|
||||||
|
|
||||||
import ActionButton from 'components/Button/ActionButton'
|
import Button from 'components/Button'
|
||||||
import { Circle, Enter, TrashBin, Wallet } from 'components/Icons'
|
import { Circle, Enter, TrashBin, Wallet } from 'components/Icons'
|
||||||
import Loading from 'components/Loading'
|
import Loading from 'components/Loading'
|
||||||
import Text from 'components/Text'
|
import Text from 'components/Text'
|
||||||
@ -84,7 +84,7 @@ export default function Deposit(props: Props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex items-center justify-end'>
|
<div className='flex items-center justify-end'>
|
||||||
<ActionButton onClick={handleOnClick} color='tertiary' text='Deposit' />
|
<Button onClick={handleOnClick} color='tertiary' text='Deposit' />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
|
|
||||||
import Button from 'components/Button'
|
import Button from 'components/Button'
|
||||||
import { PlusSquared } from 'components/Icons'
|
import { PlusSquared } from 'components/Icons'
|
||||||
import Intro from 'components/Intro'
|
import Intro from 'components/Intro'
|
||||||
@ -8,7 +6,7 @@ import { DocURL } from 'types/enums/docURL'
|
|||||||
export default function HLSStakingIntro() {
|
export default function HLSStakingIntro() {
|
||||||
return (
|
return (
|
||||||
<Intro
|
<Intro
|
||||||
bg='borrow'
|
bg='hls-staking'
|
||||||
text={
|
text={
|
||||||
<>
|
<>
|
||||||
<span className='text-white'>Leverage staking</span> is a strategy where users borrow
|
<span className='text-white'>Leverage staking</span> is a strategy where users borrow
|
||||||
|
@ -1,9 +1,15 @@
|
|||||||
import { Row } from '@tanstack/react-table'
|
import { Row } from '@tanstack/react-table'
|
||||||
import React from 'react'
|
import React, { useMemo } from 'react'
|
||||||
|
|
||||||
|
import { FormattedNumber } from 'components/FormattedNumber'
|
||||||
|
import Loading from 'components/Loading'
|
||||||
import TitleAndSubCell from 'components/TitleAndSubCell'
|
import TitleAndSubCell from 'components/TitleAndSubCell'
|
||||||
|
import useBorrowAsset from 'hooks/useBorrowAsset'
|
||||||
|
import usePrices from 'hooks/usePrices'
|
||||||
|
import { calculateAccountLeverage } from 'utils/accounts'
|
||||||
|
import { getLeveragedApy } from 'utils/math'
|
||||||
|
|
||||||
export const ACTIVE_APY_META = { header: 'APY', accessorKey: 'strategy' }
|
export const ACTIVE_APY_META = { header: 'APY', accessorKey: 'strategy.apy' }
|
||||||
|
|
||||||
export const activeApySortingFn = (
|
export const activeApySortingFn = (
|
||||||
a: Row<HLSAccountWithStrategy>,
|
a: Row<HLSAccountWithStrategy>,
|
||||||
@ -18,5 +24,27 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function ActiveAPY(props: Props) {
|
export default function ActiveAPY(props: Props) {
|
||||||
return <TitleAndSubCell title={'-'} sub={'-%/day'} />
|
const { data: prices } = usePrices()
|
||||||
|
const borrowRate = useBorrowAsset(props.account.strategy.denoms.borrow)?.borrowRate
|
||||||
|
|
||||||
|
const leverage = useMemo(
|
||||||
|
() => calculateAccountLeverage(props.account, prices),
|
||||||
|
[prices, props.account],
|
||||||
|
)
|
||||||
|
|
||||||
|
const leveragedApy = useMemo(() => {
|
||||||
|
if (props.account.strategy.apy === null || !borrowRate) return null
|
||||||
|
return getLeveragedApy(props.account.strategy.apy, borrowRate, leverage.toNumber())
|
||||||
|
}, [borrowRate, leverage, props.account.strategy.apy])
|
||||||
|
|
||||||
|
if (!leveragedApy) {
|
||||||
|
return <Loading />
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<TitleAndSubCell
|
||||||
|
title={<FormattedNumber amount={leveragedApy} options={{ suffix: '%' }} />}
|
||||||
|
sub={<FormattedNumber amount={leveragedApy / 365} options={{ suffix: '%/day' }} />}
|
||||||
|
/>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
54
src/components/HLS/Staking/Table/Columns/ApyRange.tsx
Normal file
54
src/components/HLS/Staking/Table/Columns/ApyRange.tsx
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
import { Row } from '@tanstack/react-table'
|
||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
import { FormattedNumber } from 'components/FormattedNumber'
|
||||||
|
import Loading from 'components/Loading'
|
||||||
|
import TitleAndSubCell from 'components/TitleAndSubCell'
|
||||||
|
import useBorrowAsset from 'hooks/useBorrowAsset'
|
||||||
|
import { getLeveragedApy } from 'utils/math'
|
||||||
|
|
||||||
|
export const APY_RANGE_META = { header: 'APY range', accessorKey: 'apy' }
|
||||||
|
|
||||||
|
export const apyRangeSortingFn = (a: Row<HLSStrategy>, b: Row<HLSStrategy>): number => {
|
||||||
|
return (a.original.apy || 0) - (b.original.apy || 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
isLoading?: boolean
|
||||||
|
strategy: HLSStrategy
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function ApyRange(props: Props) {
|
||||||
|
const baseApy = props.strategy.apy
|
||||||
|
const borrowRate = useBorrowAsset(props.strategy.denoms.borrow)?.borrowRate
|
||||||
|
|
||||||
|
if (!borrowRate || props.isLoading || !baseApy) {
|
||||||
|
return <Loading />
|
||||||
|
}
|
||||||
|
|
||||||
|
const maxLevApy = getLeveragedApy(baseApy, borrowRate, props.strategy.maxLeverage)
|
||||||
|
|
||||||
|
const minApy = Math.min(baseApy, maxLevApy)
|
||||||
|
const maxApy = Math.max(baseApy, maxLevApy)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<TitleAndSubCell
|
||||||
|
title={
|
||||||
|
<>
|
||||||
|
<FormattedNumber amount={minApy} options={{ suffix: ' - ' }} className='inline' />
|
||||||
|
<FormattedNumber amount={maxApy} options={{ suffix: '%' }} className='inline' />
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
sub={
|
||||||
|
<>
|
||||||
|
<FormattedNumber amount={minApy / 365} options={{ suffix: '-' }} className='inline' />
|
||||||
|
<FormattedNumber
|
||||||
|
amount={maxApy / 365}
|
||||||
|
options={{ suffix: '% daily' }}
|
||||||
|
className='inline'
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
@ -12,7 +12,7 @@ export default function MaxLeverage(props: Props) {
|
|||||||
return (
|
return (
|
||||||
<FormattedNumber
|
<FormattedNumber
|
||||||
amount={props.strategy.maxLeverage}
|
amount={props.strategy.maxLeverage}
|
||||||
options={{ minDecimals: 2, maxDecimals: 2, suffix: 'x' }}
|
options={{ minDecimals: 2, maxDecimals: 2, suffix: 'x', prefix: '~' }}
|
||||||
className='text-xs'
|
className='text-xs'
|
||||||
animate
|
animate
|
||||||
/>
|
/>
|
||||||
|
@ -5,7 +5,7 @@ import Loading from 'components/Loading'
|
|||||||
import TitleAndSubCell from 'components/TitleAndSubCell'
|
import TitleAndSubCell from 'components/TitleAndSubCell'
|
||||||
import { getAssetByDenom } from 'utils/assets'
|
import { getAssetByDenom } from 'utils/assets'
|
||||||
|
|
||||||
export const NAME_META = { id: 'name', header: 'Strategy', accessorKey: 'strategy.denoms.deposit' }
|
export const NAME_META = { id: 'name', header: 'Strategy' }
|
||||||
interface Props {
|
interface Props {
|
||||||
strategy: HLSStrategy
|
strategy: HLSStrategy
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,10 @@ import { ColumnDef } from '@tanstack/react-table'
|
|||||||
import React, { useMemo } from 'react'
|
import React, { useMemo } from 'react'
|
||||||
|
|
||||||
import Deposit, { DEPOSIT_META } from 'components/HLS/Farm/Table/Columns/Deposit'
|
import Deposit, { DEPOSIT_META } from 'components/HLS/Farm/Table/Columns/Deposit'
|
||||||
|
import ApyRange, {
|
||||||
|
APY_RANGE_META,
|
||||||
|
apyRangeSortingFn,
|
||||||
|
} from 'components/HLS/Staking/Table/Columns/ApyRange'
|
||||||
import MaxLeverage, { MAX_LEV_META } from 'components/HLS/Staking/Table/Columns/MaxLeverage'
|
import MaxLeverage, { MAX_LEV_META } from 'components/HLS/Staking/Table/Columns/MaxLeverage'
|
||||||
import MaxLTV, { LTV_MAX_META } from 'components/HLS/Staking/Table/Columns/MaxLTV'
|
import MaxLTV, { LTV_MAX_META } from 'components/HLS/Staking/Table/Columns/MaxLTV'
|
||||||
import Name, { NAME_META } from 'components/HLS/Staking/Table/Columns/Name'
|
import Name, { NAME_META } from 'components/HLS/Staking/Table/Columns/Name'
|
||||||
@ -27,6 +31,13 @@ export default function useAvailableColumns(props: Props) {
|
|||||||
<MaxLTV strategy={row.original as HLSStrategy} isLoading={props.isLoading} />
|
<MaxLTV strategy={row.original as HLSStrategy} isLoading={props.isLoading} />
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
...APY_RANGE_META,
|
||||||
|
cell: ({ row }) => (
|
||||||
|
<ApyRange strategy={row.original as HLSStrategy} isLoading={props.isLoading} />
|
||||||
|
),
|
||||||
|
sortingFn: apyRangeSortingFn,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
...DEPOSIT_META,
|
...DEPOSIT_META,
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
|
@ -10,20 +10,25 @@ import Settings from 'components/Settings'
|
|||||||
import Wallet from 'components/Wallet'
|
import Wallet from 'components/Wallet'
|
||||||
import useAccountId from 'hooks/useAccountId'
|
import useAccountId from 'hooks/useAccountId'
|
||||||
import useStore from 'store'
|
import useStore from 'store'
|
||||||
import { ENABLE_HLS } from 'utils/constants'
|
import { ENABLE_HLS, ENABLE_PERPS } from 'utils/constants'
|
||||||
|
import { WalletID } from 'types/enums/wallet'
|
||||||
|
import { getGovernanceUrl } from 'utils/helpers'
|
||||||
|
|
||||||
export const menuTree: { pages: Page[]; label: string }[] = [
|
export const menuTree = (walletId: WalletID): MenuTreeEntry[] => [
|
||||||
{ pages: ['trade'], label: 'Trade' },
|
{ pages: ['trade'], label: 'Trade' },
|
||||||
|
...(ENABLE_PERPS ? [{ pages: ['perps'] as Page[], label: 'Perps' }] : []),
|
||||||
{ pages: ['lend', 'farm'], label: 'Earn' },
|
{ pages: ['lend', 'farm'], label: 'Earn' },
|
||||||
{ pages: ['borrow'], label: 'Borrow' },
|
{ pages: ['borrow'], label: 'Borrow' },
|
||||||
{ pages: ['portfolio'], label: 'Portfolio' },
|
|
||||||
...(ENABLE_HLS ? [{ pages: ['hls-staking'] as Page[], label: 'High Leverage' }] : []),
|
...(ENABLE_HLS ? [{ pages: ['hls-staking'] as Page[], label: 'High Leverage' }] : []),
|
||||||
|
{ pages: ['portfolio'], label: 'Portfolio' },
|
||||||
|
{ pages: ['governance'], label: 'Governance', externalUrl: getGovernanceUrl(walletId) },
|
||||||
]
|
]
|
||||||
|
|
||||||
export default function DesktopHeader() {
|
export default function DesktopHeader() {
|
||||||
const address = useStore((s) => s.address)
|
const address = useStore((s) => s.address)
|
||||||
const focusComponent = useStore((s) => s.focusComponent)
|
const focusComponent = useStore((s) => s.focusComponent)
|
||||||
const isOracleStale = useStore((s) => s.isOracleStale)
|
const isOracleStale = useStore((s) => s.isOracleStale)
|
||||||
|
const isHLS = useStore((s) => s.isHLS)
|
||||||
const accountId = useAccountId()
|
const accountId = useAccountId()
|
||||||
|
|
||||||
function handleCloseFocusMode() {
|
function handleCloseFocusMode() {
|
||||||
@ -36,9 +41,8 @@ export default function DesktopHeader() {
|
|||||||
return (
|
return (
|
||||||
<header
|
<header
|
||||||
className={classNames(
|
className={classNames(
|
||||||
'fixed left-0 top-0 z-50 hidden w-full',
|
'fixed left-0 top-0 z-50 w-full',
|
||||||
'before:content-[" "] before:absolute before:inset-0 before:-z-1 before:h-full before:w-full before:rounded-sm before:backdrop-blur-sticky',
|
'before:content-[" "] before:absolute before:inset-0 before:-z-1 before:h-full before:w-full before:rounded-sm before:backdrop-blur-sticky',
|
||||||
'lg:block',
|
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -59,7 +63,7 @@ export default function DesktopHeader() {
|
|||||||
<div className='flex gap-4'>
|
<div className='flex gap-4'>
|
||||||
{isOracleStale && <OracleResyncButton />}
|
{isOracleStale && <OracleResyncButton />}
|
||||||
{accountId && <RewardsCenter />}
|
{accountId && <RewardsCenter />}
|
||||||
{address && <AccountMenu />}
|
{address && !isHLS && <AccountMenu />}
|
||||||
<Wallet />
|
<Wallet />
|
||||||
<Settings />
|
<Settings />
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
<svg viewBox="0 0 22 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path
|
<path d="M11.9998 9.00023V13.0002M11.9998 17.0002H12.0098M10.6151 3.89195L2.39019 18.0986C1.93398 18.8866 1.70588 19.2806 1.73959 19.6039C1.769 19.886 1.91677 20.1423 2.14613 20.309C2.40908 20.5002 2.86435 20.5002 3.77487 20.5002H20.2246C21.1352 20.5002 21.5904 20.5002 21.8534 20.309C22.0827 20.1423 22.2305 19.886 22.2599 19.6039C22.2936 19.2806 22.0655 18.8866 21.6093 18.0986L13.3844 3.89195C12.9299 3.10679 12.7026 2.71421 12.4061 2.58235C12.1474 2.46734 11.8521 2.46734 11.5935 2.58235C11.2969 2.71421 11.0696 3.10679 10.6151 3.89195Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
d="M10.9998 8.00023V12.0002M10.9998 16.0002H11.0098M9.61507 2.89195L1.39019 17.0986C0.933982 17.8866 0.70588 18.2806 0.739593 18.6039C0.768998 18.886 0.916769 19.1423 1.14613 19.309C1.40908 19.5002 1.86435 19.5002 2.77487 19.5002H19.2246C20.1352 19.5002 20.5904 19.5002 20.8534 19.309C21.0827 19.1423 21.2305 18.886 21.2599 18.6039C21.2936 18.2806 21.0655 17.8866 20.6093 17.0986L12.3844 2.89195C11.9299 2.10679 11.7026 1.71421 11.4061 1.58235C11.1474 1.46734 10.8521 1.46734 10.5935 1.58235C10.2969 1.71421 10.0696 2.10679 9.61507 2.89195Z"
|
<path d="M12 9V13M12 17H12.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
stroke="currentColor"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
/>
|
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 816 B |
283
src/components/Icons/GridPlanet.svg
Normal file
283
src/components/Icons/GridPlanet.svg
Normal file
@ -0,0 +1,283 @@
|
|||||||
|
<svg
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
x="0px"
|
||||||
|
y="0px"
|
||||||
|
viewBox="0 0 444 225"
|
||||||
|
style="enable-background: new 0 0 444 225"
|
||||||
|
>
|
||||||
|
<defs>
|
||||||
|
<rect id="GridPlanetRect" x="0.2" y="-0.8" width="444.1" height="225.3" />
|
||||||
|
</defs>
|
||||||
|
<clipPath id="GridPlanet">
|
||||||
|
<use href="#GridPlanetRect" style="overflow: visible" />
|
||||||
|
</clipPath>
|
||||||
|
<g style="clip-path: url(#GridPlanet)">
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M475.5,299.1l0.8-2.5c5.7-17.5,8.5-35.8,8.3-54.2c-8.3-5.3-21.5-7.9-39-7.5h-0.6l0.1-0.6c7.7-51.3,2-101.9-16.4-146.5
|
||||||
|
l-0.3-0.7h0.8c33.4-0.8,54.8,6.7,62,21.7c6.9,14.6-0.3,35.1-21,59.5c9.8,23.3,15.1,48.3,15.6,73.6c3.4,2.2,6.2,5.3,8,8.9
|
||||||
|
c5.4,11.4-0.3,27.4-16.5,46.4L475.5,299.1z M485.8,243.1c0.1,17.4-2.4,34.7-7.6,51.3c14.6-17.7,19.6-32.6,14.6-43.2
|
||||||
|
C491.2,247.9,488.8,245.1,485.8,243.1z M449.2,233.8c15.6,0,27.6,2.5,35.5,7.3c-0.6-25-5.9-49.7-15.6-72.8L469,168l0.2-0.3
|
||||||
|
c20.6-24.1,27.8-44.3,21.1-58.6c-6.7-14.2-27.7-21.7-60.2-21.1c18.2,44.4,23.8,94.8,16.2,145.8L449.2,233.8z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M482.8,212.3l-0.8-0.7c19.9-23.3,26.9-42.9,20.4-56.6c-6.7-14.1-27.1-21.1-59-20.4v-1.1c32.3-0.7,53.1,6.5,59.9,21
|
||||||
|
C510.1,168.7,503,188.7,482.8,212.3z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M243.5,302.8l-0.3-0.4c-28.5-40.3-53.7-82.8-75.2-127.2l-0.2-0.4l0.4-0.2c89.6-50.8,194.5-86,261.1-87.5h0.4l0.1,0.3
|
||||||
|
c18.5,44.8,24.2,95.6,16.4,147.1l-0.1,0.5h-0.4c-51.4,1.2-132.5,28.4-201.8,67.7L243.5,302.8z M169.1,175.2
|
||||||
|
c21.4,44,46.4,86.2,74.7,126.2c69.1-39.1,149.9-66.2,201.4-67.5c7.6-51,2-101.4-16.3-145.8C362.6,89.7,258.3,124.7,169.1,175.2z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M216.6,261.8l-0.5-0.9c79.9-45.3,173.4-76.7,232.8-78v1.1C389.7,185.3,296.4,216.6,216.6,261.8z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M191.4,219.1l-0.5-0.9C277.5,169,379,135,443.4,133.5v1.1C379.2,136.1,277.9,170,191.4,219.1z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M385.2,243.7c-2.8-49.6-14.3-98.3-33.7-144l1-0.4c19.6,45.8,31,94.6,33.9,144.3L385.2,243.7z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M315,267.4c-15.7-46.6-33.8-92.4-54.3-137.2l1-0.4c20.4,44.8,38.6,90.7,54.3,137.3L315,267.4z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M132.3,413.3l-0.8-0.3c-47.9-20-85.3-52.9-108-95.2v-0.2c-1.6-17.2,11.4-39.8,37.4-65.5s63.1-52.4,107.3-77.5l0.5-0.3
|
||||||
|
l0.2,0.5c21.5,44.3,46.7,86.8,75.2,127l0.3,0.5l-0.5,0.3c-69.2,39.2-114,83.4-111.7,109.9L132.3,413.3z M24.4,317.3
|
||||||
|
c22.5,41.9,59.4,74.5,106.7,94.3c-1.4-27.3,42.2-70.2,111.8-109.7c-28.3-40-53.3-82.2-74.7-126.2
|
||||||
|
C79.3,226.3,21.5,283.1,24.4,317.3z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M50.8,356.5C49.3,339.9,61.9,318,87,293.1c25.2-24.8,61-50.7,103.8-75l0.5,0.9C105,268.1,48.9,323.3,51.9,356.4
|
||||||
|
L50.8,356.5z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M469.4,169.1l-0.3-0.8c-22.8-55.5-67.9-103.7-126.9-135.5l-0.6-0.3L342,32c11.4-13.4,17.2-25.2,17.1-34.6
|
||||||
|
c-14.1-10-29.7-17.9-46.2-23.2l-3-1l3.1-0.1c24.4-0.6,40,4.9,45.2,15.9c1.1,2.4,1.8,5.1,1.9,7.8c29.7,21.1,53.6,52,69.5,90.2
|
||||||
|
c33.2-0.7,54.5,6.8,61.6,21.7c6.9,14.6-0.4,35.3-21.2,59.7L469.4,169.1z M343.2,32.2c58.7,31.8,103.6,79.7,126.5,135
|
||||||
|
c20.1-23.8,27.2-43.8,20.5-57.9c-6.9-14.6-28-21.9-61-21.1H429l-0.1-0.3c-15.6-38-39.3-68.5-68.6-89.6
|
||||||
|
C360,7.6,354.3,19.1,343.2,32.2z M316.2-25.8c15.2,5.3,29.7,12.6,42.8,21.9c-0.2-2.3-0.7-4.5-1.7-6.6c-4.8-10-18.9-15.3-40.9-15.3
|
||||||
|
L316.2-25.8z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M440,115.6l-0.8-0.7c20.1-23.5,27.2-43.3,20.6-57.2c-6.7-14.2-27.3-21.4-59.6-20.6V36c32.7-0.7,53.6,6.6,60.6,21.2
|
||||||
|
C467.6,71.5,460.4,91.7,440,115.6z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M397,69.6l-0.8-0.7c18.2-21.3,24.6-39.2,18.7-51.8c-6.1-12.9-24.8-19.3-53.9-18.6v-1.1c29.6-0.7,48.6,6,54.9,19.2
|
||||||
|
C422,29.7,415.5,48,397,69.6z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M492.5,124.8C470,68.7,422.7,24.8,359.3,1.2l0.4-1c63.7,23.7,111.2,67.8,133.8,124.2L492.5,124.8z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M478.5,96.8c-22.7-56.5-68.6-97.7-129.3-116l0.3-1c61.1,18.4,107.3,59.9,130,116.7L478.5,96.8z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M168.2,175.7l-0.2-0.5C141,119.6,125,70.6,122.7,37.4v-0.3L123,37c65.2-37.1,141.6-62.7,190.1-63.8h0.1h0.1
|
||||||
|
c51.7,16.7,93.1,57.3,116.5,114.1L430,88h-0.7c-66.4,1.5-171.2,36.6-260.6,87.4L168.2,175.7z M123.8,37.6
|
||||||
|
c2.3,33,18.3,81.5,44.9,136.6c89.1-50.5,193.3-85.4,259.8-87.2C405.1,30.9,364.1-9.1,313-25.7C264.7-24.6,188.8,0.8,123.8,37.6z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M145.5,122.4l-0.5-0.9c87.5-49.7,190.2-84,255.2-85.5v1.1C335.3,38.5,232.9,72.9,145.5,122.4z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M130.2,75.9l-0.5-0.9C209,30,301.9-1.1,360.9-2.5v1.1C302.1-0.1,209.4,31,130.2,75.9z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M351.4,99.8c-24.4-56.5-58.1-98-94.9-116.8L257-18c37,19,70.9,60.7,95.4,117.4L351.4,99.8z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M260.7,130.2C235.1,74,210.1,29.5,190.3,5l0.8-0.7C211,29,236,73.6,261.7,129.8L260.7,130.2z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M24.7,320l-1.2-2.3c-28.9-53.8-31-116.5-6-176.8c-2.1-25.7,39.2-66.5,105.4-104l0.7-0.4v0.8
|
||||||
|
c2.2,33.1,18.3,81.9,45.2,137.4l0.2,0.5l-0.4,0.2c-89.3,50.6-147.3,107.7-144.3,142L24.7,320z M122.7,38.2
|
||||||
|
C58.2,75,16.3,116.2,18.6,141v0.1v0.1c-24.7,59.2-22.9,120.8,4.8,173.9C23.1,298.3,36,276.5,60.9,252
|
||||||
|
c25.9-25.5,62.8-52.2,106.8-77.2C141.1,119.8,125.2,71.4,122.7,38.2z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M3.5,261.3c-1.5-16.8,11.1-38.9,36.6-64c25.5-25.1,61.6-51.2,104.9-75.7l0.5,0.9C58.2,172,1.5,227.7,4.5,261.2L3.5,261.3z
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M1.5,201.6c-1.4-15.2,10.1-35.3,33.2-58.1c23.1-22.7,55.9-46.4,95-68.6l0.5,0.9C51.2,120.7-0.2,171.2,2.5,201.5L1.5,201.6
|
||||||
|
z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M89.8,227.2c-28-55-36.6-109-23.9-152.2l1,0.3c-12.5,42.9-4,96.6,23.9,151.4L89.8,227.2z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M39.5,276.7C10.8,222.4,7.2,163.5,29.2,111l1,0.4C8.3,163.6,11.9,222.2,40.5,276.2L39.5,276.7z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M83.2,348.4c-20.9,0-37.2-3.5-47.6-10.7c-7.4-5-11.5-11.8-12.3-20.1c-28.9-53.8-30.9-116.6-5.8-176.8l0.8-2l0.2,2.1
|
||||||
|
c0.2,2.8,1.1,5.6,2.6,8c1.5,2.4,3.5,4.5,5.9,6c16.7,11.4,56.3,9.7,106.1-4.6l0.6-0.2v0.6c4.9,62.6,22.3,126.5,48.9,180l0.3,0.6
|
||||||
|
l-0.6,0.2C143.6,342.7,109.7,348.4,83.2,348.4z M17.8,143.1c-24.3,59.4-21.9,121.1,6.7,174.1v0.2c0.7,8,4.7,14.5,11.8,19.4
|
||||||
|
c22.9,15.7,77.2,13.4,145.3-6.1c-26.5-53.2-43.8-116.8-48.7-179.1c-50.5,14.4-89.3,16-106.4,4.3c-2.3-1.4-4.2-3.3-5.7-5.5
|
||||||
|
C19.3,148.2,18.3,145.7,17.8,143.1L17.8,143.1z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M54.5,229c-18.5,0-32.9-3.1-42.2-9.5c-3.1-1.9-5.7-4.6-7.5-7.7c-1.9-3.1-3-6.6-3.4-10.2l1.1-0.1c0.3,3.5,1.4,6.8,3.2,9.8
|
||||||
|
c1.8,3,4.3,5.5,7.2,7.3c20.3,13.9,68.6,11.8,129.2-5.6l0.3,1C108,224,77.9,229,54.5,229z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M45.4,342.5C16.8,289.1,12.6,223.9,33.5,159l1,0.3C13.6,224,17.9,288.8,46.3,342L45.4,342.5z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M100.5,347.2c-27.9-53.4-37.4-119-26.8-184.8l1,0.2c-10.5,65.6-1,131,26.8,184.2L100.5,347.2z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M342.6,33l-0.4-0.2c-59-31.8-124.9-43.6-185.6-33l-2.4,0.4l2.1-1.4c49.6-33.2,105.3-42.3,157-25.6
|
||||||
|
c24.4-0.5,39.9,4.9,45.1,15.9c5.1,10.7-0.3,25.8-15.5,43.6L342.6,33z M200.9-5c47.5,0,96.4,12.5,141.4,36.7
|
||||||
|
c14.7-17.3,19.9-31.9,15-42.2c-5-10.5-20.3-15.8-44.3-15.3H313h-0.1c-50.6-16.4-105.2-7.8-154.1,24.1C172.8-3.9,186.8-5,200.9-5
|
||||||
|
L200.9-5z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M281.9,7.6l-0.8-0.7c10.6-12.4,14.3-22.8,10.9-30c-3.4-7.3-14.4-11.2-31.3-10.8V-35c17.4-0.4,28.6,3.5,32.3,11.4
|
||||||
|
S292.7-5.1,281.9,7.6z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M359.3,1.2c-63.4-23.6-135.4-24.1-202.6-1.4l-0.3-1C223.8-24,296-23.5,359.6,0.2L359.3,1.2z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M122.7,38.2v-0.8c-1.3-19.1,2-31.8,9.7-37.6c5.8-4.3,13.8-4.7,24-1.1C206-34.4,261.7-43.5,313.3-26.8l3,1h-3.1
|
||||||
|
c-48.3,1.1-124.5,26.7-189.6,63.6L122.7,38.2z M143.8-2.7c-3.9-0.1-7.7,1.1-10.8,3.3c-7.4,5.5-10.5,17.6-9.4,35.9
|
||||||
|
c63.7-36,137.9-61.1,186.3-63.2c-50.5-15.3-104.8-6-153.2,26.4l-0.2,0.2l-0.3-0.1c-3.9-1.5-8.1-2.4-12.2-2.5H143.8z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M125.8,11.3l-0.5-0.9C171.7-16,226.1-34.2,260.6-35v1.1C226.3-33.1,172.1-15,125.8,11.3z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M190.3,5C178.8-9.5,169.7-16.2,164-14.6c-3.7,1.1-6.1,5.8-7,14l-1-0.1c0.9-8.6,3.5-13.7,7.7-14.9
|
||||||
|
c6.2-1.8,15.5,4.9,27.5,19.9L190.3,5z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M17.7,143.2l-0.2-2.1c-1.1-12.2,7.6-27.7,24.1-44.8c21.7-31.6,49.4-58.4,81.7-79c1.4-8.2,4.5-14.1,9.1-17.6
|
||||||
|
c5.8-4.4,14-4.7,24.3-1l1.2,0.4l-1.1,0.5c-11.2,5.4-22,11.6-32.4,18.3c-0.9,6.4-1.1,12.8-0.6,19.3v0.3l-0.3,0.2
|
||||||
|
C88.6,57.6,60.3,78.7,41.9,97.9c-9.2,13.7-17,28.2-23.4,43.5L17.7,143.2z M37.6,102.5c-12.1,13.6-18.9,26.1-19.1,36.1
|
||||||
|
C23.9,126.1,30.2,114,37.6,102.5L37.6,102.5z M123.1,18.7C93,38.1,66.7,63.1,45.8,92.2c18.3-17.7,44.6-36.8,76.8-55.1
|
||||||
|
C122.2,31,122.3,24.8,123.1,18.7z M143.9-2.7c-3.9-0.1-7.7,1.1-10.8,3.3c-4.2,3.2-7,8.5-8.4,16c9.8-6.3,20-12.1,30.5-17.2
|
||||||
|
C151.6-2,147.8-2.7,143.9-2.7z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M50.2,84.6c-1.6-18.3,27.8-47.5,75.1-74.3l0.5,0.9C79.7,37.5,49.8,66.9,51.3,84.5L50.2,84.6z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M97.1,36.7c-0.9-9.7,14.6-25.1,39.5-39.2l0.5,0.9c-24.1,13.7-39.8,29-39,38.2L97.1,36.7z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M66.8,75.3l-1-0.3c12.7-43.2,44.8-70.3,90.6-76.3l0.1,1C111.1,5.7,79.3,32.5,66.8,75.3z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M30.2,111.4l-1-0.4C51.3,58.5,96.4,18.7,156.3-1.2l0.3,1C97.1,19.6,52.2,59.2,30.2,111.4z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M61.2,163.7c-15.3,0-27.1-2.6-34.7-7.8c-2.5-1.6-4.7-3.8-6.2-6.3c-1.6-2.6-2.5-5.5-2.8-8.4V141v-0.1
|
||||||
|
C42.6,80.7,91.9,30.3,156.3-1.2l1.5-0.7L157-0.5c-19.7,35-27.9,88.8-23.1,151.3v0.4l-0.4,0.1C105.1,159.6,80.5,163.7,61.2,163.7z
|
||||||
|
M18.6,141.2c0.3,2.8,1.2,5.5,2.6,7.9c1.5,2.4,3.5,4.4,5.9,5.9c16.6,11.4,56.1,9.7,105.7-4.5C128,88.9,136,35.7,155.3,0.5
|
||||||
|
C91.9,31.8,43.4,81.7,18.6,141.2L18.6,141.2z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M81.5,100.8c-10.9,0-19.4-1.8-24.8-5.6c-1.8-1.2-3.4-2.7-4.5-4.6c-1.1-1.8-1.8-3.9-2-6.1l1.1-0.1c0.2,2,0.8,3.9,1.8,5.6
|
||||||
|
c1,1.7,2.5,3.2,4.2,4.2c11.8,8.1,40,6.8,75.3-3.3l0.3,1C112.8,97.9,95.2,100.8,81.5,100.8z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M113.7,45.4c-5.8,0-10.3-1-13.1-3c-1-0.6-1.8-1.5-2.4-2.5c-0.6-1-1-2.1-1.1-3.3l1.1-0.1c0.1,1,0.4,2,1,2.8
|
||||||
|
c0.5,0.9,1.2,1.6,2.1,2.1c6.1,4.2,20.8,3.5,39.4-1.8l0.3,1C130.2,43.9,120.9,45.4,113.7,45.4z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M34.5,159.3l-1-0.3C54.4,94.1,98,37.3,156.2-1.2l0.6,0.9C98.8,38,55.4,94.6,34.5,159.3z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M74.6,162.6l-1-0.2C84.2,96.6,113.5,38.6,156.2-1.1l0.7,0.8C114.3,39.2,85.1,97.1,74.6,162.6z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M177.5,436.4c-11.6,0-21.3-1.4-28.8-4.1l-2.4-0.9c-1.8-0.7-3.8-1.4-5.3-2.1c-2.6-1.1-6-2.5-8.3-3.6
|
||||||
|
c-7.6-3.4-13.4-6.5-15.3-7.5c-3.3-1.8-8.4-4.7-14.5-8.4c-7.8-5-13.6-9.3-13.6-9.3c-6.4-4.9-8.1-6.2-12.7-10.2
|
||||||
|
c-7-6-11.8-11-11.9-11l-1.7-1.8c-1.3-1.3-2.7-2.7-3.8-3.9c-1.9-2-4-4.3-5.5-6.1c-3.1-3.7-7-8.6-9.8-12.3c-1.1-1.5-2.5-3.4-3.7-5.1
|
||||||
|
l-1.1-1.5c-1.1-1.6-5.3-7.8-8.7-13.6c-2.7-4.7-4.4-7.5-8.6-16.1c-0.6-1.3-2.8-5.9-4.3-9.5c-0.4-0.9-0.7-1.9-1.2-2.8
|
||||||
|
c-0.9-2.2-1.8-4.4-2.5-6.3c-0.5-1.4-2.2-6.1-3.4-9.8c-2.1-6.7-4.2-15.5-5.1-19c-0.7-3-1.5-7-2-10.2c-0.9-6-1.9-12.9-2.4-18.2
|
||||||
|
C0,231.5,0,224.2,0,222.2c0.1-7.8,0.2-12.1,1-20.8c0.4-4.7,1.3-11.2,2.7-20c0.5-3.3,1.4-7.5,2.2-10.9c0.5-2.1,1.1-4.5,1.7-6.9
|
||||||
|
c0.3-1.1,0.5-2.1,0.8-3c0.8-3.3,2.2-7.6,3.2-11c3.7-11.4,8.1-22.6,13.3-33.4c2.8-5.8,6.7-13.1,9.6-18.2
|
||||||
|
c3.7-6.4,8.7-14.1,10.2-16.3c2.9-4.4,7.4-10.6,11.4-15.6c1.9-2.4,4.2-5.3,6-7.3c2.1-2.5,5-5.7,6.9-7.9c2.7-3.1,6.7-7.2,10-10.4
|
||||||
|
l0.5-0.5c1.6-1.6,3.6-3.5,5.2-5c3.4-3.1,6-5.5,7.9-7c6-5.1,8.4-7.2,17-13.5c1.8-1.3,4-2.8,5.6-4c2.8-1.9,6.7-4.4,9.5-6.2
|
||||||
|
c1.8-1.1,8.4-5.1,13.9-8.1c3.4-1.8,9.2-4.9,17.2-8.4c5.6-2.5,10.3-4.3,13.2-5.5c6.2-2.3,9.4-3.4,14.7-5.1c2-0.7,7.5-2.2,11.3-3.3
|
||||||
|
c5-1.3,5-1.3,13.1-3.1c5.9-1.3,16.6-3.1,23.5-3.9c4-0.5,13.4-1.5,26.1-1.9c10.2-0.2,18.7,0.2,22.8,0.4c4.1,0.3,9.7,0.8,14.6,1.3
|
||||||
|
c2.8,0.3,6.9,0.8,10,1.4l1.5,0.3c3.7,0.6,8.2,1.4,11.7,2.1c1.8,0.4,6.5,1.3,10.1,2.3l3.1,0.8c3,0.8,6.5,1.7,9.1,2.5
|
||||||
|
c5.6,1.8,13.3,4.4,19.6,6.7c0.1,0,9.8,3.7,20.4,8.9c11.9,5.8,19.8,10.9,19.9,11l1.7,1.1c2.2,1.4,4.8,3,6.7,4.4
|
||||||
|
c3,2,6.5,4.4,8.9,6.3c4.8,3.8,11,8.8,15.5,12.5c2.5,2.1,5.6,5.1,7.8,7.3c1.4,1.4,4.9,4.8,7.4,7.6c3.8,4.2,8.9,10.3,12.8,15
|
||||||
|
c1.9,2.4,4.2,5.6,6.2,8.4c1.2,1.7,2.7,3.9,3.9,5.8l1.5,2.3c0,0,5,7.6,10.4,18.2c4.7,9.2,7.9,17.1,8.4,18.6
|
||||||
|
c1.8,4.5,4.2,10.8,5.4,15.2c1.4,4.6,3.1,10.7,4.2,15.2c0.5,1.9,1.1,4.5,1.8,8c0.5,2.5,1.1,5.6,1.4,8.1c0.7,4.7,1.4,11,2,15.6
|
||||||
|
c0.2,1.6,0.8,9.4,0.9,16.5c0,4.8-0.2,11.3-0.4,15.9c-0.1,1.7-0.2,3.8-0.4,5.9c0,0.9-0.2,1.8-0.2,2.5c0,0.1-0.7,7.9-2.2,16.5
|
||||||
|
c-0.4,2.3-1,5.9-1.6,8.5c-1.1,4.9-2.6,11.2-3.8,15.9c0,0.1-1.9,7.2-5.5,17.2c-2.8,7.8-8.3,16.5-16.3,25.9l-1.7,2l0.8-2.5
|
||||||
|
c13.2-40.2,10.7-84.6-7.3-128.3c-22.8-55.7-67.8-103.9-126.9-135.7s-124.7-43.5-185.3-33c-19.7,35.1-27.8,88.7-23,151.1
|
||||||
|
c4.9,62.4,22.3,126.5,48.9,180c21,42,45.9,73.8,71.9,91.7l0.9,0.6l-1.1,0.3C224.8,432,198.3,436.4,177.5,436.4z M264.1-33.9
|
||||||
|
c-2,0-4.1,0-6.3,0.1c-12.7,0.3-22,1.4-26,1.8c-6.8,0.8-17.5,2.5-23.4,3.8c-8.1,1.8-8.1,1.8-13.1,3.1c-3.9,1-9.2,2.6-11.2,3.2
|
||||||
|
c-5.3,1.7-8.5,2.8-14.7,5.1c-2.9,1.1-7.6,3-13.2,5.4c-7.9,3.5-13.7,6.6-17.1,8.4c-5.5,2.9-12,6.9-13.8,8c-2.8,1.8-6.6,4.2-9.4,6.2
|
||||||
|
c-1.6,1.1-3.9,2.7-5.6,4c-8.4,6.3-11,8.4-17,13.4c-1.9,1.6-4.5,3.9-7.9,7c-1.6,1.4-3.6,3.4-5.2,4.9l-0.5,0.5
|
||||||
|
c-3.2,3.2-7.2,7.4-9.9,10.4c-1.9,2.2-4.8,5.4-6.9,7.9c-1.7,2-4,4.9-5.9,7.3c-4,5-8.4,11.2-11.4,15.6c-1.4,2.2-6.5,9.8-10.2,16.2
|
||||||
|
c-2.9,5-6.7,12.3-9.5,18.1c-5.2,10.8-9.6,21.9-13.3,33.3c-1.1,3.4-2.4,7.7-3.2,10.9c-0.2,0.9-0.5,2-0.8,3
|
||||||
|
c-0.6,2.4-1.2,4.8-1.7,6.9c-0.8,3.3-1.7,7.6-2.2,10.8c-1.4,8.7-2.3,15.2-2.7,19.9c-0.8,8.6-0.8,12.9-1,20.7c0,2,0,9.2,0.9,20.4
|
||||||
|
c0.4,5.2,1.4,12.1,2.4,18.1c0.5,3.1,1.3,7.2,2,10.2c0.9,3.5,3.1,12.3,5.1,19c1.2,3.8,2.9,8.4,3.4,9.8c0.7,1.9,1.6,4.1,2.5,6.3
|
||||||
|
c0.4,1,0.8,2,1.2,2.8c1,2.5,2.6,6,4.2,9.5c4.2,8.5,5.8,11.3,8.5,16c3.3,5.7,7.5,11.9,8.6,13.5l1.1,1.5c1.2,1.7,2.5,3.6,3.7,5.1
|
||||||
|
c2.8,3.6,6.8,8.5,9.8,12.2c1.5,1.8,3.6,4.1,5.5,6.1c1.1,1.2,2.5,2.6,3.8,3.9l1.7,1.8c0,0,4.9,5,11.8,10.9c4.6,4,6.3,5.3,12.7,10.1
|
||||||
|
c0.1,0.1,5.8,4.4,13.6,9.3c5.9,3.8,11.1,6.6,14.4,8.4c1.9,1,7.6,4.1,15.2,7.5c2.4,1.1,5.7,2.5,8.3,3.6c1.6,0.6,3.5,1.4,5.3,2.1
|
||||||
|
l2.4,0.9c20.6,7.6,58.5,4.5,104-8.5c-25.8-18.2-50.5-49.8-71.3-91.5C155,277.7,137.6,213.7,132.7,151
|
||||||
|
C127.8,88.2,136.1,34.3,155.9-1l0.1-0.2h0.3c60.9-10.6,127,1.2,186.3,33.1c59.2,31.9,104.5,80.2,127.4,136
|
||||||
|
c17.7,43,20.5,86.7,8.1,126.5c7-8.4,11.8-16.4,14.4-23.5c3.5-9.9,5.4-17,5.4-17.1c1.2-4.7,2.8-11,3.8-15.9
|
||||||
|
c0.6-2.6,1.2-6.1,1.6-8.4c1.4-8.5,2.1-16.3,2.1-16.4c0.1-0.8,0.1-1.6,0.2-2.5c0.2-2,0.4-4.1,0.4-5.8c0.2-4.6,0.4-11,0.4-15.9
|
||||||
|
c-0.1-7.1-0.7-14.9-0.8-16.4c-0.5-4.6-1.3-10.9-2-15.6c-0.4-2.4-1-5.5-1.4-8c-0.7-3.5-1.3-6.1-1.7-7.9c-1.2-4.5-2.8-10.6-4.2-15.2
|
||||||
|
c-1.3-4.3-3.7-10.6-5.4-15.1c-0.6-1.5-3.7-9.4-8.4-18.5c-5.4-10.5-10.3-18-10.3-18.1c-0.5-0.7-1-1.5-1.5-2.3
|
||||||
|
c-1.3-1.9-2.7-4.1-3.9-5.8c-2-2.8-4.2-6-6.2-8.4c-3.8-4.7-8.9-10.7-12.7-14.9c-2.5-2.8-6-6.2-7.3-7.5c-2.2-2.2-5.3-5.1-7.8-7.2
|
||||||
|
c-4.4-3.7-10.6-8.8-15.4-12.5c-2.4-1.9-5.8-4.2-8.9-6.3c-2-1.3-4.5-2.9-6.7-4.3l-1.7-1.2c0,0-8-5.1-19.8-10.9
|
||||||
|
c-10.5-5.2-20.2-8.8-20.3-8.9c-6.3-2.3-14.1-4.9-19.6-6.7c-2.7-0.8-6.1-1.7-9.1-2.5l-3.1-0.8c-3.5-0.9-8.2-1.9-10-2.2
|
||||||
|
c-3.4-0.7-8-1.4-11.6-2.1l-1.5-0.3c-3.1-0.5-7.1-1-9.9-1.3c-4.9-0.5-10.6-1-14.6-1.3C277.2-33.7,271.4-33.9,264.1-33.9z"
|
||||||
|
/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 16 KiB |
231
src/components/Icons/GridWeb.svg
Normal file
231
src/components/Icons/GridWeb.svg
Normal file
@ -0,0 +1,231 @@
|
|||||||
|
<svg
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
x="0px"
|
||||||
|
y="0px"
|
||||||
|
viewBox="0 0 525 165"
|
||||||
|
style="enable-background: new 0 0 525 165"
|
||||||
|
>
|
||||||
|
<defs>
|
||||||
|
<rect id="GridWebRect" x="-0.5" y="0.6" width="526.1" height="164.7" />
|
||||||
|
</defs>
|
||||||
|
<clipPath id="GridWeb">
|
||||||
|
<use href="#GridWebRect" style="overflow: visible" />
|
||||||
|
</clipPath>
|
||||||
|
<path
|
||||||
|
style="clip-path: url(#GridWeb)"
|
||||||
|
fill="currentColor"
|
||||||
|
d="M589.8,99.3
|
||||||
|
c-0.9-5.8-5.8-10.4-14-14.8c-5.1-2.9-10.5-5.2-16.3-7c-8.3-3.1-18-6.2-28.9-9.7l-3.7-1.2c-10.1-3.3-22.5-7.4-35.6-11.7
|
||||||
|
c-28.5-9.5-63.5-21.1-96.7-31.1l-0.1-0.1c0,0-0.1,0-0.1,0.1C353,11.3,314.4,1.2,295,0.9c-17.5-0.3-58.8,7.3-95.2,13.9
|
||||||
|
c-5.4,1-10.7,2-15.8,2.9c0,0-0.1,0-0.1,0l0,0.1c-4.6,0.8-9.1,1.6-13.4,2.4c-43,7.5-87.7,18.5-127.1,28.2c-9,2.2-17.7,4.4-26,6.4
|
||||||
|
c-8.5,2.1-13.6,5-15.9,9.2c-3.2,5.7-0.7,13.1,2.1,21.6c0.8,2.4,1.6,4.9,2.4,7.5c2,6.9,12.3,21.4,22.3,35.4
|
||||||
|
c7.8,11,15.2,21.3,18.8,28.1c24.1,46,30.2,46.2,77.5,47.2c53.2,1.1,119.3,2.6,169.7,10.8c15.3,2.5,28.8,6,41.9,9.4
|
||||||
|
c18.8,4.8,35.7,9.2,53.1,9.2c20.3,0,41.3-6,66.6-24c15.1-10.8,30.5-21,45.4-30.8c14.9-9.8,30.3-20,45.3-30.8
|
||||||
|
C578.7,124.6,591.5,110.2,589.8,99.3z M293.9,213.2c-49.7-8.1-114.2-9.5-166.9-10.7c6-4.3,11.9-9,17.8-13.9
|
||||||
|
c16.5,1.8,34.7-0.1,51-1.9c11.5-1.2,22.3-2.4,30.6-2c22.6,0.6,43.3,1.9,67.6,5.5V213.2z M226.4,183.6c-1.2-0.1-2.5-0.1-3.8-0.1
|
||||||
|
c-7.7,0-17.1,1-27,2.1c-15.9,1.7-33.5,3.6-49.6,2c7.4-6.3,14.6-12.9,21.7-19.5c0.4,0,0.8,0,1.2,0c15.2-2,27.3-1.8,42.6-1.5
|
||||||
|
c5.6,0.1,11.4,0.2,18.1,0.2c26.4-1.6,48-0.6,64.2,2.9v19.4C269.7,185.5,248.9,184.2,226.4,183.6z M430.7,40.5
|
||||||
|
c-2.8,0.8-5.3,1.7-7.7,2.6c-9.1-2.3-17.5-4.1-24.6-5c-5.7-0.7-11.5-1.8-17.5-3.2c3.2-2.2,6.5-4.4,9.8-6.8
|
||||||
|
C404.2,32,417.8,36.3,430.7,40.5z M391.8,27.2c0.9-0.7,1.9-1.4,2.8-2.2c14.3,4.3,28.9,8.9,43.2,13.5c-1.8,0.4-3.5,0.9-5.2,1.3
|
||||||
|
C419.5,35.6,405.6,31.3,391.8,27.2z M547.9,76.1c-4.2,17-20.3,29-38.5,39c-13-3.9-26.4-7.2-40-9.8c14.1-9.1,28.4-18.8,40.7-30.9
|
||||||
|
l0.7-0.7c12.2-0.3,23.6,0.1,34.2,1.8C546,75.6,547,75.8,547.9,76.1z M507.8,74.5c0.1,0,0.3,0,0.4,0c-12.3,11.8-26.5,21.3-40.5,30.4
|
||||||
|
c-5.8-1.1-11.7-2.2-17.7-3.1c5.5-5.9,9.9-12.8,12.3-20.7c0.4-1.4,0.3-2.7-0.2-3.9c0.9-0.1,1.9-0.2,2.8-0.3
|
||||||
|
c12.4-1.1,24.4-2.2,35.8-2.9C503.4,74.4,505.7,74.5,507.8,74.5z M97.2,66.4c8.6-0.5,17.1-0.7,25.6-0.8
|
||||||
|
c4.8,11.1,35.6,26.5,57.5,36.3c-16.2,4.4-32.3,9.3-48.6,14.3C119.5,104.1,103,82.1,97.2,66.4z M461.3,80.7
|
||||||
|
c-2.4,7.9-6.8,14.8-12.7,20.8c-14.1-2.2-28.4-4-42.7-5.6c8.9-5.2,15.3-10.4,17.3-15.5c0.1-0.1,0.1-0.3,0.1-0.4
|
||||||
|
c12.8-0.7,25.3-1.7,37.6-2.9C461.5,78.3,461.7,79.5,461.3,80.7z M374.4,134.1c-4.7-7.1-7.8-11.2-16.4-17.6
|
||||||
|
c16.9-5.8,33.8-12.6,46.3-19.6c14.6,1.6,29.1,3.4,43.4,5.6C430.9,119.2,403,128.9,374.4,134.1z M123.3,62.6
|
||||||
|
c0.3-5.4,5.2-9.9,13.2-13.7c10.9,1.1,21.7,2.5,32.5,4.2c-6.8,3.2-11.1,7.2-11.7,12.1c-11-0.5-22.3-0.8-33.8-0.8
|
||||||
|
C123.3,63.8,123.2,63.2,123.3,62.6z M266.6,31.5c1.2,3,2.4,6.1,3.7,9.3c-12.3-0.1-25.9,0.2-39.2,1c-4.5-2.7-9.1-5.4-13.8-8
|
||||||
|
C233.9,32.5,250.8,31.8,266.6,31.5z M422.6,79c-2.7,0.1-5.4,0.3-8.2,0.3c-5.3,0.2-10.2,0.3-14.9,0.4c0.2-0.3,0.4-0.7,0.6-1
|
||||||
|
c1.4-2.8,1.3-5.5-0.4-7.8c-2.1-2.8-5.5-5.3-9.9-7.3c5.2-0.7,10.4-1.2,15.7-1.7c5.8,2.7,10.8,5.9,14.5,9.5
|
||||||
|
C422.5,73.7,423.3,76.2,422.6,79z M398.1,79.7c-7.4,0.1-14,0.1-20.2,0.1c-0.5,0-1,0-1.5,0c1.8-3,2.5-5.9,2.2-8.7
|
||||||
|
c-0.2-2-1.7-3.8-4.3-5.3c4.5-0.7,8.9-1.4,13.3-2c5,2.1,8.8,4.7,11.1,7.7c1.5,2,1.6,4.1,0.3,6.6C398.8,78.7,398.5,79.2,398.1,79.7z
|
||||||
|
M211,64c0.1-0.9,0.6-1.7,1.3-2.5c6.3,1.4,12.5,3,18.6,4.5c-0.1,0.2-0.2,0.4-0.3,0.7c-0.6,1.7-0.7,3.6-0.2,5.8
|
||||||
|
c-6.1-0.9-12.4-1.8-18.9-2.6C210.9,68,210.7,66,211,64z M356.4,71.4c0.9,2.3,0.5,5.3-1.1,8.6c-6.4,0.2-13.1,0.5-20.5,1
|
||||||
|
c1.5-2.7,2.2-5.1,1.8-7c6.4-1.7,12.6-3.2,18.7-4.5C355.8,70.1,356.2,70.7,356.4,71.4z M347.1,90.4c-6.2-0.6-12.5-1.1-18.7-1.7
|
||||||
|
c1.8-1.6,3.3-3.2,4.6-4.9c0.4-0.5,0.8-1,1.1-1.5c7.4-0.6,14.2-0.9,20.6-1c-0.4,0.8-0.9,1.5-1.5,2.3
|
||||||
|
C351.6,85.9,349.6,88.2,347.1,90.4z M235.3,80.3c-1.5-2.2-2.6-4.3-3.2-6.3c7.4,1.1,14.5,2.3,21.1,3.5c0.8,1.5,1.8,3.2,3.1,4.8
|
||||||
|
c1.1,1.5,2.4,2.9,3.9,4.4c-5.9,0.5-11.8,1.2-17.5,2C239.7,86,237.2,83.2,235.3,80.3z M231.7,67.2c0.1-0.3,0.2-0.6,0.4-0.8
|
||||||
|
c6.7,1.7,13.1,3.5,19.5,5.4c0,1.3,0.4,2.8,1.1,4.5c-6.6-1.2-13.6-2.3-20.9-3.5C231.1,70.7,231.1,68.7,231.7,67.2z M332.3,70.9
|
||||||
|
c-5.5,1.8-11.7,4.1-19.2,7.5c-1.2-0.4-2.8-0.7-4.7-0.8c4.3-2.8,8.5-5.5,12.7-8C325.8,69.5,329.7,69.8,332.3,70.9z M335.2,73.3
|
||||||
|
c-6.5,1.8-13.2,3.7-20.2,5.9l0.1,0.4c-0.2-0.2-0.4-0.4-0.7-0.6c7.5-3.3,13.7-5.7,19.3-7.4C334.3,72.1,334.8,72.6,335.2,73.3z
|
||||||
|
M333.4,81.2c-5.4,0.4-11.3,1-17.7,1.7c0.2-0.6,0.3-1.1,0.2-1.6c0-0.4-0.2-0.7-0.4-1c6.9-2.2,13.5-4.1,20-5.8
|
||||||
|
C335.8,76.1,335.1,78.5,333.4,81.2z M257.2,81.7c-1-1.3-1.8-2.6-2.5-3.8c6.5,1.2,12.6,2.4,18.2,3.5c0.3,1.1,1,2.4,2.2,3.7
|
||||||
|
c0.2,0.2,0.4,0.4,0.6,0.7c-4.7,0.2-9.4,0.5-14,1C260,85,258.5,83.3,257.2,81.7z M254.5,68.6c7.3,2.8,14.4,5.7,21.3,8.7
|
||||||
|
c-0.6,0.2-1.2,0.4-1.6,0.6l0.1-0.2c-6.9-2.3-14.1-4.6-21.5-6.8c0-0.1,0-0.1,0-0.2C253,69.8,253.6,69.1,254.5,68.6z M281.8,76.9
|
||||||
|
c-1.4,0-2.7,0-3.8,0.1c-7.1-3.1-14.4-6.1-21.8-9c0.9-0.2,2-0.3,3.3-0.3c2.9,0,6.6,0.5,10.9,1.1C275.1,72,279,74.8,281.8,76.9z
|
||||||
|
M289.1,78.4l0.1-0.1c1.6,0.1,3.2,0.1,4.9,0.1c1.5,0,3,0,4.4,0c6.1,0,11.6,0,14.4,1.1l0.1,0.1c0,0,0.1,0,0.1-0.1
|
||||||
|
c1,0.4,1.6,1,1.7,1.7c0.1,0.9-0.5,2.2-1.6,3.5c-3.2,3.7-10.2,7.4-18.7,7.4c-8,0-15-4-18.5-7.9c-1.4-1.6-2.2-3.2-2-4.2
|
||||||
|
c0.2-1.2,1.6-1.8,3.8-2c0.1,0,0.1,0.1,0.2,0.1l0.1-0.1c0.8-0.1,1.8-0.1,2.8-0.1c1.8,0,3.8,0.1,6,0.2
|
||||||
|
C287.5,78.2,288.3,78.3,289.1,78.4C289,78.3,289.1,78.3,289.1,78.4z M273.4,78.6c-0.3,0.4-0.5,0.8-0.6,1.4c0,0.1,0,0.1,0,0.2
|
||||||
|
c-5.8-1.2-12.1-2.4-18.8-3.6c-0.8-1.7-1.2-3.2-1.3-4.4C259.8,74.2,266.7,76.4,273.4,78.6z M276.9,86.8c1.7,1.5,3.9,3,6.5,4.1
|
||||||
|
c-3.1,1.5-6.3,2.9-9.5,4.2c-4.2-2.1-7.8-4.7-10.9-7.4C267.5,87.3,272.1,87,276.9,86.8z M284.8,91.6c2.7,1.1,5.8,1.8,9.1,1.8v6.8
|
||||||
|
c-6.9-0.1-13.2-1.8-18.7-4.4C278.4,94.5,281.6,93.1,284.8,91.6z M295,93.4c3.4-0.1,6.6-0.7,9.4-1.7c3.2,1.5,6.6,3,10,4.4
|
||||||
|
c-5.7,2.5-12.3,4-19.4,4.1V93.4z M305.9,91.1c2-0.9,3.8-1.9,5.3-3l0,0c4.7,0.5,9.5,1,14.3,1.5c-2.8,2.2-6,4.2-9.7,5.9
|
||||||
|
C312.5,94,309.1,92.6,305.9,91.1z M312.5,87.1c0.5-0.5,1-1,1.4-1.4c0.5-0.5,0.8-1.1,1.1-1.6c6.3-0.7,12.1-1.3,17.5-1.7
|
||||||
|
c-0.2,0.2-0.3,0.5-0.5,0.7c-1.4,1.8-3.2,3.7-5.3,5.4C322,88.1,317.2,87.6,312.5,87.1z M306.4,77.4c-2.1-0.1-4.4-0.1-6.9-0.1
|
||||||
|
c1.5-2.4,2.9-4.7,4.2-7.1c1.6-0.1,3.1-0.2,4.7-0.2c3.7-0.2,7.2-0.4,10.4-0.5C314.6,72,310.5,74.6,306.4,77.4z M298.1,77.3
|
||||||
|
c-1.3,0-2.6,0-3.9,0c-1.5,0-3-0.1-4.5-0.1c-1.4-2.3-2.8-4.5-4.1-6.8c2.6,0.2,5.3,0.3,8,0.2c3,0,5.9-0.2,8.7-0.3
|
||||||
|
C301,72.6,299.6,75,298.1,77.3z M288.3,77.1c-0.5,0-0.9,0-1.4-0.1c-1.3-0.1-2.6-0.1-3.8-0.1l0.2-0.3c-2.5-1.8-6.1-4.4-10.5-7.5
|
||||||
|
c3.5,0.5,7.3,0.9,11.4,1.2C285.5,72.6,286.8,74.8,288.3,77.1z M271,67.6c-0.1,0-0.2,0-0.3,0c-2.4-1.6-4.9-3.4-7.6-5.3
|
||||||
|
c0.8,0.1,1.5,0.1,2.3,0.2c4.8,0.4,9.9,0.9,15.2,1.2c0.9,1.8,1.8,3.5,2.8,5.3C279,68.7,274.7,68.1,271,67.6z M268.3,67.3
|
||||||
|
c-6.1-0.8-10.9-1.2-13.8,0c-4.9-1.9-9.9-3.7-14.9-5.4c2.1-0.4,4.6-0.6,7.4-0.6c4,0,8.7,0.3,13.8,0.8
|
||||||
|
C263.4,63.9,265.9,65.7,268.3,67.3z M253.1,68.1c-0.7,0.6-1.2,1.4-1.5,2.4c0,0.1,0,0.1,0,0.2c-6.1-1.8-12.4-3.6-18.9-5.2
|
||||||
|
c1.1-1.4,2.7-2.3,4.7-2.9C242.7,64.2,248,66.1,253.1,68.1z M261.3,87.9c3.1,2.8,6.8,5.6,11.1,7.9c-3.2,1.3-6.4,2.5-9.5,3.7
|
||||||
|
c-1,0.4-2,0.8-3,1.2c-6.2-3.1-11.6-6.8-16-10.7C249.6,89.1,255.4,88.4,261.3,87.9z M263.3,100.5c3.4-1.3,6.9-2.6,10.4-4.1
|
||||||
|
c5.9,2.9,12.7,4.9,20.1,5v7.5c-12.1-0.2-23.2-3.2-32.6-7.6C262,101,262.6,100.7,263.3,100.5z M295,101.4c7.6-0.1,14.7-1.9,20.8-4.7
|
||||||
|
c1.8,0.8,3.7,1.5,5.5,2.3c2.4,1,4.9,2,7.3,3.1c-9.5,4.1-20.8,6.8-33.4,6.8c-0.1,0-0.1,0-0.2,0V101.4z M321.8,97.9
|
||||||
|
c-1.5-0.6-3-1.2-4.5-1.9c3.7-1.8,7.1-4,9.9-6.3c6.2,0.6,12.5,1.2,18.8,1.8c-4.2,3.6-9.6,7.1-15.8,9.9
|
||||||
|
C327.3,100.2,324.5,99.1,321.8,97.9z M336.3,73c-0.3-0.7-0.7-1.2-1.3-1.7c6.2-1.9,11.6-3.1,17.4-4.2c0.8,0.5,1.5,1,2.1,1.5
|
||||||
|
C348.5,69.8,342.5,71.3,336.3,73z M333.9,70.4c-2.4-1.4-6.1-1.9-10.9-2c2.8-1.7,5.6-3.3,8.3-4.8c8.2,0.1,14.9,0.7,19.4,2.6
|
||||||
|
C345.2,67.3,339.9,68.5,333.9,70.4z M320.7,68.3c-3.7,0-7.8,0.2-12.4,0.5c-1.3,0.1-2.6,0.1-4,0.2c0.9-1.7,1.8-3.3,2.7-5
|
||||||
|
c2.3-0.1,4.5-0.1,6.8-0.2c5.4-0.2,10.5-0.3,15.2-0.3C326.2,65.1,323.5,66.7,320.7,68.3z M303,69.1c-3.1,0.1-6.2,0.3-9.4,0.3
|
||||||
|
c-3,0-5.9-0.1-8.7-0.3c-1-1.8-2-3.6-2.9-5.3c3.7,0.2,7.5,0.4,11.4,0.4c4.2,0,8.3-0.1,12.3-0.2C304.8,65.7,303.9,67.4,303,69.1z
|
||||||
|
M293.4,63.1c-4.1,0-8.1-0.2-12-0.4c-0.9-1.7-1.7-3.4-2.5-5.1c5,0.1,10.1,0.2,15.2,0.2c5.1,0,10,0.1,14.7,0.2
|
||||||
|
c-0.8,1.6-1.6,3.3-2.5,5C302.1,63,297.8,63.1,293.4,63.1z M280.1,62.6c-5.1-0.3-10-0.8-14.5-1.2c-1.5-0.1-3-0.3-4.4-0.4
|
||||||
|
c-2-1.3-4-2.7-6.1-4.1c3.6,0.1,7.4,0.2,11.2,0.3c3.7,0.1,7.6,0.2,11.4,0.3C278.4,59.2,279.2,60.9,280.1,62.6z M258.8,60.8
|
||||||
|
c-8.9-0.7-16.3-1-21.4,0.4c-3.9-1.3-7.8-2.6-11.7-3.9c7.2-0.8,16.7-0.8,27.1-0.5C254.9,58.2,256.9,59.5,258.8,60.8z M235.6,61.8
|
||||||
|
c-1.8,0.8-3.2,1.8-4.1,3.2c-5.9-1.5-12-3-18.1-4.4c2.1-1.4,5.3-2.3,9.5-2.9C227.2,59,231.4,60.4,235.6,61.8z M230.7,73.9
|
||||||
|
c0.7,2.2,1.9,4.6,3.6,7.1c1.8,2.7,4.1,5.4,6.9,8.1c-3.8,0.5-7.5,1.1-11.2,1.8c-5.3-3.7-9.9-7.6-13.3-11.6c-2.3-2.7-3.9-5.4-4.8-8
|
||||||
|
C218.4,72.1,224.7,72.9,230.7,73.9z M242.3,90.1c4.4,4,9.9,7.9,16.1,11.1c-1.9,0.7-3.7,1.5-5.6,2.2c-7.6-3.4-15-7.3-21.4-11.6
|
||||||
|
C235,91.1,238.7,90.6,242.3,90.1z M259.8,101.8c9.7,4.8,21.4,8,34.1,8.2v5.1c-9.5-0.3-24.7-4.6-39.6-11.1
|
||||||
|
C256.1,103.2,258,102.5,259.8,101.8z M295,110c0.1,0,0.1,0,0.2,0c13.2,0,25.1-2.9,34.9-7.3c1.9,0.8,3.8,1.7,5.7,2.5
|
||||||
|
c-15.4,6-31.4,9.9-40.8,9.9V110z M331.5,102c6.3-3,11.7-6.6,15.9-10.4c3.8,0.3,7.5,0.7,11.2,1c0.7,0.1,1.4,0.1,2,0.2
|
||||||
|
c-6.8,4.4-15,8.4-23.4,11.8C335.4,103.7,333.5,102.9,331.5,102z M358.8,91.5c-3.4-0.3-6.8-0.6-10.2-0.9c2.2-2.1,4.1-4.2,5.5-6.3
|
||||||
|
c0.7-1,1.3-2,1.9-3c6.2-0.1,12.1-0.2,18.3-0.2c-0.6,0.8-1.3,1.7-2,2.5c-2.6,2.8-6,5.6-10,8.3C361.1,91.7,360,91.6,358.8,91.5z
|
||||||
|
M356.6,80c1.5-3.4,1.9-6.5,0.9-9v0c-0.2-0.6-0.6-1.2-0.9-1.8c5.4-1.2,10.8-2.2,16.1-3.1c3,1.5,4.6,3.3,4.8,5.2
|
||||||
|
c0.3,2.7-0.5,5.6-2.4,8.5C368.9,79.9,362.8,79.9,356.6,80z M355.8,68.2c-0.5-0.6-1.1-1.1-1.8-1.6c0.6-0.1,1.2-0.2,1.8-0.4
|
||||||
|
c3.5-0.7,7.2-1.4,11.3-2.3c1.4,0.4,2.6,0.9,3.7,1.3C365.9,66.1,360.9,67.1,355.8,68.2z M355.6,65.1c-1,0.2-2,0.4-3,0.6
|
||||||
|
c-4.4-2.3-11.1-3.2-19.3-3.3c1.8-1,3.7-2,5.5-3c10.9,0.9,19.6,2.2,26,3.9C361.5,64,358.4,64.6,355.6,65.1z M331,62.4
|
||||||
|
c-5.3,0-11.1,0.1-17.2,0.3c-2,0.1-4.1,0.1-6.1,0.2c0.8-1.7,1.6-3.3,2.4-4.9c9.9,0.2,18.8,0.6,26.6,1.3
|
||||||
|
C334.8,60.2,332.9,61.3,331,62.4z M310.6,56.8c0.7-1.5,1.4-3,2.1-4.5c10.1,0.5,21.2,1.3,32.2,2.4c-2.1,1.1-4.2,2.3-6.3,3.5
|
||||||
|
C329.7,57.5,320.1,57,310.6,56.8z M309.3,56.8c-5.1-0.1-10.3-0.2-15.3-0.2c-5.2,0-10.5-0.1-15.7-0.2c-0.9-1.8-1.7-3.7-2.5-5.5
|
||||||
|
c6.7,0,13.2,0.2,19,0.5c2,0.1,4.1,0.2,6.3,0.3c3.2,0.2,6.7,0.3,10.3,0.5C310.7,53.7,310.1,55.2,309.3,56.8z M277,56.3
|
||||||
|
c-3.6-0.1-7.2-0.2-10.8-0.3c-4.5-0.1-8.9-0.3-13-0.4c-2.1-1.4-4.3-2.8-6.5-4.2c8.4-0.4,16.9-0.6,25.2-0.6c0.9,0,1.8,0,2.7,0
|
||||||
|
C275.3,52.7,276.2,54.5,277,56.3z M251,55.6c-11.1-0.2-20.8-0.1-28,0.9c-2.7-0.8-5.4-1.7-8.1-2.5c8.8-1.2,19.1-2,29.8-2.5
|
||||||
|
C246.9,52.9,249,54.3,251,55.6z M220.5,57c-3.8,0.7-6.7,1.8-8.5,3.4c-4.6-1.1-9.3-2.1-14-3c3.8-1.1,8.6-2,14.2-2.8
|
||||||
|
C215,55.3,217.7,56.1,220.5,57z M211,61.3c-0.6,0.8-1,1.6-1.2,2.6c-0.3,2-0.2,4,0.3,6c-6.3-0.8-12.8-1.5-19.4-2.2
|
||||||
|
c-0.7-1-1.2-1.9-1.5-2.8c-0.6-1.8-0.3-3.2,1-4.2c1.2-1,3.1-1.9,5.5-2.7C200.9,59,206,60.1,211,61.3z M210.6,71.1
|
||||||
|
c1,2.9,2.7,5.8,5.2,8.9c3.2,3.8,7.6,7.6,12.6,11.1c-1.6,0.3-3.2,0.6-4.9,0.9c-14.3-8.1-26.5-16.5-31.8-23
|
||||||
|
C198.2,69.6,204.5,70.3,210.6,71.1z M229.8,92c6.5,4.4,13.9,8.4,21.6,11.9c-0.9,0.4-1.8,0.7-2.7,1.1c-7.9-3.8-16-8-23.6-12.2
|
||||||
|
C226.7,92.6,228.2,92.3,229.8,92z M252.8,104.6c15.4,6.8,31.3,11.3,41.1,11.6v5.4c-7.3-0.4-25-7-43.8-16
|
||||||
|
C251,105.3,251.9,104.9,252.8,104.6z M295,116.3C295.1,116.3,295.1,116.3,295,116.3c9.8,0,26.4-4.1,42.2-10.4
|
||||||
|
c2.2,1,4.3,2.1,6.4,3.1c-20.5,7.3-40.5,12.5-48.6,12.7V116.3z M338.7,105.2c8.7-3.5,17.1-7.7,23.9-12.3c5.1,0.5,10.3,0.9,15.4,1.4
|
||||||
|
c-9.6,5-21.2,9.8-32.9,14.1C343,107.3,340.9,106.3,338.7,105.2z M364.1,92c3.6-2.5,6.6-5.1,9-7.7c1-1.1,1.9-2.2,2.6-3.3
|
||||||
|
c0.7,0,1.5,0,2.2,0c5.9,0,12.2,0,19.3-0.1c-3.4,4-9.6,8.3-17.4,12.5C374.6,92.9,369.3,92.4,364.1,92z M372.7,64.9
|
||||||
|
c-1.1-0.5-2.3-1-3.6-1.5c3.2-0.7,6.6-1.6,10.4-2.5c2.1,0.6,4.1,1.3,6,2C381.3,63.5,377,64.2,372.7,64.9z M367,62.8
|
||||||
|
c-6.8-2-16-3.4-26.4-4.4c1.7-0.9,3.3-1.8,5-2.7c0.4-0.2,0.9-0.5,1.3-0.7c11,1.2,21.6,2.9,30.5,5.4C373.6,61.3,370.1,62.1,367,62.8z
|
||||||
|
M348.6,54c3.1-1.7,6.2-3.4,9.3-5.1c11.6,1.9,23,4.3,33.2,7.5c-2.7,0.9-5.6,1.8-8.7,2.7c-1,0.3-1.9,0.5-2.8,0.8
|
||||||
|
C370.5,57.1,359.8,55.3,348.6,54z M346.6,53.8c-11.3-1.3-22.9-2-33.4-2.6c1.1-2.4,2.1-4.8,3-7.1c12,0.9,26,2.3,39.8,4.4
|
||||||
|
C352.9,50.3,349.7,52,346.6,53.8z M311.9,51.1c-3.8-0.2-7.4-0.4-10.8-0.5c-2.2-0.1-4.3-0.2-6.3-0.3c-5.7-0.3-12.4-0.5-19.6-0.5
|
||||||
|
c-1.2-2.7-2.3-5.3-3.3-7.8c8.5,0.1,16.4,0.4,22.9,0.7c5.5,0.3,12.3,0.7,20,1.3C314,46.3,313,48.7,311.9,51.1z M274.1,49.8
|
||||||
|
c-9.2,0-19.2,0.2-29.1,0.6c-3.9-2.5-7.9-5-12-7.5c11.2-0.7,22.5-0.9,33-0.9c1.6,0,3.3,0,4.9,0C271.8,44.5,272.9,47.1,274.1,49.8z
|
||||||
|
M243,50.5c-11.1,0.6-21.8,1.5-30.9,2.8c-6.8-2-13.7-3.9-20.4-5.7c11.6-2.3,25.3-3.7,39.2-4.6C235,45.5,239.1,48,243,50.5z
|
||||||
|
M209.4,53.6c-5.4,0.9-10.2,1.9-13.8,3.2c-7.5-1.5-15-2.9-22.6-4.2c4.6-1.8,10.1-3.3,16.1-4.5C195.9,49.8,202.6,51.7,209.4,53.6z
|
||||||
|
M193.6,57.6c-1.7,0.7-3.1,1.4-4.1,2.3c-1.7,1.4-2.1,3.3-1.3,5.5c0.3,0.7,0.6,1.5,1.1,2.3c-10-1-20.3-1.7-30.9-2.3
|
||||||
|
c0.7-4.8,5.3-8.7,12.5-11.8C178.6,54.7,186.1,56.1,193.6,57.6z M190.2,68.8c4.9,6.6,17,15.1,31.5,23.5c-7.6,1.4-15,3.1-22.4,4.8
|
||||||
|
c-16.7-8.6-30.7-17.4-37.2-24.4c-2.3-2.5-3.5-4.6-3.6-6.3C169.3,67,179.9,67.8,190.2,68.8z M223.2,93.2c7.6,4.4,15.8,8.6,23.9,12.5
|
||||||
|
c-4.5,2-9,4.2-13.3,6.7c-0.3,0.1-0.5,0.3-0.8,0.5c-11-4.6-22.1-9.8-32.3-15C208.2,96.2,215.6,94.6,223.2,93.2z M234.4,113.4
|
||||||
|
c4.5-2.7,9.3-5,14.1-7c19.2,9.2,37.5,16.1,45.4,16.4v8.9C282.7,131.4,258.9,123.7,234.4,113.4C234.4,113.4,234.4,113.4,234.4,113.4
|
||||||
|
z M295,122.8c8.4-0.2,29.2-5.5,50.1-13c3.4,1.8,6.5,3.7,9.4,5.8c0.3,0.2,0.7,0.5,1,0.7c-26.6,8.9-52.7,15.2-60.5,15.4V122.8z
|
||||||
|
M355.2,114.6c-2.7-1.9-5.6-3.7-8.6-5.4c12-4.4,24-9.4,33.6-14.7c7.4,0.7,14.9,1.4,22.3,2.2c-12.4,6.8-29,13.4-45.6,19
|
||||||
|
C356.4,115.4,355.8,115,355.2,114.6z M382,93.6c7.6-4.3,13.6-8.6,16.7-12.7c4.9-0.1,10.1-0.2,15.7-0.4c2.6-0.1,5.2-0.2,7.7-0.3
|
||||||
|
c-2.1,5.1-8.7,10.4-17.9,15.6C396.8,95,389.4,94.3,382,93.6z M387.8,62.7c-1.9-0.8-4-1.6-6.2-2.3c0.4-0.1,0.7-0.2,1.1-0.3
|
||||||
|
c3.8-1,7.1-2.1,10.2-3.2c3.7,1.2,7.2,2.5,10.5,4C398.1,61.4,392.9,62,387.8,62.7z M394.6,56.3c2.5-0.9,4.7-1.8,6.9-2.7
|
||||||
|
c6.6,2,13,4,18.9,6c-5,0.3-9.9,0.6-14.7,1.1C402.3,59.1,398.6,57.6,394.6,56.3z M392.9,55.7c-10-3.2-21.4-5.7-33.5-7.7
|
||||||
|
c2.4-1.3,4.7-2.7,7.1-4.1c11.3,2.8,22.7,5.9,33.4,9.1C397.6,53.9,395.3,54.8,392.9,55.7z M357.6,47.7c-13.2-2.1-27.2-3.6-40.9-4.7
|
||||||
|
c1.3-3.1,2.4-6.1,3.5-8.9c13.4,2.2,29,5.5,44.7,9.4C362.4,44.9,360,46.3,357.6,47.7z M315.4,42.9c-6.9-0.5-13.7-1-20.4-1.4
|
||||||
|
c-6.9-0.4-14.9-0.7-23.5-0.8c-1.3-3.2-2.5-6.4-3.7-9.3c6.3-0.1,12.5-0.2,18.3-0.2c2.5,0,4.9,0,7.2,0c6.7,0.1,15.5,1,25.6,2.6
|
||||||
|
C317.9,36.8,316.7,39.8,315.4,42.9z M229.1,41.9c-14.3,0.9-28.2,2.5-39.9,5c-8.8-2.3-17.4-4.3-25.7-6.1c15.1-3.1,33.1-5.3,51.8-6.8
|
||||||
|
C219.9,36.5,224.5,39.2,229.1,41.9z M186.7,47.4c-6,1.4-11.3,3-15.7,4.9c-10.7-1.7-21.5-3.2-32.3-4.3c6-2.6,13.6-4.8,22.1-6.6
|
||||||
|
C169.1,43.1,177.8,45.2,186.7,47.4z M157.2,66.4c0.1,2,1.4,4.4,3.9,7.1c6.5,7,20,15.6,36.1,24.1c-5.2,1.2-10.3,2.6-15.4,3.9
|
||||||
|
c-29.4-13-53.5-26.7-57.9-35.9C135.2,65.6,146.4,65.8,157.2,66.4z M198.8,98.4c10.3,5.3,21.6,10.6,32.8,15.4
|
||||||
|
c-2.5,1.5-5,3.1-7.4,4.8c-13.7-5-27.6-10.6-40.6-16.3C188.6,100.9,193.7,99.6,198.8,98.4z M233,114.3
|
||||||
|
c24.9,10.4,49.2,18.2,60.9,18.6v5.2c-14.9-1.6-41-9.1-68.3-19C228,117.4,230.5,115.8,233,114.3z M295,132.9
|
||||||
|
c7.9-0.3,34.5-6.7,61.6-15.8c8.8,6.4,11.9,10.5,16.5,17.3c-29.1,5.2-58.8,5.6-78.1,3.8V132.9z M423.8,78.9c0.7-3-0.3-5.9-3-8.4
|
||||||
|
c-3.5-3.3-7.9-6.2-13.1-8.8c5.2-0.4,10.3-0.8,15.6-1.1c7,2.4,13.3,4.8,18.5,7.1c1.2,0.5,3.1,1.4,5.3,2.4c3.7,1.7,8.3,3.8,11.6,5.2
|
||||||
|
c0.6,0.2,1,0.6,1.4,0.9C448.3,77.2,436.1,78.3,423.8,78.9z M459.2,74.1c-3.3-1.4-7.9-3.5-11.6-5.2c-2.2-1-4.1-1.9-5.3-2.4
|
||||||
|
c-4.6-2-10-4-15.9-6.1c6.6-0.3,13.4-0.5,20.3-0.7c17.9,5.7,35.5,11,48.7,13.4c-9.8,0.6-20,1.6-30.5,2.5c-1.1,0.1-2.2,0.2-3.3,0.3
|
||||||
|
C461,75.2,460.2,74.5,459.2,74.1z M423.5,59.4c-6.3-2.2-13.1-4.4-20.3-6.6c2.5-1.1,4.9-2.2,7.3-3.2c0.5-0.2,1-0.5,1.6-0.7
|
||||||
|
c7.9,2.3,16.7,5.1,25.7,8c1.8,0.6,3.7,1.2,5.5,1.7C436.5,58.8,430,59.1,423.5,59.4z M410,48.6c-2.8,1.2-5.6,2.5-8.5,3.8
|
||||||
|
c-10.7-3.2-22.2-6.4-33.6-9.3c1.9-1.1,3.7-2.2,5.6-3.4c6.3,1.6,12.4,3,18.4,4.1c5,0.9,11.4,2.6,18.6,4.7
|
||||||
|
C410.3,48.5,410.1,48.5,410,48.6z M366.3,42.7c-16.1-4-32-7.4-45.7-9.7c0.2-0.6,0.5-1.2,0.7-1.8c0.7-1.7,1.3-3.3,1.9-4.9
|
||||||
|
c9.8,2.2,19.9,5,29.8,7.8c6.3,1.8,12.6,3.5,18.9,5.2C370,40.4,368.1,41.6,366.3,42.7z M320.2,30.8c-0.3,0.7-0.5,1.3-0.8,2
|
||||||
|
c-10.3-1.7-19.2-2.6-26-2.7c-1.6,0-11.6-0.1-25.9,0.3c-1-2.6-1.9-5-2.9-7.3c9.7-0.4,19.1-0.7,28-0.8c9-0.1,19,1.5,29.5,3.8
|
||||||
|
C321.4,27.6,320.8,29.2,320.2,30.8z M266.2,30.4c-14,0.3-32,1-50.4,2.5c-3.4-1.9-6.7-3.7-10.1-5.4c19.2-2,38.9-3.5,57.6-4.4
|
||||||
|
C264.3,25.4,265.2,27.9,266.2,30.4z M213.7,33.1c-18.3,1.5-36.9,3.8-52.6,7.1c-6-1.3-11.8-2.5-17.4-3.6c17.9-3.6,38.5-6.6,59.9-8.9
|
||||||
|
C207,29.5,210.3,31.2,213.7,33.1z M158.4,40.8c-8.4,1.9-15.9,4.2-21.9,6.9c-9.4-0.9-18.7-1.6-28-2c8.8-3.1,19.8-5.9,32.1-8.5
|
||||||
|
C146.4,38.3,152.3,39.5,158.4,40.8z M134.6,48.7c-7.5,3.8-12.1,8.3-12.5,13.8c0,0.6,0,1.3,0.2,2c-8.5,0.1-17,0.3-25.6,0.8
|
||||||
|
c-1.3-3.9-2-7.3-1.7-10.1c0.3-2.7,1.5-4.5,3.6-5.5c2.1-1,4.4-2,7-2.9C115.2,47.1,124.9,47.8,134.6,48.7z M181.9,102.7
|
||||||
|
c4.1,1.8,7.9,3.4,11,4.8c10,4.2,20.2,8.2,30.2,11.8c-10.1,7-19.8,14.9-29.3,23.3c-20.6-2.6-40.2-8.3-56.2-20.9
|
||||||
|
c-1.5-1.2-3.2-2.8-5.1-4.5C149.2,112.1,165.5,107.1,181.9,102.7z M224.5,119.8c28.6,10.4,55.1,18,69.4,19.5v7.8
|
||||||
|
c-14.1-2.5-30.9-2.5-48.7-2.4c-16.2,0.1-33.3,0.1-49.8-1.8C204.8,134.5,214.5,126.6,224.5,119.8z M295,139.3
|
||||||
|
c6.4,0.6,13.9,0.9,22.2,0.9c17.1,0,37.2-1.4,56.6-4.8c3.9,7.5,8.5,14.6,13.9,21.3c-21.5,7.5-38.9,3.2-62.3-2.6
|
||||||
|
c-8.9-2.2-18.9-4.7-30.3-6.9V139.3z M375,135.2c4.1-0.7,8.2-1.6,12.2-2.5c21.1-4.9,46.1-13.8,61.9-30c5.8,0.9,11.5,1.9,17.2,3
|
||||||
|
c-1.3,0.8-2.5,1.6-3.8,2.4c-11.8,7.6-24.1,15.5-35.3,24.5c-14.9,12-27.2,19.4-38.4,23.5C383.5,149.7,378.9,142.7,375,135.2z
|
||||||
|
M501,72.8c-12.9-1.7-31.9-7.3-50.6-13.1c7.1-0.1,14.4-0.1,21.9-0.1c14.3,5.1,26.7,9.9,33.9,13C504.5,72.7,502.7,72.7,501,72.8z
|
||||||
|
M446.9,58.6c-2.9-0.9-5.9-1.9-8.8-2.8c-8.6-2.7-16.9-5.4-24.4-7.6c3-1.4,6.1-2.7,9.4-3.9c14.8,3.8,31.2,9,45.9,14.1
|
||||||
|
C461.3,58.4,454,58.5,446.9,58.6z M412,47.7c-7.8-2.3-14.6-4.1-20-5.1c-5.6-1-11.3-2.3-17.2-3.8c1.6-1,3.2-2,4.8-3.1
|
||||||
|
c6.4,1.5,12.6,2.7,18.6,3.5c6.6,0.8,14.5,2.5,22.9,4.6C418,45.1,415,46.4,412,47.7z M373.3,38.4c-6.6-1.7-13.4-3.6-20-5.4
|
||||||
|
c-9.9-2.8-20-5.6-29.7-7.8c0.6-1.6,1.2-3.1,1.8-4.5c7.5,1.9,15.3,4.2,23.3,6.6c9.7,2.9,19.6,5.8,29.3,8.2
|
||||||
|
C376.4,36.4,374.9,37.5,373.3,38.4z M322.4,24.9c-10.6-2.3-20.7-3.9-29.9-3.8c-9.1,0.1-18.6,0.4-28.4,0.8c-0.7-1.6-1.3-3.1-1.9-4.6
|
||||||
|
c12-0.9,23.1-1.4,32.8-1.5c0.1,0,0.3,0,0.4,0c8.5,0,18.3,1.8,28.9,4.5C323.7,21.8,323.1,23.3,322.4,24.9z M262.9,22
|
||||||
|
c-19.2,0.9-39.4,2.5-59.1,4.6c-1.6-0.8-3.1-1.6-4.7-2.3c21.6-3,42.8-5.4,61.8-6.8C261.6,18.9,262.2,20.4,262.9,22z M201.7,26.8
|
||||||
|
c-21.8,2.4-42.9,5.6-61,9.3c-2.3-0.4-4.6-0.8-6.8-1.2c20.1-3.8,41.8-7.3,63.2-10.3C198.6,25.3,200.1,26.1,201.7,26.8z M137.7,36.7
|
||||||
|
c-12.6,2.7-23.6,5.7-32.2,8.9c-7.2-0.2-14.3-0.3-21.4-0.2c13.6-3.3,29.4-6.7,46.5-10C132.9,35.9,135.3,36.3,137.7,36.7z
|
||||||
|
M102.8,46.7c-1.6,0.7-3.1,1.3-4.6,2c-2.5,1.2-3.9,3.3-4.3,6.4c-0.3,2.8,0.3,6.3,1.6,10.3C84,66,72.4,67.1,60.9,68.6
|
||||||
|
c-2.1-4.8-3-9-2.1-12.2c0.9-3,3.2-5,7.1-6.1c4-1.2,8.4-2.4,13-3.6C86.8,46.5,94.7,46.5,102.8,46.7z M95.9,66.5
|
||||||
|
c5.7,15.8,22,37.7,34.5,50.2c-1.4,0.4-2.9,0.9-4.3,1.3c-7.3,2.2-14.6,4.5-22,6.8c-2.8-3.3-5.9-6.8-9-10.5
|
||||||
|
C82.4,99.8,67.6,82.7,61.4,69.7C72.9,68.2,84.4,67.1,95.9,66.5z M126.4,119.1c1.6-0.5,3.3-1,4.9-1.5c2,2,3.9,3.7,5.6,5
|
||||||
|
c15.9,12.6,35.4,18.4,55.7,21c-6.7,6-13.3,12.1-19.8,18.1c-1.9,1.7-3.7,3.5-5.6,5.2c-32.2,0.5-36.5-5.5-53.4-29.6l-1.4-2
|
||||||
|
c-1.9-2.8-4.6-6-7.6-9.6C112.1,123.5,119.3,121.3,126.4,119.1z M173.7,162.6c6.8-6.3,13.6-12.6,20.6-18.8c17,2.1,34.5,2,51,2
|
||||||
|
c17.8-0.1,34.6-0.1,48.7,2.4v20.3c-16.3-3.5-37.8-4.4-64.2-2.8c-6.7,0-12.5-0.1-18.1-0.2c-15.3-0.3-27.4-0.5-42.6,1.5
|
||||||
|
C170.6,165.5,172.1,164,173.7,162.6z M295,148.4c11.3,2.1,21.3,4.6,30.1,6.8c14.7,3.7,27,6.7,39.4,6.7c7.8,0,15.6-1.2,24-4.2
|
||||||
|
c7.3,8.9,15.8,16.9,25,23.7c-31.2,10.6-74.2-0.9-102.7-8.6c-5.7-1.5-10.7-2.9-14.9-3.8c-0.3-0.1-0.6-0.1-0.9-0.2V148.4z
|
||||||
|
M389.7,157.3c11.2-4.2,23.5-11.6,38.3-23.6c11.2-9,23.4-16.9,35.2-24.5c1.6-1,3.2-2.1,4.8-3.1c13.6,2.6,27,5.8,40,9.7
|
||||||
|
c-6.6,3.6-13.5,6.9-20.1,10.1c-12.7,6.2-24.8,12-33.6,18.6c-7.5,6.7-13.6,13.1-19.1,18.8c-8,8.3-14.3,14.9-20.4,17.6
|
||||||
|
C405.5,174.2,397,166.2,389.7,157.3z M508.9,72.5c-6.2-2.8-18.5-7.7-33.1-12.9c3.2,0,6.5,0,9.9,0.1c5.4,2,10.2,3.9,14.1,5.6
|
||||||
|
c3.3,1.4,11.7,3.1,22.3,5.2c3.7,0.8,7.7,1.6,11.8,2.4C525.8,72.3,517.5,72.2,508.9,72.5z M472.5,58.4c-15-5.3-32.1-10.8-47.5-14.8
|
||||||
|
c2.4-0.9,5-1.7,7.7-2.5c18.7,6.1,36.1,12.2,49.8,17.4C479.1,58.5,475.8,58.4,472.5,58.4z M379.4,34.5c-10-2.4-20.3-5.4-30.3-8.4
|
||||||
|
c-7.9-2.4-15.7-4.7-23.1-6.6c1.1-2.7,2.3-5.1,3.4-7.1c17.8,3.6,38.7,9,60,15.2C386,30.1,382.7,32.4,379.4,34.5z M324.7,19.3
|
||||||
|
c-10.7-2.7-20.7-4.6-29.4-4.6H295c-9.9,0.1-21.1,0.6-33.3,1.5c-0.9-2-1.8-3.7-2.6-5.3c14.6-1.8,27-2.8,36-2.8c0.1,0,0.1,0,0.2,0
|
||||||
|
c8.4,0,19.8,1.5,32.9,4.1C327,14.3,325.9,16.7,324.7,19.3z M260.5,16.3c-19.5,1.5-41.2,4-63.2,7.1c-1.7-0.8-3.4-1.6-5.1-2.3
|
||||||
|
c23.8-4.2,46.5-7.7,65.6-10C258.7,12.6,259.6,14.4,260.5,16.3z M195.1,23.7c-21.9,3.1-44.1,6.8-64.5,10.6c-1.5-0.3-3-0.5-4.4-0.7
|
||||||
|
c20.8-4.2,42.8-8.4,63.9-12.1C191.8,22.2,193.4,22.9,195.1,23.7z M127.3,34.9c-18.1,3.5-34.7,7.1-48.5,10.6
|
||||||
|
c-3.6,0.1-7.2,0.3-10.8,0.6c16.6-3.9,36.2-8.1,56.9-12.3l-0.1,0.7C125.6,34.7,126.5,34.8,127.3,34.9z M73.5,47
|
||||||
|
c-2.7,0.7-5.4,1.5-7.8,2.2c-4.3,1.3-6.9,3.6-7.9,6.9c-1,3.4-0.1,7.8,2,12.7c-9.7,1.3-19.3,3-28.8,5c-2.2-4.9-3.1-9.3-1.9-12.8
|
||||||
|
c1.2-3.7,4.5-6.3,10.2-7.8c6.1-1.6,13.3-3.4,21.3-5.3C64.8,47.5,69.1,47.2,73.5,47z M60.2,69.9c6.2,13.3,21.2,30.5,33.9,45.2
|
||||||
|
c3,3.5,6,6.9,8.7,10.1c-8.9,2.7-18,5.4-27.4,8c-4.6-6.4-10.6-13.6-17-21.2C48,99.5,36.6,86,31.4,74.9
|
||||||
|
C40.9,72.9,50.6,71.2,60.2,69.9z M103.7,126.1c3.1,3.7,5.8,7.1,7.8,9.9l1.4,2c17,24.2,21.5,30.5,53.1,30.2
|
||||||
|
c-7.1,6.5-14.3,13.1-21.6,19.3c-2.8-0.3-5.5-0.7-8.1-1.3c-10.6-2.2-20.4-7.8-28.1-16.1c-3-3.2-6.3-6.5-9.8-10
|
||||||
|
c-7.7-7.8-15.7-15.8-19.9-22.4c-0.7-1.1-1.4-2.2-2.2-3.3C85.6,131.5,94.7,128.8,103.7,126.1z M295,170c0.2,0,0.4,0.1,0.6,0.1
|
||||||
|
c4.2,1,9.2,2.3,14.9,3.8c20.4,5.5,48.1,12.9,73.7,12.9c10.6,0,20.9-1.3,30.2-4.5c0.1,0,0.2-0.1,0.2-0.1c5.7,4.1,11.6,7.7,17.7,10.8
|
||||||
|
c-1,0.5-1.9,1.1-2.9,1.6c-36.2,20.1-60.4,13-88.5,4.9c-10-2.9-20.4-5.9-32.1-8c-4.8-0.9-9.4-1.6-13.9-2.3V170z M415.9,181.7
|
||||||
|
c6.1-2.9,12.4-9.5,20.1-17.5c5.4-5.6,11.5-12,19-18.7c8.7-6.6,20.7-12.4,33.4-18.5c7-3.4,14.2-6.9,21.1-10.7
|
||||||
|
c8,2.4,15.9,5.2,23.7,8.2c0,0,0,0,0,0c-5.1,2.5-9.4,4.7-12,6.4c-11.9,7.8-24.5,17.2-36.7,26.2c-16.7,12.5-34,25.3-50.8,35.1
|
||||||
|
C427.5,189.2,421.6,185.7,415.9,181.7z M510.9,115.5c18.1-10,33.9-22.1,38.1-39.2c6.6,1.6,12.7,3.4,17.6,5.2c2.1,0.9,4,1.7,5.8,2.6
|
||||||
|
c1.7,0.9,3.1,1.9,3.9,2.9c1.6,14.5-24,27.8-41.9,36.8C526.9,120.7,519,118,510.9,115.5z M530.2,68.9c6.3,2,12.3,4,17.8,5.8
|
||||||
|
c-0.9-0.2-1.9-0.3-2.9-0.5c-7.7-1.8-15.8-3.4-22.9-4.9c-10.1-2.1-18.8-3.8-22-5.2c-3.2-1.3-7-2.8-11.2-4.5c4.3,0,8.7,0.1,13.2,0.2
|
||||||
|
l0-0.1c8.9,2.9,17.2,5.7,24.4,8L530.2,68.9z M499,58.7c-4.5-0.1-8.8-0.1-13.1-0.1c-13.8-5.2-31.7-11.5-51.2-17.9
|
||||||
|
c1.5-0.4,3.1-0.8,4.7-1.1l-0.1-0.4c18.3,5.9,35.9,11.8,51.7,17C493.7,56.9,496.3,57.8,499,58.7z M390.4,26.8
|
||||||
|
C369,20.6,347.9,15,329.9,11.4c0.8-1.3,1.6-2.5,2.4-3.4c17.9,4.1,39,10,61.1,16.7C392.4,25.4,391.4,26.1,390.4,26.8z M294.1,2.1
|
||||||
|
c0.3,0,0.6,0,0.9,0c8.6,0.1,21.1,2.2,36,5.6c-0.8,1-1.6,2.2-2.3,3.5c-13.4-2.7-25-4.2-33.5-4.2H295c-9.2,0-21.8,1.1-36.6,2.8
|
||||||
|
c-0.8-1.3-1.6-2.5-2.4-3.5C271.9,3.7,285.6,2.1,294.1,2.1z M200,15.9c18.2-3.3,37.6-6.8,54.7-9.5c0.9,1,1.7,2.1,2.5,3.5
|
||||||
|
c-19.6,2.4-42.8,6-67.1,10.3c-1.4-0.6-2.7-1.2-4.1-1.7C190.5,17.7,195.2,16.8,200,15.9z M170.7,21.2c4.2-0.7,8.6-1.5,13.1-2.3
|
||||||
|
c1.4,0.5,2.8,1.1,4.1,1.7c-45.3,8-93.7,18.1-127.8,26.3c-3.8,0.4-7.5,0.8-11.2,1.3C87.1,38.7,129.7,28.3,170.7,21.2z M2.5,64.4
|
||||||
|
c2.1-3.8,7.1-6.7,15.2-8.6c5.8-1.4,11.8-2.9,18-4.4l0,0.1c5.1-1,10.4-1.8,15.8-2.5c-4.6,1.1-8.8,2.2-12.6,3.2
|
||||||
|
c-6,1.6-9.7,4.5-11,8.6c-1.2,3.7-0.3,8.3,1.9,13.4c-8.9,2-17.7,4.2-26.3,6.9C1.3,74.5,0.1,68.8,2.5,64.4z M7.1,92.6
|
||||||
|
c-0.8-2.6-1.6-5.1-2.4-7.5c-0.3-1-0.7-2-1-2.9c8.7-2.7,17.5-5,26.5-6.9c5.1,11,16.4,24.4,27.4,37.5c6.2,7.4,12.1,14.5,16.7,20.8
|
||||||
|
c-11.1,3.1-22.6,6.2-34.5,9c-3.2-4.6-6.8-9.7-10.5-14.9C19.3,113.7,9,99.3,7.1,92.6z M124.5,202.4c-46.6-1-52.6-1.1-76.4-46.6
|
||||||
|
c-1.8-3.4-4.5-7.6-7.7-12.4c12-2.9,23.4-5.9,34.6-9c0.9,1.2,1.7,2.5,2.4,3.6c4.3,6.7,12.3,14.8,20.1,22.6c3.5,3.5,6.8,6.8,9.8,10
|
||||||
|
c7.9,8.5,17.8,14.2,28.7,16.5c2.3,0.5,4.7,0.9,7.2,1.2c-5.9,4.9-11.8,9.6-17.8,13.9l0.1,0.2C125.2,202.5,124.8,202.5,124.5,202.4z
|
||||||
|
M455.3,208c-46.5,33.3-78.4,25.1-118.8,14.7c-12.9-3.3-26.3-6.8-41.5-9.3v-22.9c4.5,0.7,9,1.4,13.7,2.3c11.7,2.1,22,5.1,32,8
|
||||||
|
c14.6,4.2,28.2,8.2,43,8.2c13.8,0,28.6-3.4,46.3-13.2c1.2-0.7,2.4-1.3,3.5-2c9.1,4.5,18.6,7.8,28.2,9.8
|
||||||
|
C459.7,204.9,457.5,206.5,455.3,208z M546.1,146.5c-15,10.8-30.4,20.9-45.3,30.7c-12.3,8.1-25,16.5-37.6,25.3
|
||||||
|
c-9.7-1.9-19.2-5.2-28.3-9.6c16.7-9.8,33.8-22.5,50.3-34.8c12.7-9.5,24.7-18.4,36.6-26.2c2.5-1.7,6.9-3.8,11.9-6.4
|
||||||
|
c0.3-0.2,0.6-0.3,1-0.5c8.5,3.4,16.8,7.2,24.8,11.4C555.5,139.6,551,143,546.1,146.5z M560.5,135.7c-7.9-4.2-16.1-8-24.5-11.3
|
||||||
|
c18.1-9.1,43.2-22.4,41.6-37.4c1.1,0.7,2.1,1.4,3.1,2.1l0.1-0.2c4.5,3.2,7.2,6.6,7.8,10.6C590,108.1,581.5,119.3,560.5,135.7z"
|
||||||
|
/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 25 KiB |
@ -28,7 +28,9 @@ export { default as Gear } from 'components/Icons/Gear.svg'
|
|||||||
export { default as GridGlobe } from 'components/Icons/GridGlobe.svg'
|
export { default as GridGlobe } from 'components/Icons/GridGlobe.svg'
|
||||||
export { default as GridHole } from 'components/Icons/GridHole.svg'
|
export { default as GridHole } from 'components/Icons/GridHole.svg'
|
||||||
export { default as GridLandscape } from 'components/Icons/GridLandscape.svg'
|
export { default as GridLandscape } from 'components/Icons/GridLandscape.svg'
|
||||||
|
export { default as GridPlanet } from 'components/Icons/GridPlanet.svg'
|
||||||
export { default as GridTire } from 'components/Icons/GridTire.svg'
|
export { default as GridTire } from 'components/Icons/GridTire.svg'
|
||||||
|
export { default as GridWeb } from 'components/Icons/GridWeb.svg'
|
||||||
export { default as HandCoins } from 'components/Icons/HandCoins.svg'
|
export { default as HandCoins } from 'components/Icons/HandCoins.svg'
|
||||||
export { default as Heart } from 'components/Icons/Heart.svg'
|
export { default as Heart } from 'components/Icons/Heart.svg'
|
||||||
export { default as InfoCircle } from 'components/Icons/InfoCircle.svg'
|
export { default as InfoCircle } from 'components/Icons/InfoCircle.svg'
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
|
import classNames from 'classnames'
|
||||||
import { ReactNode } from 'react'
|
import { ReactNode } from 'react'
|
||||||
|
|
||||||
import Card from 'components/Card'
|
import Card from 'components/Card'
|
||||||
import { GridGlobe, GridHole, GridLandscape, GridTire } from 'components/Icons'
|
import { GridGlobe, GridHole, GridLandscape, GridPlanet, GridTire, GridWeb } from 'components/Icons'
|
||||||
import Text from 'components/Text'
|
import Text from 'components/Text'
|
||||||
import { Tooltip } from 'components/Tooltip'
|
import { Tooltip } from 'components/Tooltip'
|
||||||
import useStore from 'store'
|
import useStore from 'store'
|
||||||
@ -9,31 +10,39 @@ import useStore from 'store'
|
|||||||
interface Props {
|
interface Props {
|
||||||
text: string | ReactNode
|
text: string | ReactNode
|
||||||
children?: ReactNode
|
children?: ReactNode
|
||||||
bg: 'borrow' | 'lend' | 'farm' | 'portfolio'
|
bg: 'borrow' | 'lend' | 'farm' | 'portfolio' | 'hls-farm' | 'hls-staking'
|
||||||
}
|
}
|
||||||
|
|
||||||
function IntroBackground(props: { bg: Props['bg'] }) {
|
function IntroBackground(props: { bg: Props['bg'] }) {
|
||||||
switch (props.bg) {
|
switch (props.bg) {
|
||||||
case 'borrow':
|
case 'borrow':
|
||||||
return <GridHole className='h-55' />
|
return <GridHole className='h-55 opacity-5' />
|
||||||
case 'lend':
|
case 'lend':
|
||||||
return <GridTire className='h-55' />
|
return <GridTire className='h-55 opacity-5' />
|
||||||
case 'farm':
|
case 'farm':
|
||||||
return <GridLandscape className='h-55' />
|
return <GridLandscape className='h-55 opacity-5' />
|
||||||
|
case 'hls-farm':
|
||||||
|
return <GridWeb className='h-45 opacity-5' />
|
||||||
|
case 'hls-staking':
|
||||||
|
return <GridPlanet className='h-55 opacity-10' />
|
||||||
default:
|
default:
|
||||||
return <GridGlobe className='h-50' />
|
return <GridGlobe className='h-50 opacity-5' />
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Intro(props: Props) {
|
export default function Intro(props: Props) {
|
||||||
const showTutorial = useStore((s) => s.tutorial)
|
const showTutorial = useStore((s) => s.tutorial)
|
||||||
|
const isHLS = useStore((s) => s.isHLS)
|
||||||
if (!showTutorial) return null
|
if (!showTutorial) return null
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
className={`relative w-full p-8 bg-intro bg-cover h-55`}
|
className={classNames(
|
||||||
|
'relative w-full p-8 bg-cover h-55',
|
||||||
|
isHLS ? 'bg-intro-hls' : 'bg-intro',
|
||||||
|
)}
|
||||||
contentClassName='flex w-full h-full flex-col justify-between'
|
contentClassName='flex w-full h-full flex-col justify-between'
|
||||||
>
|
>
|
||||||
<div className='absolute inset-0 flex items-end justify-end w-full h-full text-white opacity-5'>
|
<div className='absolute inset-0 flex items-end justify-end w-full h-full text-white'>
|
||||||
<IntroBackground bg={props.bg} />
|
<IntroBackground bg={props.bg} />
|
||||||
</div>
|
</div>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
|
@ -23,13 +23,7 @@ export default function MarketDetails({ row, type }: Props) {
|
|||||||
symbol: displayCurrencySymbol,
|
symbol: displayCurrencySymbol,
|
||||||
} = useDisplayCurrencyPrice()
|
} = useDisplayCurrencyPrice()
|
||||||
|
|
||||||
const {
|
const { asset, ltv, marketDepositAmount, marketLiquidityAmount } = row.original
|
||||||
asset,
|
|
||||||
marketMaxLtv,
|
|
||||||
marketDepositAmount,
|
|
||||||
marketLiquidityAmount,
|
|
||||||
marketLiquidationThreshold,
|
|
||||||
} = row.original
|
|
||||||
|
|
||||||
const totalBorrowed = marketDepositAmount.minus(marketLiquidityAmount)
|
const totalBorrowed = marketDepositAmount.minus(marketLiquidityAmount)
|
||||||
|
|
||||||
@ -48,12 +42,12 @@ export default function MarketDetails({ row, type }: Props) {
|
|||||||
title: 'Total Supplied',
|
title: 'Total Supplied',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
amount: marketMaxLtv * 100,
|
amount: ltv.max * 100,
|
||||||
options: { minDecimals: 2, maxDecimals: 2, suffix: '%' },
|
options: { minDecimals: 2, maxDecimals: 2, suffix: '%' },
|
||||||
title: 'Max LTV',
|
title: 'Max LTV',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
amount: marketLiquidationThreshold * 100,
|
amount: ltv.liq * 100,
|
||||||
options: { minDecimals: 2, maxDecimals: 2, suffix: '%' },
|
options: { minDecimals: 2, maxDecimals: 2, suffix: '%' },
|
||||||
title: 'Liquidation LTV',
|
title: 'Liquidation LTV',
|
||||||
},
|
},
|
||||||
@ -68,7 +62,9 @@ export default function MarketDetails({ row, type }: Props) {
|
|||||||
title: 'Oracle Price',
|
title: 'Oracle Price',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
amount: totalBorrowed.dividedBy(marketDepositAmount).multipliedBy(100).toNumber(),
|
amount: totalBorrowed.isZero()
|
||||||
|
? 0
|
||||||
|
: totalBorrowed.dividedBy(marketDepositAmount).multipliedBy(100).toNumber(),
|
||||||
options: { minDecimals: 2, maxDecimals: 2, suffix: '%' },
|
options: { minDecimals: 2, maxDecimals: 2, suffix: '%' },
|
||||||
title: 'Utilization Rate',
|
title: 'Utilization Rate',
|
||||||
},
|
},
|
||||||
@ -97,7 +93,9 @@ export default function MarketDetails({ row, type }: Props) {
|
|||||||
title: 'Oracle Price',
|
title: 'Oracle Price',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
amount: totalBorrowed.dividedBy(marketDepositAmount).multipliedBy(100).toNumber(),
|
amount: totalBorrowed.isZero()
|
||||||
|
? 0
|
||||||
|
: totalBorrowed.dividedBy(marketDepositAmount).multipliedBy(100).toNumber(),
|
||||||
options: { minDecimals: 2, maxDecimals: 2, suffix: '%' },
|
options: { minDecimals: 2, maxDecimals: 2, suffix: '%' },
|
||||||
title: 'Utilization Rate',
|
title: 'Utilization Rate',
|
||||||
},
|
},
|
||||||
@ -110,8 +108,7 @@ export default function MarketDetails({ row, type }: Props) {
|
|||||||
type,
|
type,
|
||||||
asset,
|
asset,
|
||||||
marketDepositAmount,
|
marketDepositAmount,
|
||||||
marketMaxLtv,
|
ltv,
|
||||||
marketLiquidationThreshold,
|
|
||||||
totalBorrowed,
|
totalBorrowed,
|
||||||
displayCurrencySymbol,
|
displayCurrencySymbol,
|
||||||
convertAmount,
|
convertAmount,
|
||||||
|
@ -75,6 +75,7 @@ export default function AssetAmountSelectActionModal(props: Props) {
|
|||||||
max={maxAmount}
|
max={maxAmount}
|
||||||
hasSelect
|
hasSelect
|
||||||
maxText='Max'
|
maxText='Max'
|
||||||
|
warningMessages={[]}
|
||||||
/>
|
/>
|
||||||
<Divider />
|
<Divider />
|
||||||
<Button
|
<Button
|
||||||
|
@ -10,7 +10,6 @@ import Text from 'components/Text'
|
|||||||
import { BNCoin } from 'types/classes/BNCoin'
|
import { BNCoin } from 'types/classes/BNCoin'
|
||||||
import { getAssetByDenom } from 'utils/assets'
|
import { getAssetByDenom } from 'utils/assets'
|
||||||
import { demagnify, formatPercent } from 'utils/formatters'
|
import { demagnify, formatPercent } from 'utils/formatters'
|
||||||
import { convertAprToApy } from 'utils/parsers'
|
|
||||||
|
|
||||||
function showBorrowRate(data: AssetTableRow[]) {
|
function showBorrowRate(data: AssetTableRow[]) {
|
||||||
const assetData = data.length && (data[0].asset as BorrowAsset)
|
const assetData = data.length && (data[0].asset as BorrowAsset)
|
||||||
@ -29,8 +28,7 @@ export default function useAssetTableColumns(isBorrow: boolean) {
|
|||||||
const market = row.original.market
|
const market = row.original.market
|
||||||
const borrowAsset = row.original.asset as BorrowAsset
|
const borrowAsset = row.original.asset as BorrowAsset
|
||||||
const showRate = !borrowAsset?.borrowRate
|
const showRate = !borrowAsset?.borrowRate
|
||||||
const rate = isBorrow ? market?.borrowRate : market?.liquidityRate
|
const apy = isBorrow ? market?.apy.borrow : market?.apy.deposit
|
||||||
const apy = convertAprToApy(rate ?? 0, 365)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex items-center'>
|
<div className='flex items-center'>
|
||||||
@ -47,7 +45,7 @@ export default function useAssetTableColumns(isBorrow: boolean) {
|
|||||||
</Text>
|
</Text>
|
||||||
{showRate && market ? (
|
{showRate && market ? (
|
||||||
<AssetRate
|
<AssetRate
|
||||||
rate={apy}
|
rate={apy ?? 0}
|
||||||
isEnabled={market.borrowEnabled}
|
isEnabled={market.borrowEnabled}
|
||||||
className='text-xs'
|
className='text-xs'
|
||||||
type='apy'
|
type='apy'
|
||||||
|
@ -81,7 +81,7 @@ function BorrowModal(props: Props) {
|
|||||||
const [max, setMax] = useState(BN_ZERO)
|
const [max, setMax] = useState(BN_ZERO)
|
||||||
const { simulateBorrow, simulateRepay } = useUpdatedAccount(account)
|
const { simulateBorrow, simulateRepay } = useUpdatedAccount(account)
|
||||||
const { autoLendEnabledAccountIds } = useAutoLend()
|
const { autoLendEnabledAccountIds } = useAutoLend()
|
||||||
const apr = modal.marketData?.borrowRate ?? '0'
|
const apy = modal.marketData.apy.borrow
|
||||||
const isAutoLendEnabled = autoLendEnabledAccountIds.includes(account.id)
|
const isAutoLendEnabled = autoLendEnabledAccountIds.includes(account.id)
|
||||||
const { computeMaxBorrowAmount } = useHealthComputer(account)
|
const { computeMaxBorrowAmount } = useHealthComputer(account)
|
||||||
const totalDebt = BN(getDebtAmount(modal))
|
const totalDebt = BN(getDebtAmount(modal))
|
||||||
@ -95,8 +95,8 @@ function BorrowModal(props: Props) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const totalDebtRepayAmount = useMemo(
|
const totalDebtRepayAmount = useMemo(
|
||||||
() => getDebtAmountWithInterest(totalDebt, Number(apr)),
|
() => getDebtAmountWithInterest(totalDebt, apy),
|
||||||
[totalDebt, apr],
|
[totalDebt, apy],
|
||||||
)
|
)
|
||||||
|
|
||||||
const maxRepayAmount = useMemo(() => {
|
const maxRepayAmount = useMemo(() => {
|
||||||
@ -201,7 +201,7 @@ function BorrowModal(props: Props) {
|
|||||||
>
|
>
|
||||||
<div className='flex gap-3 px-6 py-4 border-b border-white/5 gradient-header'>
|
<div className='flex gap-3 px-6 py-4 border-b border-white/5 gradient-header'>
|
||||||
<TitleAndSubCell
|
<TitleAndSubCell
|
||||||
title={formatPercent(modal.marketData.borrowRate || '0')}
|
title={formatPercent(modal.marketData.apy.borrow)}
|
||||||
sub={'Borrow Rate APY'}
|
sub={'Borrow Rate APY'}
|
||||||
/>
|
/>
|
||||||
{totalDebt.isGreaterThan(0) && (
|
{totalDebt.isGreaterThan(0) && (
|
||||||
@ -267,6 +267,7 @@ function BorrowModal(props: Props) {
|
|||||||
disabled={max.isZero()}
|
disabled={max.isZero()}
|
||||||
className='w-full'
|
className='w-full'
|
||||||
maxText='Max'
|
maxText='Max'
|
||||||
|
warningMessages={[]}
|
||||||
/>
|
/>
|
||||||
{isRepay && maxRepayAmount.isZero() && <RepayNotAvailable asset={asset} />}
|
{isRepay && maxRepayAmount.isZero() && <RepayNotAvailable asset={asset} />}
|
||||||
{!isRepay && (
|
{!isRepay && (
|
||||||
|
@ -112,6 +112,7 @@ export default function WithdrawFromAccount(props: Props) {
|
|||||||
accountId={account.id}
|
accountId={account.id}
|
||||||
hasSelect
|
hasSelect
|
||||||
maxText='Max'
|
maxText='Max'
|
||||||
|
warningMessages={[]}
|
||||||
/>
|
/>
|
||||||
<Divider className='my-6' />
|
<Divider className='my-6' />
|
||||||
<div className='flex flex-wrap w-full'>
|
<div className='flex flex-wrap w-full'>
|
||||||
|
@ -24,10 +24,9 @@ export default function CreateAccount() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='p-4 flex-col flex'>
|
<div id='item-2' className='p-4 flex-col flex'>
|
||||||
<Text size='sm' className='text-white/50 mb-4 mt-2'>
|
<Text size='sm' className='text-white/50 mb-4 mt-2'>
|
||||||
Creating a HLS position mandates the creation of a, single-use HLS account. This account is
|
Depositing into a HLS strategy mandates the creation of a HLS credit account.
|
||||||
deleted once you close your position.
|
|
||||||
</Text>
|
</Text>
|
||||||
<Button
|
<Button
|
||||||
onClick={handleBtnClick}
|
onClick={handleBtnClick}
|
||||||
|
@ -1,24 +1,32 @@
|
|||||||
import React from 'react'
|
import React, { useMemo } from 'react'
|
||||||
|
|
||||||
import Button from 'components/Button'
|
import Button from 'components/Button'
|
||||||
import { ArrowRight } from 'components/Icons'
|
import { ArrowRight } from 'components/Icons'
|
||||||
import LeverageSummary from 'components/Modals/HLS/Deposit/LeverageSummary'
|
import LeverageSummary from 'components/Modals/HLS/Deposit/LeverageSummary'
|
||||||
import TokenInputWithSlider from 'components/TokenInput/TokenInputWithSlider'
|
import TokenInputWithSlider from 'components/TokenInput/TokenInputWithSlider'
|
||||||
|
import { getLeveragedApy } from 'utils/math'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
amount: BigNumber
|
amount: BigNumber
|
||||||
asset: Asset
|
asset: BorrowAsset
|
||||||
max: BigNumber
|
max: BigNumber
|
||||||
onChangeAmount: (amount: BigNumber) => void
|
onChangeAmount: (amount: BigNumber) => void
|
||||||
onClickBtn: () => void
|
onClickBtn: () => void
|
||||||
positionValue: BigNumber
|
positionValue: BigNumber
|
||||||
leverage: number
|
leverage: number
|
||||||
maxLeverage: number
|
maxLeverage: number
|
||||||
|
baseApy: number
|
||||||
|
warningMessages: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Leverage(props: Props) {
|
export default function Leverage(props: Props) {
|
||||||
|
const apy = useMemo(() => {
|
||||||
|
if (!props.asset.borrowRate) return 0
|
||||||
|
return getLeveragedApy(props.baseApy, props.asset.borrowRate, props.leverage)
|
||||||
|
}, [props.asset.borrowRate, props.baseApy, props.leverage])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex-col gap-6 flex justify-between h-full p-4'>
|
<div id='item-1' className='flex-col gap-6 flex justify-between h-full p-4'>
|
||||||
<TokenInputWithSlider
|
<TokenInputWithSlider
|
||||||
amount={props.amount}
|
amount={props.amount}
|
||||||
asset={props.asset}
|
asset={props.asset}
|
||||||
@ -29,9 +37,10 @@ export default function Leverage(props: Props) {
|
|||||||
current: props.leverage,
|
current: props.leverage,
|
||||||
max: props.maxLeverage,
|
max: props.maxLeverage,
|
||||||
}}
|
}}
|
||||||
|
warningMessages={props.warningMessages}
|
||||||
/>
|
/>
|
||||||
<div className='flex flex-col gap-6'>
|
<div className='flex flex-col gap-6'>
|
||||||
<LeverageSummary asset={props.asset} positionValue={props.positionValue} />
|
<LeverageSummary asset={props.asset} positionValue={props.positionValue} apy={apy} />
|
||||||
<Button onClick={props.onClickBtn} text='Continue' rightIcon={<ArrowRight />} />
|
<Button onClick={props.onClickBtn} text='Continue' rightIcon={<ArrowRight />} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,6 +6,7 @@ import useBorrowAsset from 'hooks/useBorrowAsset'
|
|||||||
interface Props {
|
interface Props {
|
||||||
asset: Asset
|
asset: Asset
|
||||||
positionValue: BigNumber
|
positionValue: BigNumber
|
||||||
|
apy: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function LeverageSummary(props: Props) {
|
export default function LeverageSummary(props: Props) {
|
||||||
@ -13,11 +14,10 @@ export default function LeverageSummary(props: Props) {
|
|||||||
|
|
||||||
const items: SummaryItem[] = useMemo(() => {
|
const items: SummaryItem[] = useMemo(() => {
|
||||||
return [
|
return [
|
||||||
// TODO: Get APY numbers
|
|
||||||
{
|
{
|
||||||
title: 'APY',
|
title: 'APY',
|
||||||
amount: 0,
|
amount: props.apy,
|
||||||
options: { suffix: '%', minDecimals: 1, maxDecimals: 1 },
|
options: { suffix: '%', minDecimals: 2, maxDecimals: 2 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: `Borrow APR ${props.asset.symbol}`,
|
title: `Borrow APR ${props.asset.symbol}`,
|
||||||
@ -30,7 +30,7 @@ export default function LeverageSummary(props: Props) {
|
|||||||
options: { prefix: '$' },
|
options: { prefix: '$' },
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}, [borrowAsset?.borrowRate, props.asset.symbol, props.positionValue])
|
}, [borrowAsset?.borrowRate, props.apy, props.asset.symbol, props.positionValue])
|
||||||
|
|
||||||
return <SummaryItems items={items} />
|
return <SummaryItems items={items} />
|
||||||
}
|
}
|
||||||
|
@ -10,17 +10,20 @@ interface Props {
|
|||||||
max: BigNumber
|
max: BigNumber
|
||||||
onChangeAmount: (amount: BigNumber) => void
|
onChangeAmount: (amount: BigNumber) => void
|
||||||
onClickBtn: () => void
|
onClickBtn: () => void
|
||||||
|
depositCapLeft: BigNumber
|
||||||
|
warningMessages: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ProvideCollateral(props: Props) {
|
export default function ProvideCollateral(props: Props) {
|
||||||
return (
|
return (
|
||||||
<div className='p-4 flex-col gap-6 flex'>
|
<div id='item-0' className='p-4 flex-col gap-6 flex'>
|
||||||
<TokenInputWithSlider
|
<TokenInputWithSlider
|
||||||
maxText='In wallet'
|
maxText='In wallet'
|
||||||
amount={props.amount}
|
amount={props.amount}
|
||||||
asset={props.asset}
|
asset={props.asset}
|
||||||
max={props.max}
|
max={props.max}
|
||||||
onChange={props.onChangeAmount}
|
onChange={props.onChangeAmount}
|
||||||
|
warningMessages={props.warningMessages}
|
||||||
/>
|
/>
|
||||||
<Button onClick={props.onClickBtn} text='Continue' rightIcon={<ArrowRight />} />
|
<Button onClick={props.onClickBtn} text='Continue' rightIcon={<ArrowRight />} />
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,7 +18,7 @@ export default function CreateAccount(props: Props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex-col flex'>
|
<div id='item-2' className='flex-col flex'>
|
||||||
{props.hlsAccounts.map((account, index) => (
|
{props.hlsAccounts.map((account, index) => (
|
||||||
<div
|
<div
|
||||||
key={account.id}
|
key={account.id}
|
||||||
|
@ -1,17 +1,25 @@
|
|||||||
|
import classNames from 'classnames'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
import DisplayCurrency from 'components/DisplayCurrency'
|
import DisplayCurrency from 'components/DisplayCurrency'
|
||||||
|
import { ExclamationMarkTriangle } from 'components/Icons'
|
||||||
import Text from 'components/Text'
|
import Text from 'components/Text'
|
||||||
|
import WarningMessages from 'components/WarningMessages'
|
||||||
import { BNCoin } from 'types/classes/BNCoin'
|
import { BNCoin } from 'types/classes/BNCoin'
|
||||||
import { formatAmountWithSymbol, formatLeverage } from 'utils/formatters'
|
import { formatAmountWithSymbol, formatLeverage } from 'utils/formatters'
|
||||||
|
|
||||||
interface SubTitleProps {
|
interface SubTitleProps {
|
||||||
text: string
|
text: string
|
||||||
|
color?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export function SubTitle(props: SubTitleProps) {
|
export function SubTitle(props: SubTitleProps) {
|
||||||
return (
|
return (
|
||||||
<Text className='text-white/60 mt-1' size='xs' tag='span'>
|
<Text
|
||||||
|
className={classNames(props.color ? props.color : 'text-white/60', 'mt-1')}
|
||||||
|
size='xs'
|
||||||
|
tag='span'
|
||||||
|
>
|
||||||
{props.text}
|
{props.text}
|
||||||
</Text>
|
</Text>
|
||||||
)
|
)
|
||||||
@ -21,18 +29,34 @@ interface CollateralSubTitleProps {
|
|||||||
amount: BigNumber
|
amount: BigNumber
|
||||||
denom: string
|
denom: string
|
||||||
isOpen: boolean
|
isOpen: boolean
|
||||||
|
warningMessages: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export function CollateralSubTitle(props: CollateralSubTitleProps) {
|
export function CollateralSubTitle(props: CollateralSubTitleProps) {
|
||||||
if (props.isOpen || props.amount.isZero()) return null
|
if (props.isOpen) return null
|
||||||
|
|
||||||
|
if (!props.isOpen && props.amount.isZero()) {
|
||||||
|
return (
|
||||||
|
<div className='flex gap-2'>
|
||||||
|
<ExclamationMarkTriangle width={24} className='text-warning' />
|
||||||
|
<Text className='text-warning mt-1' size='xs' tag='span'>
|
||||||
|
You have not provided any collateral.
|
||||||
|
</Text>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SubTitle
|
<div className='flex items-center gap-1'>
|
||||||
text={formatAmountWithSymbol({
|
<WarningMessages messages={props.warningMessages} />
|
||||||
denom: props.denom,
|
<SubTitle
|
||||||
amount: props.amount.toString(),
|
text={formatAmountWithSymbol({
|
||||||
})}
|
denom: props.denom,
|
||||||
/>
|
amount: props.amount.toString(),
|
||||||
|
})}
|
||||||
|
color={props.warningMessages.length > 0 ? 'text-warning' : ''}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,17 +64,55 @@ interface LeveragedSubTitleProps {
|
|||||||
isOpen: boolean
|
isOpen: boolean
|
||||||
leverage: number
|
leverage: number
|
||||||
positionValue: BigNumber
|
positionValue: BigNumber
|
||||||
|
warningMessages: string[]
|
||||||
}
|
}
|
||||||
export function LeverageSubTitle(props: LeveragedSubTitleProps) {
|
export function LeverageSubTitle(props: LeveragedSubTitleProps) {
|
||||||
if (props.isOpen || props.leverage <= 1) return null
|
if (props.isOpen || props.leverage <= 1) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<div className='flex items-center gap-1'>
|
||||||
<SubTitle text={`${formatLeverage(props.leverage)} • Total Position Value `} />
|
<WarningMessages messages={props.warningMessages} />
|
||||||
|
<SubTitle
|
||||||
|
text={`${formatLeverage(props.leverage)} • Total Position Value `}
|
||||||
|
color={props.warningMessages.length > 0 ? 'text-warning' : ''}
|
||||||
|
/>
|
||||||
<DisplayCurrency
|
<DisplayCurrency
|
||||||
coin={BNCoin.fromDenomAndBigNumber('usd', props.positionValue)}
|
coin={BNCoin.fromDenomAndBigNumber('usd', props.positionValue)}
|
||||||
className='text-white/60 text-xs inline'
|
className={classNames(
|
||||||
|
'text-xs inline mt-1',
|
||||||
|
props.warningMessages.length ? 'text-warning' : 'text-white/60',
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
</>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface SelectAccountSubTitleProps {
|
||||||
|
isOpen: boolean
|
||||||
|
isSummaryOpen: boolean
|
||||||
|
selectedAccountId?: string
|
||||||
|
type: 'create' | 'select'
|
||||||
|
}
|
||||||
|
|
||||||
|
export function SelectAccountSubTitle(props: SelectAccountSubTitleProps) {
|
||||||
|
if (!props.isOpen && props.selectedAccountId) {
|
||||||
|
return (
|
||||||
|
<Text className='mt-1 text-white/60' size='xs' tag='span'>
|
||||||
|
Account {props.selectedAccountId}
|
||||||
|
</Text>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!props.selectedAccountId && props.isSummaryOpen) {
|
||||||
|
return (
|
||||||
|
<div className='flex gap-2'>
|
||||||
|
<ExclamationMarkTriangle width={24} className='text-warning' />
|
||||||
|
<Text className='text-warning mt-1' size='xs' tag='span'>
|
||||||
|
You need to {props.type} an account
|
||||||
|
</Text>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
@ -18,7 +18,7 @@ interface Props {
|
|||||||
|
|
||||||
export default function YourPosition(props: Props) {
|
export default function YourPosition(props: Props) {
|
||||||
const netApy = useMemo(
|
const netApy = useMemo(
|
||||||
() => props.baseApy * props.leverage - props.borrowRate,
|
() => props.baseApy * props.leverage - props.borrowRate * (props.leverage - 1),
|
||||||
[props.baseApy, props.borrowRate, props.leverage],
|
[props.baseApy, props.borrowRate, props.leverage],
|
||||||
)
|
)
|
||||||
const apyItems = useMemo(
|
const apyItems = useMemo(
|
||||||
@ -33,7 +33,7 @@ export default function YourPosition(props: Props) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Borrow Rate',
|
title: 'Borrow Rate',
|
||||||
amount: props.borrowRate,
|
amount: props.borrowRate * (props.leverage - 1),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[props.baseApy, props.borrowRate, props.leverage],
|
[props.baseApy, props.borrowRate, props.leverage],
|
||||||
|
@ -16,6 +16,7 @@ interface Props {
|
|||||||
leverage: number
|
leverage: number
|
||||||
onClickBtn: () => void
|
onClickBtn: () => void
|
||||||
positionValue: BigNumber
|
positionValue: BigNumber
|
||||||
|
disabled: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Summary(props: Props) {
|
export default function Summary(props: Props) {
|
||||||
@ -24,7 +25,7 @@ export default function Summary(props: Props) {
|
|||||||
if (!borrowAsset) return null
|
if (!borrowAsset) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='p-4 flex flex-col gap-4'>
|
<div id='item-3' className='p-4 flex flex-col gap-4'>
|
||||||
<AssetSummary asset={props.collateralAsset} amount={props.depositAmount} />
|
<AssetSummary asset={props.collateralAsset} amount={props.depositAmount} />
|
||||||
<AssetSummary asset={borrowAsset} amount={props.borrowAmount} isBorrow />
|
<AssetSummary asset={borrowAsset} amount={props.borrowAmount} isBorrow />
|
||||||
<YourPosition
|
<YourPosition
|
||||||
@ -38,6 +39,7 @@ export default function Summary(props: Props) {
|
|||||||
text='Approve Funding Transaction'
|
text='Approve Funding Transaction'
|
||||||
rightIcon={<ArrowRight />}
|
rightIcon={<ArrowRight />}
|
||||||
className='mt-1'
|
className='mt-1'
|
||||||
|
disabled={props.disabled}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -13,7 +13,7 @@ import useStore from 'store'
|
|||||||
import { isAccountEmpty } from 'utils/accounts'
|
import { isAccountEmpty } from 'utils/accounts'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
borrowAsset: Asset
|
borrowAsset: BorrowAsset
|
||||||
collateralAsset: Asset
|
collateralAsset: Asset
|
||||||
vaultAddress: string | null
|
vaultAddress: string | null
|
||||||
strategy?: HLSStrategy
|
strategy?: HLSStrategy
|
||||||
@ -24,10 +24,15 @@ export default function Controller(props: Props) {
|
|||||||
const [isOpen, toggleIsOpen] = useIsOpenArray(4, false)
|
const [isOpen, toggleIsOpen] = useIsOpenArray(4, false)
|
||||||
const address = useStore((s) => s.address)
|
const address = useStore((s) => s.address)
|
||||||
const { data: hlsAccounts } = useAccounts('high_levered_strategy', address)
|
const { data: hlsAccounts } = useAccounts('high_levered_strategy', address)
|
||||||
const emptyHlsAccounts = useMemo(
|
const emptyHlsAccounts = useMemo(() => {
|
||||||
() => hlsAccounts.filter((account) => isAccountEmpty(account)),
|
const emptyAccounts = hlsAccounts.filter((account) => isAccountEmpty(account))
|
||||||
[hlsAccounts],
|
|
||||||
)
|
if (emptyAccounts.length > 0 && selectedAccount.id === 'default') {
|
||||||
|
setSelectedAccount(emptyAccounts[0])
|
||||||
|
}
|
||||||
|
|
||||||
|
return emptyAccounts
|
||||||
|
}, [hlsAccounts, selectedAccount])
|
||||||
const walletCollateralAsset = useCurrentWalletBalance(props.collateralAsset.denom)
|
const walletCollateralAsset = useCurrentWalletBalance(props.collateralAsset.denom)
|
||||||
const vault = useVault(props.vaultAddress || '')
|
const vault = useVault(props.vaultAddress || '')
|
||||||
|
|
||||||
@ -68,7 +73,7 @@ export default function Controller(props: Props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface ContentProps {
|
interface ContentProps {
|
||||||
borrowAsset: Asset
|
borrowAsset: BorrowAsset
|
||||||
collateralAsset: Asset
|
collateralAsset: Asset
|
||||||
emptyHlsAccounts: Account[]
|
emptyHlsAccounts: Account[]
|
||||||
hlsAccounts: Account[]
|
hlsAccounts: Account[]
|
||||||
@ -166,7 +171,7 @@ function StakingContent(props: StakingContentProps) {
|
|||||||
toggleIsOpen: props.toggleIsOpen,
|
toggleIsOpen: props.toggleIsOpen,
|
||||||
updatedAccount,
|
updatedAccount,
|
||||||
maxBorrowAmount,
|
maxBorrowAmount,
|
||||||
apy: props.strategy.apy || 0, // TODO: Implement APY
|
apy: props.strategy.apy || 0,
|
||||||
walletCollateralAsset: props.walletCollateralAsset,
|
walletCollateralAsset: props.walletCollateralAsset,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React, { useMemo } from 'react'
|
import React, { useEffect, useMemo } from 'react'
|
||||||
|
|
||||||
import CreateAccount from 'components/Modals/HLS/Deposit/CreateAccount'
|
import CreateAccount from 'components/Modals/HLS/Deposit/CreateAccount'
|
||||||
import Leverage from 'components/Modals/HLS/Deposit/Leverage'
|
import Leverage from 'components/Modals/HLS/Deposit/Leverage'
|
||||||
@ -7,15 +7,25 @@ import SelectAccount from 'components/Modals/HLS/Deposit/SelectAccount'
|
|||||||
import {
|
import {
|
||||||
CollateralSubTitle,
|
CollateralSubTitle,
|
||||||
LeverageSubTitle,
|
LeverageSubTitle,
|
||||||
SubTitle,
|
SelectAccountSubTitle,
|
||||||
} from 'components/Modals/HLS/Deposit/SubTitles'
|
} from 'components/Modals/HLS/Deposit/SubTitles'
|
||||||
import Summary from 'components/Modals/HLS/Deposit/Summary'
|
import Summary from 'components/Modals/HLS/Deposit/Summary'
|
||||||
|
import { BN_ZERO } from 'constants/math'
|
||||||
|
import usePrices from 'hooks/usePrices'
|
||||||
|
import { BNCoin } from 'types/classes/BNCoin'
|
||||||
|
import { getCoinAmount, getCoinValue } from 'utils/formatters'
|
||||||
import { BN } from 'utils/helpers'
|
import { BN } from 'utils/helpers'
|
||||||
|
import {
|
||||||
|
getDepositCapMessage,
|
||||||
|
getHealthFactorMessage,
|
||||||
|
getLiquidityMessage,
|
||||||
|
getNoBalanceMessage,
|
||||||
|
} from 'utils/messages'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
apy: number
|
apy: number
|
||||||
borrowAmount: BigNumber
|
borrowAmount: BigNumber
|
||||||
borrowAsset: Asset
|
borrowAsset: BorrowAsset
|
||||||
collateralAsset: Asset
|
collateralAsset: Asset
|
||||||
depositAmount: BigNumber
|
depositAmount: BigNumber
|
||||||
emptyHlsAccounts: Account[]
|
emptyHlsAccounts: Account[]
|
||||||
@ -36,6 +46,80 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function useAccordionItems(props: Props) {
|
export default function useAccordionItems(props: Props) {
|
||||||
|
const { data: prices } = usePrices()
|
||||||
|
|
||||||
|
const depositCapLeft = useMemo(() => {
|
||||||
|
if (!props.strategy) return BN_ZERO
|
||||||
|
return props.strategy?.depositCap.max.minus(props.strategy.depositCap.used)
|
||||||
|
}, [props.strategy])
|
||||||
|
|
||||||
|
const borrowLiquidity = useMemo(
|
||||||
|
() => props.borrowAsset.liquidity?.amount || BN_ZERO,
|
||||||
|
[props.borrowAsset.liquidity?.amount],
|
||||||
|
)
|
||||||
|
|
||||||
|
const additionalDepositFromSwap = useMemo(() => {
|
||||||
|
const value = getCoinValue(
|
||||||
|
BNCoin.fromDenomAndBigNumber(props.borrowAsset.denom, props.borrowAmount),
|
||||||
|
prices,
|
||||||
|
)
|
||||||
|
return getCoinAmount(props.collateralAsset.denom, value, prices)
|
||||||
|
}, [prices, props.borrowAmount, props.borrowAsset.denom, props.collateralAsset])
|
||||||
|
|
||||||
|
const collateralWarningMessages = useMemo(() => {
|
||||||
|
const messages: string[] = []
|
||||||
|
if (!props.walletCollateralAsset?.amount) {
|
||||||
|
messages.push(getNoBalanceMessage(props.collateralAsset.symbol))
|
||||||
|
}
|
||||||
|
|
||||||
|
if (props.depositAmount.isGreaterThan(depositCapLeft)) {
|
||||||
|
messages.push(getDepositCapMessage(props.collateralAsset.denom, depositCapLeft, 'deposit'))
|
||||||
|
}
|
||||||
|
|
||||||
|
return messages
|
||||||
|
}, [
|
||||||
|
depositCapLeft,
|
||||||
|
props.collateralAsset.denom,
|
||||||
|
props.collateralAsset.symbol,
|
||||||
|
props.depositAmount,
|
||||||
|
props.walletCollateralAsset?.amount,
|
||||||
|
])
|
||||||
|
|
||||||
|
const borrowWarningMessages = useMemo(() => {
|
||||||
|
const messages: string[] = []
|
||||||
|
|
||||||
|
if (props.borrowAmount.isGreaterThan(props.maxBorrowAmount)) {
|
||||||
|
messages.push(
|
||||||
|
getHealthFactorMessage(props.borrowAsset.denom, props.maxBorrowAmount, 'borrow'),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (props.borrowAmount.isGreaterThan(borrowLiquidity)) {
|
||||||
|
messages.push(getLiquidityMessage(props.borrowAsset.denom, borrowLiquidity))
|
||||||
|
}
|
||||||
|
|
||||||
|
if (additionalDepositFromSwap.plus(props.depositAmount).isGreaterThan(props.maxBorrowAmount)) {
|
||||||
|
messages.push(getDepositCapMessage(props.borrowAsset.denom, depositCapLeft, 'borrow'))
|
||||||
|
}
|
||||||
|
|
||||||
|
return messages
|
||||||
|
}, [
|
||||||
|
additionalDepositFromSwap,
|
||||||
|
borrowLiquidity,
|
||||||
|
depositCapLeft,
|
||||||
|
props.borrowAmount,
|
||||||
|
props.borrowAsset.denom,
|
||||||
|
props.depositAmount,
|
||||||
|
props.maxBorrowAmount,
|
||||||
|
])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const element = document.getElementById(`item-${props.isOpen.findIndex((v) => v)}`)
|
||||||
|
if (element) {
|
||||||
|
element.scrollIntoView({ behavior: 'smooth' })
|
||||||
|
}
|
||||||
|
}, [props.isOpen])
|
||||||
|
|
||||||
return useMemo(() => {
|
return useMemo(() => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
@ -46,8 +130,9 @@ export default function useAccordionItems(props: Props) {
|
|||||||
onChangeAmount={props.onChangeCollateral}
|
onChangeAmount={props.onChangeCollateral}
|
||||||
asset={props.collateralAsset}
|
asset={props.collateralAsset}
|
||||||
onClickBtn={() => props.toggleIsOpen(1)}
|
onClickBtn={() => props.toggleIsOpen(1)}
|
||||||
// TODO: Add check for deposit cap
|
|
||||||
max={BN(props.walletCollateralAsset?.amount || 0)}
|
max={BN(props.walletCollateralAsset?.amount || 0)}
|
||||||
|
depositCapLeft={depositCapLeft}
|
||||||
|
warningMessages={collateralWarningMessages}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
renderSubTitle: () => (
|
renderSubTitle: () => (
|
||||||
@ -55,6 +140,7 @@ export default function useAccordionItems(props: Props) {
|
|||||||
isOpen={props.isOpen[0]}
|
isOpen={props.isOpen[0]}
|
||||||
amount={props.depositAmount}
|
amount={props.depositAmount}
|
||||||
denom={props.collateralAsset.denom}
|
denom={props.collateralAsset.denom}
|
||||||
|
warningMessages={collateralWarningMessages}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
isOpen: props.isOpen[0],
|
isOpen: props.isOpen[0],
|
||||||
@ -73,6 +159,8 @@ export default function useAccordionItems(props: Props) {
|
|||||||
max={props.maxBorrowAmount}
|
max={props.maxBorrowAmount}
|
||||||
positionValue={props.positionValue}
|
positionValue={props.positionValue}
|
||||||
maxLeverage={props.strategy?.maxLeverage || 1}
|
maxLeverage={props.strategy?.maxLeverage || 1}
|
||||||
|
baseApy={props.strategy?.apy || 0}
|
||||||
|
warningMessages={borrowWarningMessages}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
renderSubTitle: () => (
|
renderSubTitle: () => (
|
||||||
@ -80,6 +168,7 @@ export default function useAccordionItems(props: Props) {
|
|||||||
leverage={props.leverage}
|
leverage={props.leverage}
|
||||||
isOpen={props.isOpen[1]}
|
isOpen={props.isOpen[1]}
|
||||||
positionValue={props.positionValue}
|
positionValue={props.positionValue}
|
||||||
|
warningMessages={borrowWarningMessages}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
isOpen: props.isOpen[1],
|
isOpen: props.isOpen[1],
|
||||||
@ -97,17 +186,28 @@ export default function useAccordionItems(props: Props) {
|
|||||||
onClickBtn={() => props.toggleIsOpen(3)}
|
onClickBtn={() => props.toggleIsOpen(3)}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
renderSubTitle: () =>
|
renderSubTitle: () => (
|
||||||
props.selectedAccount && !props.isOpen[2] ? (
|
<SelectAccountSubTitle
|
||||||
<SubTitle text={`Account ${props.selectedAccount.id}`} />
|
isOpen={props.isOpen[2]}
|
||||||
) : null,
|
isSummaryOpen={props.isOpen[3] || props.isOpen.every((i) => !i)}
|
||||||
|
selectedAccountId={props.selectedAccount?.id}
|
||||||
|
type='select'
|
||||||
|
/>
|
||||||
|
),
|
||||||
isOpen: props.isOpen[2],
|
isOpen: props.isOpen[2],
|
||||||
toggleOpen: props.toggleIsOpen,
|
toggleOpen: props.toggleIsOpen,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
title: 'Create HLS Account',
|
title: 'Create HLS Account',
|
||||||
renderContent: () => <CreateAccount />,
|
renderContent: () => <CreateAccount />,
|
||||||
renderSubTitle: () => null,
|
renderSubTitle: () => (
|
||||||
|
<SelectAccountSubTitle
|
||||||
|
isOpen={props.isOpen[2]}
|
||||||
|
isSummaryOpen={props.isOpen[3] || props.isOpen.every((i) => !i)}
|
||||||
|
selectedAccountId={props.selectedAccount?.id}
|
||||||
|
type='create'
|
||||||
|
/>
|
||||||
|
),
|
||||||
isOpen: props.isOpen[2],
|
isOpen: props.isOpen[2],
|
||||||
toggleOpen: props.toggleIsOpen,
|
toggleOpen: props.toggleIsOpen,
|
||||||
},
|
},
|
||||||
@ -124,6 +224,12 @@ export default function useAccordionItems(props: Props) {
|
|||||||
borrowAsset={props.borrowAsset}
|
borrowAsset={props.borrowAsset}
|
||||||
apy={props.apy}
|
apy={props.apy}
|
||||||
onClickBtn={props.execute}
|
onClickBtn={props.execute}
|
||||||
|
disabled={
|
||||||
|
collateralWarningMessages.length > 0 ||
|
||||||
|
borrowWarningMessages.length > 0 ||
|
||||||
|
props.depositAmount.isZero() ||
|
||||||
|
!props.selectedAccount
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
renderSubTitle: () => null,
|
renderSubTitle: () => null,
|
||||||
@ -131,5 +237,5 @@ export default function useAccordionItems(props: Props) {
|
|||||||
toggleOpen: props.toggleIsOpen,
|
toggleOpen: props.toggleIsOpen,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}, [props])
|
}, [borrowWarningMessages, collateralWarningMessages, depositCapLeft, props])
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,12 @@ import { useCallback, useMemo } from 'react'
|
|||||||
|
|
||||||
import useDepositHlsVault from 'hooks/useDepositHlsVault'
|
import useDepositHlsVault from 'hooks/useDepositHlsVault'
|
||||||
import useHealthComputer from 'hooks/useHealthComputer'
|
import useHealthComputer from 'hooks/useHealthComputer'
|
||||||
|
import useSwapValueLoss from 'hooks/useSwapValueLoss'
|
||||||
import { useUpdatedAccount } from 'hooks/useUpdatedAccount'
|
import { useUpdatedAccount } from 'hooks/useUpdatedAccount'
|
||||||
import useStore from 'store'
|
import useStore from 'store'
|
||||||
import { BNCoin } from 'types/classes/BNCoin'
|
import { BNCoin } from 'types/classes/BNCoin'
|
||||||
|
import { SWAP_FEE_BUFFER } from 'utils/constants'
|
||||||
|
import { BN } from 'utils/helpers'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
borrowAsset: Asset
|
borrowAsset: Asset
|
||||||
@ -16,6 +19,10 @@ export default function useStakingController(props: Props) {
|
|||||||
const { collateralAsset, borrowAsset, selectedAccount } = props
|
const { collateralAsset, borrowAsset, selectedAccount } = props
|
||||||
const addToStakingStrategy = useStore((s) => s.addToStakingStrategy)
|
const addToStakingStrategy = useStore((s) => s.addToStakingStrategy)
|
||||||
|
|
||||||
|
const { data: swapValueLoss } = useSwapValueLoss(
|
||||||
|
props.borrowAsset.denom,
|
||||||
|
props.collateralAsset.denom,
|
||||||
|
)
|
||||||
const {
|
const {
|
||||||
leverage,
|
leverage,
|
||||||
setDepositAmount,
|
setDepositAmount,
|
||||||
@ -33,9 +40,13 @@ export default function useStakingController(props: Props) {
|
|||||||
const { computeMaxBorrowAmount } = useHealthComputer(updatedAccount)
|
const { computeMaxBorrowAmount } = useHealthComputer(updatedAccount)
|
||||||
|
|
||||||
const maxBorrowAmount = useMemo(() => {
|
const maxBorrowAmount = useMemo(() => {
|
||||||
// TODO: Perhaps we need a specific target for this -> target = swap
|
return computeMaxBorrowAmount(props.borrowAsset.denom, {
|
||||||
return computeMaxBorrowAmount(props.borrowAsset.denom, 'deposit')
|
swap: {
|
||||||
}, [computeMaxBorrowAmount, props.borrowAsset.denom])
|
denom_out: props.collateralAsset.denom,
|
||||||
|
slippage: BN(swapValueLoss).plus(SWAP_FEE_BUFFER).toString(),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}, [computeMaxBorrowAmount, props.borrowAsset.denom, props.collateralAsset.denom, swapValueLoss])
|
||||||
|
|
||||||
const execute = useCallback(() => {
|
const execute = useCallback(() => {
|
||||||
useStore.setState({ hlsModal: null })
|
useStore.setState({ hlsModal: null })
|
||||||
|
@ -42,17 +42,11 @@ export default function useVaultController(props: Props) {
|
|||||||
const { updatedAccount, simulateVaultDeposit } = useUpdatedAccount(selectedAccount)
|
const { updatedAccount, simulateVaultDeposit } = useUpdatedAccount(selectedAccount)
|
||||||
const { computeMaxBorrowAmount } = useHealthComputer(updatedAccount)
|
const { computeMaxBorrowAmount } = useHealthComputer(updatedAccount)
|
||||||
|
|
||||||
const maxBorrowAmount = useMemo(
|
const maxBorrowAmount = useMemo(() => {
|
||||||
// TODO: Check that the amount is actually the HLS amount
|
return computeMaxBorrowAmount(props.borrowAsset.denom, {
|
||||||
// TODO: Add check for market liquidity
|
vault: { address: props.vault?.address },
|
||||||
// TODO: Add check for deposit cap
|
}).plus(borrowAmount)
|
||||||
() => {
|
}, [borrowAmount, computeMaxBorrowAmount, props.borrowAsset.denom, props.vault?.address])
|
||||||
return computeMaxBorrowAmount(props.borrowAsset.denom, {
|
|
||||||
vault: { address: props.vault?.address },
|
|
||||||
}).plus(borrowAmount)
|
|
||||||
},
|
|
||||||
[borrowAmount, computeMaxBorrowAmount, props.borrowAsset.denom, props.vault?.address],
|
|
||||||
)
|
|
||||||
|
|
||||||
const execute = useCallback(() => {
|
const execute = useCallback(() => {
|
||||||
depositIntoVault({
|
depositIntoVault({
|
||||||
|
@ -15,19 +15,27 @@ import { BNCoin } from 'types/classes/BNCoin'
|
|||||||
import { getAccountPositionValues } from 'utils/accounts'
|
import { getAccountPositionValues } from 'utils/accounts'
|
||||||
import { getHlsStakingChangeLevActions } from 'utils/actions'
|
import { getHlsStakingChangeLevActions } from 'utils/actions'
|
||||||
import { byDenom } from 'utils/array'
|
import { byDenom } from 'utils/array'
|
||||||
|
import { SWAP_FEE_BUFFER } from 'utils/constants'
|
||||||
|
import { getLeveragedApy } from 'utils/math'
|
||||||
|
import { getDepositCapMessage, getHealthFactorMessage, getLiquidityMessage } from 'utils/messages'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
account: HLSAccountWithStrategy
|
account: HLSAccountWithStrategy
|
||||||
action: HlsStakingManageAction
|
action: HlsStakingManageAction
|
||||||
borrowAsset: Asset
|
borrowAsset: BorrowAsset
|
||||||
collateralAsset: Asset
|
collateralAsset: Asset
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ChangeLeverage(props: Props) {
|
export default function ChangeLeverage(props: Props) {
|
||||||
const { data: prices } = usePrices()
|
const { data: prices } = usePrices()
|
||||||
const [slippage] = useLocalStorage<number>(LocalStorageKeys.SLIPPAGE, DEFAULT_SETTINGS.slippage)
|
const [slippage] = useLocalStorage<number>(LocalStorageKeys.SLIPPAGE, DEFAULT_SETTINGS.slippage)
|
||||||
const { updatedAccount, simulateHlsStakingDeposit, simulateHlsStakingWithdraw, leverage } =
|
const {
|
||||||
useUpdatedAccount(props.account)
|
updatedAccount,
|
||||||
|
simulateHlsStakingDeposit,
|
||||||
|
simulateHlsStakingWithdraw,
|
||||||
|
leverage,
|
||||||
|
addedTrades,
|
||||||
|
} = useUpdatedAccount(props.account)
|
||||||
|
|
||||||
const changeHlsStakingLeverage = useStore((s) => s.changeHlsStakingLeverage)
|
const changeHlsStakingLeverage = useStore((s) => s.changeHlsStakingLeverage)
|
||||||
const { computeMaxBorrowAmount } = useHealthComputer(props.account)
|
const { computeMaxBorrowAmount } = useHealthComputer(props.account)
|
||||||
@ -38,8 +46,13 @@ export default function ChangeLeverage(props: Props) {
|
|||||||
|
|
||||||
const [currentDebt, setAmount] = useState(previousDebt)
|
const [currentDebt, setAmount] = useState(previousDebt)
|
||||||
const maxBorrowAmount = useMemo(() => {
|
const maxBorrowAmount = useMemo(() => {
|
||||||
return computeMaxBorrowAmount(props.borrowAsset.denom, 'deposit').plus(previousDebt)
|
return computeMaxBorrowAmount(props.borrowAsset.denom, {
|
||||||
}, [computeMaxBorrowAmount, previousDebt, props.borrowAsset.denom])
|
swap: {
|
||||||
|
denom_out: props.collateralAsset.denom,
|
||||||
|
slippage: SWAP_FEE_BUFFER.toString(),
|
||||||
|
},
|
||||||
|
}).plus(previousDebt)
|
||||||
|
}, [computeMaxBorrowAmount, previousDebt, props.borrowAsset.denom, props.collateralAsset.denom])
|
||||||
|
|
||||||
const onChangeAmount = useCallback(
|
const onChangeAmount = useCallback(
|
||||||
(currentDebt: BigNumber) => {
|
(currentDebt: BigNumber) => {
|
||||||
@ -98,6 +111,50 @@ export default function ChangeLeverage(props: Props) {
|
|||||||
slippage,
|
slippage,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
const addedDepositAmount = useMemo(
|
||||||
|
() => addedTrades.find(byDenom(props.collateralAsset.denom))?.amount || BN_ZERO,
|
||||||
|
[addedTrades, props.collateralAsset.denom],
|
||||||
|
)
|
||||||
|
|
||||||
|
const depositCapLeft = useMemo(
|
||||||
|
() => props.account.strategy.depositCap.max.minus(props.account.strategy.depositCap.used),
|
||||||
|
[props.account.strategy.depositCap.max, props.account.strategy.depositCap.used],
|
||||||
|
)
|
||||||
|
|
||||||
|
const apy = useMemo(() => {
|
||||||
|
if (!props.borrowAsset.borrowRate || !props.account.strategy.apy) return 0
|
||||||
|
return getLeveragedApy(props.account.strategy.apy, props.borrowAsset.borrowRate, leverage)
|
||||||
|
}, [leverage, props.account.strategy.apy, props.borrowAsset.borrowRate])
|
||||||
|
|
||||||
|
const warningMessages = useMemo(() => {
|
||||||
|
const messages: string[] = []
|
||||||
|
|
||||||
|
const borrowLiquidity = props.borrowAsset.liquidity?.amount || BN_ZERO
|
||||||
|
|
||||||
|
if (borrowLiquidity.isLessThan(currentDebt.minus(previousDebt))) {
|
||||||
|
messages.push(getLiquidityMessage(props.borrowAsset.denom, borrowLiquidity))
|
||||||
|
}
|
||||||
|
|
||||||
|
if (maxBorrowAmount.isLessThan(currentDebt)) {
|
||||||
|
messages.push(getHealthFactorMessage(props.borrowAsset.denom, maxBorrowAmount, 'borrow'))
|
||||||
|
}
|
||||||
|
|
||||||
|
if (addedDepositAmount.isGreaterThan(depositCapLeft)) {
|
||||||
|
messages.push(getDepositCapMessage(props.collateralAsset.denom, depositCapLeft, 'borrow'))
|
||||||
|
}
|
||||||
|
|
||||||
|
return messages
|
||||||
|
}, [
|
||||||
|
addedDepositAmount,
|
||||||
|
currentDebt,
|
||||||
|
depositCapLeft,
|
||||||
|
maxBorrowAmount,
|
||||||
|
previousDebt,
|
||||||
|
props.borrowAsset.denom,
|
||||||
|
props.borrowAsset.liquidity?.amount,
|
||||||
|
props.collateralAsset.denom,
|
||||||
|
])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<TokenInputWithSlider
|
<TokenInputWithSlider
|
||||||
@ -110,10 +167,15 @@ export default function ChangeLeverage(props: Props) {
|
|||||||
current: leverage,
|
current: leverage,
|
||||||
max: props.account.strategy.maxLeverage,
|
max: props.account.strategy.maxLeverage,
|
||||||
}}
|
}}
|
||||||
|
warningMessages={warningMessages}
|
||||||
/>
|
/>
|
||||||
<div className='flex flex-col gap-6'>
|
<div className='flex flex-col gap-6'>
|
||||||
<LeverageSummary asset={props.borrowAsset} positionValue={positionValue} />
|
<LeverageSummary asset={props.borrowAsset} positionValue={positionValue} apy={apy} />
|
||||||
<Button onClick={handleOnClick} text='Confirm' />
|
<Button
|
||||||
|
onClick={handleOnClick}
|
||||||
|
text='Confirm'
|
||||||
|
disabled={currentDebt.isEqualTo(previousDebt) || warningMessages.length !== 0}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import BigNumber from 'bignumber.js'
|
import BigNumber from 'bignumber.js'
|
||||||
import React, { useCallback, useEffect, useMemo } from 'react'
|
import React, { useCallback, useMemo } from 'react'
|
||||||
|
|
||||||
import Button from 'components/Button'
|
import Button from 'components/Button'
|
||||||
import Divider from 'components/Divider'
|
import Divider from 'components/Divider'
|
||||||
@ -21,18 +21,25 @@ import { calculateAccountLeverage } from 'utils/accounts'
|
|||||||
import { byDenom } from 'utils/array'
|
import { byDenom } from 'utils/array'
|
||||||
import { getCoinAmount, getCoinValue } from 'utils/formatters'
|
import { getCoinAmount, getCoinValue } from 'utils/formatters'
|
||||||
import { BN } from 'utils/helpers'
|
import { BN } from 'utils/helpers'
|
||||||
|
import {
|
||||||
|
getDepositCapMessage,
|
||||||
|
getHealthFactorMessage,
|
||||||
|
getLiquidityMessage,
|
||||||
|
getNoBalanceMessage,
|
||||||
|
} from 'utils/messages'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
account: Account
|
account: HLSAccountWithStrategy
|
||||||
action: HlsStakingManageAction
|
action: HlsStakingManageAction
|
||||||
borrowAsset: Asset
|
borrowAsset: BorrowAsset
|
||||||
collateralAsset: Asset
|
collateralAsset: Asset
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Deposit(props: Props) {
|
export default function Deposit(props: Props) {
|
||||||
const { addedDeposits, addedDebts, updatedAccount, simulateHlsStakingDeposit } =
|
const { addedDeposits, addedDebts, updatedAccount, addedTrades, simulateHlsStakingDeposit } =
|
||||||
useUpdatedAccount(props.account)
|
useUpdatedAccount(props.account)
|
||||||
const { computeMaxBorrowAmount } = useHealthComputer(updatedAccount)
|
const { computeMaxBorrowAmount } = useHealthComputer(updatedAccount)
|
||||||
|
|
||||||
const { data: prices } = usePrices()
|
const { data: prices } = usePrices()
|
||||||
const [keepLeverage, toggleKeepLeverage] = useToggle(true)
|
const [keepLeverage, toggleKeepLeverage] = useToggle(true)
|
||||||
const collateralAssetAmountInWallet = BN(
|
const collateralAssetAmountInWallet = BN(
|
||||||
@ -55,6 +62,11 @@ export default function Deposit(props: Props) {
|
|||||||
[addedDeposits, props.collateralAsset.denom],
|
[addedDeposits, props.collateralAsset.denom],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const addedDepositFromSwap = useMemo(
|
||||||
|
() => addedTrades.find(byDenom(props.collateralAsset.denom))?.amount || BN_ZERO,
|
||||||
|
[addedTrades, props.collateralAsset.denom],
|
||||||
|
)
|
||||||
|
|
||||||
const borrowCoin = useMemo(
|
const borrowCoin = useMemo(
|
||||||
() =>
|
() =>
|
||||||
BNCoin.fromDenomAndBigNumber(
|
BNCoin.fromDenomAndBigNumber(
|
||||||
@ -64,25 +76,54 @@ export default function Deposit(props: Props) {
|
|||||||
[addedDebts, props.borrowAsset.denom],
|
[addedDebts, props.borrowAsset.denom],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const warningMessages = useMemo(() => {
|
||||||
|
let messages: string[] = []
|
||||||
|
const capLeft = props.account.strategy.depositCap.max.minus(
|
||||||
|
props.account.strategy.depositCap.used,
|
||||||
|
)
|
||||||
|
|
||||||
|
if (capLeft.isLessThan(depositCoin.amount.plus(addedDepositFromSwap))) {
|
||||||
|
messages.push(getDepositCapMessage(props.collateralAsset.denom, capLeft, 'deposit'))
|
||||||
|
}
|
||||||
|
|
||||||
|
if (collateralAssetAmountInWallet.isZero()) {
|
||||||
|
messages.push(getNoBalanceMessage(props.collateralAsset.symbol))
|
||||||
|
}
|
||||||
|
|
||||||
|
return messages
|
||||||
|
}, [
|
||||||
|
addedDepositFromSwap,
|
||||||
|
collateralAssetAmountInWallet,
|
||||||
|
depositCoin.amount,
|
||||||
|
props.account.strategy.depositCap.max,
|
||||||
|
props.account.strategy.depositCap.used,
|
||||||
|
props.collateralAsset.denom,
|
||||||
|
props.collateralAsset.symbol,
|
||||||
|
])
|
||||||
|
|
||||||
const maxBorrowAmount = useMemo(
|
const maxBorrowAmount = useMemo(
|
||||||
() => computeMaxBorrowAmount(props.collateralAsset.denom, 'deposit'),
|
() => computeMaxBorrowAmount(props.borrowAsset.denom, 'deposit'),
|
||||||
[computeMaxBorrowAmount, props.collateralAsset.denom],
|
[computeMaxBorrowAmount, props.borrowAsset.denom],
|
||||||
)
|
)
|
||||||
|
|
||||||
useEffect(() => {
|
const borrowWarningMessages = useMemo(() => {
|
||||||
|
let messages: string[] = []
|
||||||
if (borrowCoin.amount.isGreaterThan(maxBorrowAmount)) {
|
if (borrowCoin.amount.isGreaterThan(maxBorrowAmount)) {
|
||||||
simulateHlsStakingDeposit(
|
messages.push(getHealthFactorMessage(props.borrowAsset.denom, maxBorrowAmount, 'borrow'))
|
||||||
BNCoin.fromDenomAndBigNumber(props.collateralAsset.denom, depositCoin.amount),
|
|
||||||
BNCoin.fromDenomAndBigNumber(props.borrowAsset.denom, maxBorrowAmount),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const borrowLiquidity = props.borrowAsset.liquidity?.amount || BN_ZERO
|
||||||
|
|
||||||
|
if (borrowCoin.amount.isGreaterThan(borrowLiquidity)) {
|
||||||
|
messages.push(getLiquidityMessage(props.borrowAsset.denom, borrowLiquidity))
|
||||||
|
}
|
||||||
|
|
||||||
|
return messages
|
||||||
}, [
|
}, [
|
||||||
borrowCoin.amount,
|
borrowCoin.amount,
|
||||||
depositCoin.amount,
|
|
||||||
maxBorrowAmount,
|
maxBorrowAmount,
|
||||||
props.borrowAsset.denom,
|
props.borrowAsset.denom,
|
||||||
props.collateralAsset.denom,
|
props.borrowAsset.liquidity?.amount,
|
||||||
simulateHlsStakingDeposit,
|
|
||||||
])
|
])
|
||||||
|
|
||||||
const actions = useDepositActions({ depositCoin, borrowCoin })
|
const actions = useDepositActions({ depositCoin, borrowCoin })
|
||||||
@ -146,6 +187,7 @@ export default function Deposit(props: Props) {
|
|||||||
{
|
{
|
||||||
title: 'Additional Borrow Amount',
|
title: 'Additional Borrow Amount',
|
||||||
amount: borrowCoin.amount.toNumber(),
|
amount: borrowCoin.amount.toNumber(),
|
||||||
|
warningMessages: borrowWarningMessages,
|
||||||
options: {
|
options: {
|
||||||
suffix: ` ${props.borrowAsset.symbol}`,
|
suffix: ` ${props.borrowAsset.symbol}`,
|
||||||
abbreviated: true,
|
abbreviated: true,
|
||||||
@ -167,6 +209,7 @@ export default function Deposit(props: Props) {
|
|||||||
[
|
[
|
||||||
borrowCoin.amount,
|
borrowCoin.amount,
|
||||||
borrowRate,
|
borrowRate,
|
||||||
|
borrowWarningMessages,
|
||||||
currentDebt,
|
currentDebt,
|
||||||
keepLeverage,
|
keepLeverage,
|
||||||
props.borrowAsset.decimals,
|
props.borrowAsset.decimals,
|
||||||
@ -183,6 +226,7 @@ export default function Deposit(props: Props) {
|
|||||||
max={collateralAssetAmountInWallet}
|
max={collateralAssetAmountInWallet}
|
||||||
onChange={handleOnChange}
|
onChange={handleOnChange}
|
||||||
maxText='In Wallet'
|
maxText='In Wallet'
|
||||||
|
warningMessages={warningMessages}
|
||||||
/>
|
/>
|
||||||
<Divider className='my-6' />
|
<Divider className='my-6' />
|
||||||
<div className='flex flex-wrap items-center justify-between flex-1'>
|
<div className='flex flex-wrap items-center justify-between flex-1'>
|
||||||
@ -197,7 +241,15 @@ export default function Deposit(props: Props) {
|
|||||||
</div>
|
</div>
|
||||||
<div className='flex flex-col gap-4'>
|
<div className='flex flex-col gap-4'>
|
||||||
<SummaryItems items={items} />
|
<SummaryItems items={items} />
|
||||||
<Button onClick={handleDeposit} text='Deposit' disabled={depositCoin.amount.isZero()} />
|
<Button
|
||||||
|
onClick={handleDeposit}
|
||||||
|
text='Deposit'
|
||||||
|
disabled={
|
||||||
|
depositCoin.amount.isZero() ||
|
||||||
|
!!warningMessages.length ||
|
||||||
|
!!borrowWarningMessages.length
|
||||||
|
}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
@ -11,6 +11,7 @@ import useStore from 'store'
|
|||||||
import { BNCoin } from 'types/classes/BNCoin'
|
import { BNCoin } from 'types/classes/BNCoin'
|
||||||
import { byDenom } from 'utils/array'
|
import { byDenom } from 'utils/array'
|
||||||
import { BN } from 'utils/helpers'
|
import { BN } from 'utils/helpers'
|
||||||
|
import { getNoBalanceMessage } from 'utils/messages'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
account: Account
|
account: Account
|
||||||
@ -80,18 +81,30 @@ export default function Repay(props: Props) {
|
|||||||
[props.borrowAsset.denom, removeDebts],
|
[props.borrowAsset.denom, removeDebts],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const warningMessages = useMemo(() => {
|
||||||
|
if (borrowAssetAmountInWallet.isZero()) {
|
||||||
|
return [getNoBalanceMessage(props.borrowAsset.symbol)]
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
}, [borrowAssetAmountInWallet, props.borrowAsset.symbol])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<TokenInputWithSlider
|
<TokenInputWithSlider
|
||||||
amount={removedDebts.find(byDenom(props.borrowAsset.denom))?.amount || BN_ZERO}
|
amount={repayAmount}
|
||||||
asset={props.borrowAsset}
|
asset={props.borrowAsset}
|
||||||
max={maxRepayAmount}
|
max={maxRepayAmount}
|
||||||
onChange={handleOnChange}
|
onChange={handleOnChange}
|
||||||
maxText='In Wallet'
|
maxText='In Wallet'
|
||||||
|
warningMessages={warningMessages}
|
||||||
/>
|
/>
|
||||||
<div className='flex flex-col gap-4'>
|
<div className='flex flex-col gap-4'>
|
||||||
<SummaryItems items={items} />
|
<SummaryItems items={items} />
|
||||||
<Button onClick={handleRepay} text='Repay' />
|
<Button
|
||||||
|
onClick={handleRepay}
|
||||||
|
text='Repay'
|
||||||
|
disabled={warningMessages.length !== 0 || repayAmount.isZero()}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
@ -8,6 +8,7 @@ import { useUpdatedAccount } from 'hooks/useUpdatedAccount'
|
|||||||
import useStore from 'store'
|
import useStore from 'store'
|
||||||
import { BNCoin } from 'types/classes/BNCoin'
|
import { BNCoin } from 'types/classes/BNCoin'
|
||||||
import { byDenom } from 'utils/array'
|
import { byDenom } from 'utils/array'
|
||||||
|
import { getHealthFactorMessage } from 'utils/messages'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
account: Account
|
account: Account
|
||||||
@ -47,16 +48,30 @@ export default function Withdraw(props: Props) {
|
|||||||
})
|
})
|
||||||
}, [props.account.id, removedDeposit, withdraw])
|
}, [props.account.id, removedDeposit, withdraw])
|
||||||
|
|
||||||
|
const withdrawAmount = useMemo(() => removedDeposit?.amount || BN_ZERO, [removedDeposit?.amount])
|
||||||
|
|
||||||
|
const warningMessages = useMemo(() => {
|
||||||
|
if (maxWithdrawAmount.isLessThan(withdrawAmount) || maxWithdrawAmount.isZero()) {
|
||||||
|
return [getHealthFactorMessage(props.collateralAsset.denom, maxWithdrawAmount, 'withdraw')]
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
}, [maxWithdrawAmount, props.collateralAsset.denom, withdrawAmount])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<TokenInputWithSlider
|
<TokenInputWithSlider
|
||||||
amount={removedDeposit?.amount || BN_ZERO}
|
amount={withdrawAmount}
|
||||||
asset={props.collateralAsset}
|
asset={props.collateralAsset}
|
||||||
max={maxWithdrawAmount}
|
max={maxWithdrawAmount}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
maxText='Available'
|
maxText='Available'
|
||||||
|
warningMessages={warningMessages}
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
onClick={onClick}
|
||||||
|
text='Withdraw'
|
||||||
|
disabled={withdrawAmount.isZero() || warningMessages.length !== 0}
|
||||||
/>
|
/>
|
||||||
<Button onClick={onClick} text='Withdraw' disabled={removedDeposit?.amount?.isZero()} />
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import Repay from 'components/Modals/HLS/Manage/Repay'
|
|||||||
import Withdraw from 'components/Modals/HLS/Manage/Withdraw'
|
import Withdraw from 'components/Modals/HLS/Manage/Withdraw'
|
||||||
import ModalContentWithSummary from 'components/Modals/ModalContentWithSummary'
|
import ModalContentWithSummary from 'components/Modals/ModalContentWithSummary'
|
||||||
import useAccount from 'hooks/useAccount'
|
import useAccount from 'hooks/useAccount'
|
||||||
|
import useBorrowAsset from 'hooks/useBorrowAsset'
|
||||||
import useStore from 'store'
|
import useStore from 'store'
|
||||||
import { getAssetByDenom } from 'utils/assets'
|
import { getAssetByDenom } from 'utils/assets'
|
||||||
|
|
||||||
@ -14,7 +15,7 @@ export default function HlsManageModalController() {
|
|||||||
const modal = useStore((s) => s.hlsManageModal)
|
const modal = useStore((s) => s.hlsManageModal)
|
||||||
const { data: account } = useAccount(modal?.accountId)
|
const { data: account } = useAccount(modal?.accountId)
|
||||||
const collateralAsset = getAssetByDenom(modal?.staking.strategy.denoms.deposit || '')
|
const collateralAsset = getAssetByDenom(modal?.staking.strategy.denoms.deposit || '')
|
||||||
const borrowAsset = getAssetByDenom(modal?.staking.strategy.denoms.borrow || '')
|
const borrowAsset = useBorrowAsset(modal?.staking.strategy.denoms.borrow || '')
|
||||||
|
|
||||||
if (!modal || !collateralAsset || !borrowAsset || !account) return null
|
if (!modal || !collateralAsset || !borrowAsset || !account) return null
|
||||||
|
|
||||||
@ -31,7 +32,7 @@ export default function HlsManageModalController() {
|
|||||||
interface Props {
|
interface Props {
|
||||||
account: HLSAccountWithStrategy
|
account: HLSAccountWithStrategy
|
||||||
action: HlsStakingManageAction
|
action: HlsStakingManageAction
|
||||||
borrowAsset: Asset
|
borrowAsset: BorrowAsset
|
||||||
collateralAsset: Asset
|
collateralAsset: Asset
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,6 +60,7 @@ function HlsModal(props: Props) {
|
|||||||
return (
|
return (
|
||||||
<ModalContentWithSummary
|
<ModalContentWithSummary
|
||||||
account={props.account}
|
account={props.account}
|
||||||
|
isHls
|
||||||
header={
|
header={
|
||||||
<Header
|
<Header
|
||||||
action={props.action}
|
action={props.action}
|
||||||
|
@ -3,6 +3,7 @@ import React from 'react'
|
|||||||
import Modal from 'components/Modal'
|
import Modal from 'components/Modal'
|
||||||
import Content from 'components/Modals/HLS/Deposit'
|
import Content from 'components/Modals/HLS/Deposit'
|
||||||
import Header from 'components/Modals/HLS/Header'
|
import Header from 'components/Modals/HLS/Header'
|
||||||
|
import useBorrowAsset from 'hooks/useBorrowAsset'
|
||||||
import useStore from 'store'
|
import useStore from 'store'
|
||||||
import { getAssetByDenom } from 'utils/assets'
|
import { getAssetByDenom } from 'utils/assets'
|
||||||
|
|
||||||
@ -12,9 +13,8 @@ export default function HlsModalController() {
|
|||||||
const primaryAsset = getAssetByDenom(
|
const primaryAsset = getAssetByDenom(
|
||||||
modal?.vault?.denoms.primary || modal?.strategy?.denoms.deposit || '',
|
modal?.vault?.denoms.primary || modal?.strategy?.denoms.deposit || '',
|
||||||
)
|
)
|
||||||
const secondaryAsset = getAssetByDenom(
|
|
||||||
modal?.vault?.denoms.secondary || modal?.strategy?.denoms.borrow || '',
|
const secondaryAsset = useBorrowAsset(modal?.strategy?.denoms.borrow || '')
|
||||||
)
|
|
||||||
|
|
||||||
if (!primaryAsset || !secondaryAsset) return null
|
if (!primaryAsset || !secondaryAsset) return null
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ export default function HlsModalController() {
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
primaryAsset: Asset
|
primaryAsset: Asset
|
||||||
secondaryAsset: Asset
|
secondaryAsset: BorrowAsset
|
||||||
strategy?: HLSStrategy
|
strategy?: HLSStrategy
|
||||||
vaultAddress: string | null
|
vaultAddress: string | null
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function DetailsHeader({ data }: Props) {
|
function DetailsHeader({ data }: Props) {
|
||||||
const { asset, marketDepositCap, accountLentAmount } = data
|
const { asset, cap, accountLentAmount } = data
|
||||||
const { data: assetApy } = useAssetIncentivesApy(asset.denom)
|
const { data: assetApy } = useAssetIncentivesApy(asset.denom)
|
||||||
const balanceInWallet = useCurrentWalletBalance(asset.denom)
|
const balanceInWallet = useCurrentWalletBalance(asset.denom)
|
||||||
|
|
||||||
@ -59,9 +59,7 @@ function DetailsHeader({ data }: Props) {
|
|||||||
)}
|
)}
|
||||||
<TitleAndSubCell
|
<TitleAndSubCell
|
||||||
title={
|
title={
|
||||||
<DisplayCurrency
|
<DisplayCurrency coin={new BNCoin({ denom: asset.denom, amount: cap.max.toString() })} />
|
||||||
coin={new BNCoin({ denom: asset.denom, amount: marketDepositCap.toString() })}
|
|
||||||
/>
|
|
||||||
}
|
}
|
||||||
sub={'Deposit Cap'}
|
sub={'Deposit Cap'}
|
||||||
/>
|
/>
|
||||||
|
@ -8,6 +8,7 @@ import Modal, { ModalProps } from 'components/Modal'
|
|||||||
import useStore from 'store'
|
import useStore from 'store'
|
||||||
|
|
||||||
interface Props extends ModalProps {
|
interface Props extends ModalProps {
|
||||||
|
isHls?: boolean
|
||||||
account?: Account
|
account?: Account
|
||||||
isContentCard?: boolean
|
isContentCard?: boolean
|
||||||
subHeader?: React.ReactNode
|
subHeader?: React.ReactNode
|
||||||
@ -47,7 +48,9 @@ export default function ModalContentWithSummary(props: Props) {
|
|||||||
>
|
>
|
||||||
{props.subHeader && props.subHeader}
|
{props.subHeader && props.subHeader}
|
||||||
{modalContent(props.content, props.isContentCard, props.account)}
|
{modalContent(props.content, props.isContentCard, props.account)}
|
||||||
{props.account && <AccountSummary account={updatedAccount || props.account} />}
|
{props.account && (
|
||||||
|
<AccountSummary account={updatedAccount || props.account} isHls={props.isHls} />
|
||||||
|
)}
|
||||||
</Modal>
|
</Modal>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -189,6 +189,7 @@ export default function VaultBorrowings(props: VaultBorrowingsProps) {
|
|||||||
maxText='Max Borrow'
|
maxText='Max Borrow'
|
||||||
onChange={(amount) => updateAssets(coin.denom, amount)}
|
onChange={(amount) => updateAssets(coin.denom, amount)}
|
||||||
onDelete={() => onDelete(coin.denom)}
|
onDelete={() => onDelete(coin.denom)}
|
||||||
|
warningMessages={[]}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
@ -224,7 +225,7 @@ export default function VaultBorrowings(props: VaultBorrowingsProps) {
|
|||||||
</div>
|
</div>
|
||||||
{props.borrowings.map((coin) => {
|
{props.borrowings.map((coin) => {
|
||||||
const asset = getAssetByDenom(coin.denom)
|
const asset = getAssetByDenom(coin.denom)
|
||||||
const borrowRate = marketAssets?.find((market) => market.denom === coin.denom)?.borrowRate
|
const borrowRate = marketAssets?.find((market) => market.denom === coin.denom)?.apy.borrow
|
||||||
|
|
||||||
if (!asset || !borrowRate)
|
if (!asset || !borrowRate)
|
||||||
return <React.Fragment key={`borrow-rate-${coin.denom}`}></React.Fragment>
|
return <React.Fragment key={`borrow-rate-${coin.denom}`}></React.Fragment>
|
||||||
|
@ -212,7 +212,7 @@ export default function VaultDeposit(props: Props) {
|
|||||||
max={availablePrimaryAmount}
|
max={availablePrimaryAmount}
|
||||||
maxText='Balance'
|
maxText='Balance'
|
||||||
asset={primaryAsset}
|
asset={primaryAsset}
|
||||||
warning={availablePrimaryAmount.isZero() ? getWarningText(primaryAsset) : undefined}
|
warningMessages={availablePrimaryAmount.isZero() ? [getWarningText(primaryAsset)] : []}
|
||||||
disabled={disableInput}
|
disabled={disableInput}
|
||||||
/>
|
/>
|
||||||
{!props.isCustomRatio && (
|
{!props.isCustomRatio && (
|
||||||
@ -224,8 +224,10 @@ export default function VaultDeposit(props: Props) {
|
|||||||
max={availableSecondaryAmount}
|
max={availableSecondaryAmount}
|
||||||
maxText='Balance'
|
maxText='Balance'
|
||||||
asset={secondaryAsset}
|
asset={secondaryAsset}
|
||||||
warning={availableSecondaryAmount.isZero() ? getWarningText(secondaryAsset) : undefined}
|
|
||||||
disabled={disableInput}
|
disabled={disableInput}
|
||||||
|
warningMessages={
|
||||||
|
availableSecondaryAmount.isZero() ? [getWarningText(secondaryAsset)] : []
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -7,18 +7,20 @@ import Modal from 'components/Modal'
|
|||||||
import Text from 'components/Text'
|
import Text from 'components/Text'
|
||||||
import { DEFAULT_SETTINGS } from 'constants/defaultSettings'
|
import { DEFAULT_SETTINGS } from 'constants/defaultSettings'
|
||||||
import { LocalStorageKeys } from 'constants/localStorageKeys'
|
import { LocalStorageKeys } from 'constants/localStorageKeys'
|
||||||
|
import { ORACLE_DENOM } from 'constants/oracle'
|
||||||
import useAccountId from 'hooks/useAccountId'
|
import useAccountId from 'hooks/useAccountId'
|
||||||
import useLocalStorage from 'hooks/useLocalStorage'
|
import useLocalStorage from 'hooks/useLocalStorage'
|
||||||
|
import usePrices from 'hooks/usePrices'
|
||||||
import useStore from 'store'
|
import useStore from 'store'
|
||||||
import { BNCoin } from 'types/classes/BNCoin'
|
import { BNCoin } from 'types/classes/BNCoin'
|
||||||
|
import { byDenom } from 'utils/array'
|
||||||
import { getAssetByDenom } from 'utils/assets'
|
import { getAssetByDenom } from 'utils/assets'
|
||||||
import { demagnify } from 'utils/formatters'
|
|
||||||
|
|
||||||
export default function WithdrawFromVaultsModal() {
|
export default function WithdrawFromVaultsModal() {
|
||||||
const modal = useStore((s) => s.withdrawFromVaultsModal)
|
const modal = useStore((s) => s.withdrawFromVaultsModal)
|
||||||
const accountId = useAccountId()
|
const accountId = useAccountId()
|
||||||
|
const { data: prices } = usePrices()
|
||||||
const withdrawFromVaults = useStore((s) => s.withdrawFromVaults)
|
const withdrawFromVaults = useStore((s) => s.withdrawFromVaults)
|
||||||
const baseCurrency = useStore((s) => s.baseCurrency)
|
|
||||||
const [slippage] = useLocalStorage<number>(LocalStorageKeys.SLIPPAGE, DEFAULT_SETTINGS.slippage)
|
const [slippage] = useLocalStorage<number>(LocalStorageKeys.SLIPPAGE, DEFAULT_SETTINGS.slippage)
|
||||||
|
|
||||||
function onClose() {
|
function onClose() {
|
||||||
@ -52,12 +54,18 @@ export default function WithdrawFromVaultsModal() {
|
|||||||
{modal ? (
|
{modal ? (
|
||||||
<div className='flex flex-wrap w-full gap-4'>
|
<div className='flex flex-wrap w-full gap-4'>
|
||||||
{modal.map((vault) => {
|
{modal.map((vault) => {
|
||||||
const positionValue = vault.values.primary.plus(vault.values.secondary)
|
const positionValue = vault.values.unlocking
|
||||||
const coin = BNCoin.fromDenomAndBigNumber(baseCurrency.denom, positionValue)
|
const coin = BNCoin.fromDenomAndBigNumber(ORACLE_DENOM, positionValue)
|
||||||
const primaryAsset = getAssetByDenom(vault.denoms.primary)
|
const primaryAsset = getAssetByDenom(vault.denoms.primary)
|
||||||
const secondaryAsset = getAssetByDenom(vault.denoms.secondary)
|
const secondaryAsset = getAssetByDenom(vault.denoms.secondary)
|
||||||
|
|
||||||
if (!primaryAsset || !secondaryAsset) return null
|
if (!primaryAsset || !secondaryAsset) return null
|
||||||
|
const primaryAssetPrice = prices.find(byDenom(primaryAsset.denom))?.amount ?? 1
|
||||||
|
const secondaryAssetPrice = prices.find(byDenom(secondaryAsset.denom))?.amount ?? 1
|
||||||
|
|
||||||
|
const primaryAssetAmount = positionValue.dividedBy(primaryAssetPrice).dividedBy(2)
|
||||||
|
const secondaryAssetAmount = positionValue.dividedBy(secondaryAssetPrice).dividedBy(2)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex items-center gap-4' key={vault.unlockId}>
|
<div className='flex items-center gap-4' key={vault.unlockId}>
|
||||||
<DoubleLogo
|
<DoubleLogo
|
||||||
@ -73,15 +81,21 @@ export default function WithdrawFromVaultsModal() {
|
|||||||
<div className='flex flex-wrap'>
|
<div className='flex flex-wrap'>
|
||||||
<DisplayCurrency coin={coin} className='w-full text-right' />
|
<DisplayCurrency coin={coin} className='w-full text-right' />
|
||||||
<FormattedNumber
|
<FormattedNumber
|
||||||
amount={demagnify(vault.amounts.primary, primaryAsset)}
|
amount={Number(primaryAssetAmount.toPrecision(4))}
|
||||||
className='w-full text-sm text-right text-white/50'
|
className='w-full text-sm text-right text-white/50'
|
||||||
options={{ suffix: ` ${vault.symbols.primary}` }}
|
options={{
|
||||||
|
suffix: ` ${vault.symbols.primary}`,
|
||||||
|
maxDecimals: primaryAsset.decimals,
|
||||||
|
}}
|
||||||
animate
|
animate
|
||||||
/>
|
/>
|
||||||
<FormattedNumber
|
<FormattedNumber
|
||||||
amount={demagnify(vault.amounts.secondary, secondaryAsset)}
|
amount={Number(secondaryAssetAmount.toPrecision(4))}
|
||||||
className='w-full text-sm text-right text-white/50'
|
className='w-full text-sm text-right text-white/50'
|
||||||
options={{ suffix: ` ${vault.symbols.secondary}` }}
|
options={{
|
||||||
|
suffix: ` ${vault.symbols.secondary}`,
|
||||||
|
maxDecimals: secondaryAsset.decimals,
|
||||||
|
}}
|
||||||
animate
|
animate
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,18 +1,28 @@
|
|||||||
|
import { useShuttle } from '@delphi-labs/shuttle-react'
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
|
import { useMemo } from 'react'
|
||||||
|
|
||||||
|
import Button from 'components/Button'
|
||||||
import { menuTree } from 'components/Header/DesktopHeader'
|
import { menuTree } from 'components/Header/DesktopHeader'
|
||||||
import { Logo } from 'components/Icons'
|
import { ChevronDown, Logo } from 'components/Icons'
|
||||||
import { NavLink } from 'components/Navigation/NavLink'
|
import { NavLink } from 'components/Navigation/NavLink'
|
||||||
import useAccountId from 'hooks/useAccountId'
|
import useAccountId from 'hooks/useAccountId'
|
||||||
|
import useToggle from 'hooks/useToggle'
|
||||||
import useStore from 'store'
|
import useStore from 'store'
|
||||||
|
import { WalletID } from 'types/enums/wallet'
|
||||||
import { getRoute } from 'utils/route'
|
import { getRoute } from 'utils/route'
|
||||||
|
|
||||||
export default function DesktopNavigation() {
|
export default function DesktopNavigation() {
|
||||||
|
const [showMenu, setShowMenu] = useToggle()
|
||||||
|
const { recentWallet } = useShuttle()
|
||||||
|
const walletId = (recentWallet?.providerId as WalletID) ?? WalletID.Keplr
|
||||||
const address = useStore((s) => s.address)
|
const address = useStore((s) => s.address)
|
||||||
const accountId = useAccountId()
|
const accountId = useAccountId()
|
||||||
|
|
||||||
const focusComponent = useStore((s) => s.focusComponent)
|
const focusComponent = useStore((s) => s.focusComponent)
|
||||||
|
|
||||||
|
const menu = useMemo(() => menuTree(walletId), [walletId])
|
||||||
|
|
||||||
function getIsActive(pages: string[]) {
|
function getIsActive(pages: string[]) {
|
||||||
const segments = location.pathname.split('/')
|
const segments = location.pathname.split('/')
|
||||||
return pages.some((page) => segments.includes(page))
|
return pages.some((page) => segments.includes(page))
|
||||||
@ -21,7 +31,9 @@ export default function DesktopNavigation() {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
focusComponent ? 'absolute left-4 top-3 z-1 block' : 'flex flex-1 items-center',
|
focusComponent
|
||||||
|
? 'absolute left-4 top-3 z-1 block'
|
||||||
|
: 'flex flex-1 items-center relative z-50',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<NavLink href={getRoute('trade', address, accountId)}>
|
<NavLink href={getRoute('trade', address, accountId)}>
|
||||||
@ -30,16 +42,69 @@ export default function DesktopNavigation() {
|
|||||||
</span>
|
</span>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
{!focusComponent && (
|
{!focusComponent && (
|
||||||
<div className='flex gap-8 px-6'>
|
<div className='flex gap-8 px-6 @container/navigation relative flex-1'>
|
||||||
{menuTree.map((item, index) => (
|
{menu.map((item, index) => (
|
||||||
<NavLink
|
<NavLink
|
||||||
key={index}
|
key={index}
|
||||||
href={getRoute(item.pages[0], address, accountId)}
|
href={
|
||||||
|
item.externalUrl ? item.externalUrl : getRoute(item.pages[0], address, accountId)
|
||||||
|
}
|
||||||
isActive={getIsActive(item.pages)}
|
isActive={getIsActive(item.pages)}
|
||||||
|
className={`@nav-${index}/navigation:inline-block hidden whitespace-nowrap`}
|
||||||
|
target={item.externalUrl ? '_blank' : undefined}
|
||||||
>
|
>
|
||||||
{item.label}
|
{item.label}
|
||||||
</NavLink>
|
</NavLink>
|
||||||
))}
|
))}
|
||||||
|
<div className={`@nav-${menu.length - 1}/navigation:hidden flex items-center relative`}>
|
||||||
|
<Button
|
||||||
|
leftIcon={<ChevronDown />}
|
||||||
|
color='quaternary'
|
||||||
|
variant='transparent'
|
||||||
|
onClick={() => setShowMenu(!showMenu)}
|
||||||
|
text='More'
|
||||||
|
className='!text-base !p-0 !min-h-0'
|
||||||
|
/>
|
||||||
|
{showMenu && (
|
||||||
|
<>
|
||||||
|
<div className='absolute left-0 top-[calc(100%+4px)] z-50'>
|
||||||
|
<ul
|
||||||
|
className={classNames(
|
||||||
|
'py-4 list-none flex flex-wrap gap-2 bg-white/10 backdrop-blur-lg',
|
||||||
|
'relative isolate max-w-full overflow-hidden rounded-sm',
|
||||||
|
'before:content-[" "] before:absolute before:inset-0 before:-z-1 before:rounded-sm before:p-[1px] before:border-glas',
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{menu.map((item, index) => (
|
||||||
|
<li
|
||||||
|
className={`@nav-${index}/navigation:hidden block w-full m-0`}
|
||||||
|
key={index}
|
||||||
|
>
|
||||||
|
<NavLink
|
||||||
|
href={
|
||||||
|
item.externalUrl
|
||||||
|
? item.externalUrl
|
||||||
|
: getRoute(item.pages[0], address, accountId)
|
||||||
|
}
|
||||||
|
onClick={() => setShowMenu(false)}
|
||||||
|
isActive={getIsActive(item.pages)}
|
||||||
|
className='w-full px-4 whitespace-nowrap'
|
||||||
|
target={item.externalUrl ? '_blank' : undefined}
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</NavLink>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className='fixed -top-6 -left-[55px] z-40 w-screen h-screen hover:cursor-pointer'
|
||||||
|
onClick={() => setShowMenu(false)}
|
||||||
|
role='button'
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,16 +6,22 @@ interface Props {
|
|||||||
href: string
|
href: string
|
||||||
children: string | ReactNode
|
children: string | ReactNode
|
||||||
isActive?: boolean
|
isActive?: boolean
|
||||||
|
className?: string
|
||||||
|
onClick?: () => void
|
||||||
|
target?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export const NavLink = (props: Props) => {
|
export const NavLink = (props: Props) => {
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
to={props.href}
|
to={props.href}
|
||||||
|
onClick={props.onClick ? props.onClick : undefined}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
'text-sm font-semibold hover:text-white active:text-white',
|
props.className,
|
||||||
|
'font-semibold hover:text-white active:text-white',
|
||||||
props.isActive ? 'pointer-events-none text-white' : 'text-white/60',
|
props.isActive ? 'pointer-events-none text-white' : 'text-white/60',
|
||||||
)}
|
)}
|
||||||
|
target={props.target}
|
||||||
>
|
>
|
||||||
{props.children}
|
{props.children}
|
||||||
</Link>
|
</Link>
|
||||||
|
15
src/components/Perps/Module/LeverageButtons.tsx
Normal file
15
src/components/Perps/Module/LeverageButtons.tsx
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import Button from 'components/Button'
|
||||||
|
|
||||||
|
const LEVERAGE_PRESETS = [1, 2, 3, 5, 10]
|
||||||
|
|
||||||
|
export function LeverageButtons() {
|
||||||
|
return (
|
||||||
|
<div className='flex justify-between'>
|
||||||
|
{LEVERAGE_PRESETS.map((leverage) => (
|
||||||
|
<Button key={leverage} color='tertiary' className='w-12'>
|
||||||
|
{leverage}x
|
||||||
|
</Button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
14
src/components/Perps/Module/Or.tsx
Normal file
14
src/components/Perps/Module/Or.tsx
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import Divider from 'components/Divider'
|
||||||
|
import Text from 'components/Text'
|
||||||
|
|
||||||
|
export function Or() {
|
||||||
|
return (
|
||||||
|
<div className='flex items-center gap-2'>
|
||||||
|
<Divider />
|
||||||
|
<Text size='xs' className='text-white/40'>
|
||||||
|
OR
|
||||||
|
</Text>
|
||||||
|
<Divider />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
59
src/components/Perps/Module/PerpsModule.tsx
Normal file
59
src/components/Perps/Module/PerpsModule.tsx
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
import { useState } from 'react'
|
||||||
|
|
||||||
|
import Button from 'components/Button'
|
||||||
|
import Card from 'components/Card'
|
||||||
|
import { ChevronDown } from 'components/Icons'
|
||||||
|
import { LeverageButtons } from 'components/Perps/Module/LeverageButtons'
|
||||||
|
import { Or } from 'components/Perps/Module/Or'
|
||||||
|
import { SelectLongShort } from 'components/Perps/Module/SelectLongShort'
|
||||||
|
import RangeInput from 'components/RangeInput'
|
||||||
|
import { Spacer } from 'components/Spacer'
|
||||||
|
import Text from 'components/Text'
|
||||||
|
import AssetAmountInput from 'components/Trade/TradeModule/SwapForm/AssetAmountInput'
|
||||||
|
import OrderTypeSelector from 'components/Trade/TradeModule/SwapForm/OrderTypeSelector'
|
||||||
|
import { AvailableOrderType } from 'components/Trade/TradeModule/SwapForm/OrderTypeSelector/types'
|
||||||
|
import { ASSETS } from 'constants/assets'
|
||||||
|
import { BN_ZERO } from 'constants/math'
|
||||||
|
|
||||||
|
export function PerpsModule() {
|
||||||
|
const [selectedOrderType, setSelectedOrderType] = useState<AvailableOrderType>('Market')
|
||||||
|
const [selectedOrderDirection, setSelectedOrderDirection] = useState<OrderDirection>('long')
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card
|
||||||
|
contentClassName='px-4 gap-5 flex flex-col'
|
||||||
|
title={
|
||||||
|
<div className='flex justify-between bg-white/10 py-4 pl-4 pr-2 items-center'>
|
||||||
|
<Text>
|
||||||
|
ETH<span className='text-white/60'>/USD</span>
|
||||||
|
</Text>
|
||||||
|
<Button color='quaternary' variant='transparent' rightIcon={<ChevronDown />}>
|
||||||
|
All Markets
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
className='mb-4'
|
||||||
|
>
|
||||||
|
<OrderTypeSelector selected={selectedOrderType} onChange={setSelectedOrderType} />
|
||||||
|
<SelectLongShort
|
||||||
|
direction={selectedOrderDirection}
|
||||||
|
onChangeDirection={setSelectedOrderDirection}
|
||||||
|
/>
|
||||||
|
<AssetAmountInput
|
||||||
|
label='Amount'
|
||||||
|
max={BN_ZERO}
|
||||||
|
amount={BN_ZERO}
|
||||||
|
setAmount={() => {}}
|
||||||
|
asset={ASSETS[0]}
|
||||||
|
maxButtonLabel='Max:'
|
||||||
|
disabled={false}
|
||||||
|
/>
|
||||||
|
<Or />
|
||||||
|
<Text size='sm'>Position Leverage</Text>
|
||||||
|
<RangeInput max={0} value={0} onChange={() => {}} />
|
||||||
|
<LeverageButtons />
|
||||||
|
<Spacer />
|
||||||
|
<Button>{selectedOrderDirection} ETH</Button>
|
||||||
|
</Card>
|
||||||
|
)
|
||||||
|
}
|
62
src/components/Perps/Module/SelectLongShort.tsx
Normal file
62
src/components/Perps/Module/SelectLongShort.tsx
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
import classNames from 'classnames'
|
||||||
|
|
||||||
|
import Text from 'components/Text'
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
direction: OrderDirection
|
||||||
|
onChangeDirection: (direction: OrderDirection) => void
|
||||||
|
}
|
||||||
|
|
||||||
|
export function SelectLongShort(props: Props) {
|
||||||
|
return (
|
||||||
|
<div className='flex bg-black/20 rounded-sm'>
|
||||||
|
<Direction
|
||||||
|
onClick={() => props.onChangeDirection('long')}
|
||||||
|
direction='long'
|
||||||
|
isActive={props.direction === 'long'}
|
||||||
|
/>
|
||||||
|
<Direction
|
||||||
|
onClick={() => props.onChangeDirection('short')}
|
||||||
|
direction='short'
|
||||||
|
isActive={props.direction === 'short'}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DirectionProps {
|
||||||
|
direction: 'long' | 'short'
|
||||||
|
isActive: boolean
|
||||||
|
onClick: () => void
|
||||||
|
}
|
||||||
|
function Direction(props: DirectionProps) {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
className={classNames(
|
||||||
|
'px-4 py-3 rounded-sm flex-1',
|
||||||
|
borderColors[props.direction],
|
||||||
|
props.isActive && 'border bg-white/10',
|
||||||
|
)}
|
||||||
|
onClick={props.onClick}
|
||||||
|
>
|
||||||
|
<Text
|
||||||
|
className={classNames(
|
||||||
|
'text-center capitalize',
|
||||||
|
props.isActive ? directionColors[props.direction] : 'text-white/20',
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{props.direction}
|
||||||
|
</Text>
|
||||||
|
</button>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const directionColors = {
|
||||||
|
long: 'text-success',
|
||||||
|
short: 'text-error',
|
||||||
|
}
|
||||||
|
|
||||||
|
const borderColors = {
|
||||||
|
long: 'border-success',
|
||||||
|
short: 'border-error',
|
||||||
|
}
|
12
src/components/Perps/PerpsChart.tsx
Normal file
12
src/components/Perps/PerpsChart.tsx
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
import TradeChart from 'components/Trade/TradeChart'
|
||||||
|
import { ASSETS } from 'constants/assets'
|
||||||
|
|
||||||
|
export function PerpsChart() {
|
||||||
|
return (
|
||||||
|
<div className='h-full'>
|
||||||
|
<TradeChart buyAsset={ASSETS[0]} sellAsset={ASSETS[1]} />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
47
src/components/Perps/PerpsInfo.tsx
Normal file
47
src/components/Perps/PerpsInfo.tsx
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
import React, { useMemo } from 'react'
|
||||||
|
|
||||||
|
import Card from 'components/Card'
|
||||||
|
import Divider from 'components/Divider'
|
||||||
|
import Text from 'components/Text'
|
||||||
|
|
||||||
|
export function PerpsInfo() {
|
||||||
|
const items = useMemo(
|
||||||
|
() => [
|
||||||
|
<Text key='item1'>$6,735</Text>,
|
||||||
|
<InfoItem key='item2' label='Label' item={<Text size='sm'>Value</Text>} />,
|
||||||
|
<InfoItem key='item3' label='Label' item={<Text size='sm'>Value</Text>} />,
|
||||||
|
<InfoItem key='item4' label='Label' item={<Text size='sm'>Value</Text>} />,
|
||||||
|
<InfoItem key='item5' label='Label' item={<Text size='sm'>Value</Text>} />,
|
||||||
|
],
|
||||||
|
[],
|
||||||
|
)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card contentClassName='bg-white/10 py-3.5 px-4'>
|
||||||
|
<div className='flex gap-4 items-center'>
|
||||||
|
{items.map((item, index) => (
|
||||||
|
<React.Fragment key={index}>
|
||||||
|
{item}
|
||||||
|
{index !== items.length - 1 && <Divider orientation='vertical' className='h-9' />}
|
||||||
|
</React.Fragment>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</Card>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
interface InfoItemProps {
|
||||||
|
item: React.ReactNode
|
||||||
|
label: string
|
||||||
|
}
|
||||||
|
|
||||||
|
function InfoItem(props: InfoItemProps) {
|
||||||
|
return (
|
||||||
|
<div className='flex flex-col gap-1'>
|
||||||
|
<Text size='xs' className='text-white/40'>
|
||||||
|
{props.label}
|
||||||
|
</Text>
|
||||||
|
{props.item}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
5
src/components/Perps/PerpsPositions.tsx
Normal file
5
src/components/Perps/PerpsPositions.tsx
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import AccountDetailsCard from 'components/Trade/AccountDetailsCard'
|
||||||
|
|
||||||
|
export function PerpsPositions() {
|
||||||
|
return <AccountDetailsCard />
|
||||||
|
}
|
@ -7,6 +7,7 @@ import { MAX_AMOUNT_DECIMALS } from 'constants/math'
|
|||||||
import useAccount from 'hooks/useAccount'
|
import useAccount from 'hooks/useAccount'
|
||||||
import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData'
|
import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData'
|
||||||
import useHealthComputer from 'hooks/useHealthComputer'
|
import useHealthComputer from 'hooks/useHealthComputer'
|
||||||
|
import useHLSStakingAssets from 'hooks/useHLSStakingAssets'
|
||||||
import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData'
|
import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData'
|
||||||
import usePrices from 'hooks/usePrices'
|
import usePrices from 'hooks/usePrices'
|
||||||
import { getAccountSummaryStats } from 'utils/accounts'
|
import { getAccountSummaryStats } from 'utils/accounts'
|
||||||
@ -23,6 +24,7 @@ function Content(props: Props) {
|
|||||||
const { data } = useBorrowMarketAssetsTableData(false)
|
const { data } = useBorrowMarketAssetsTableData(false)
|
||||||
const borrowAssets = useMemo(() => data?.allAssets || [], [data])
|
const borrowAssets = useMemo(() => data?.allAssets || [], [data])
|
||||||
const { allAssets: lendingAssets } = useLendingMarketAssetsTableData()
|
const { allAssets: lendingAssets } = useLendingMarketAssetsTableData()
|
||||||
|
const { data: hlsStrategies } = useHLSStakingAssets()
|
||||||
|
|
||||||
const stats = useMemo(() => {
|
const stats = useMemo(() => {
|
||||||
if (!account || !borrowAssets.length || !lendingAssets.length) return DEFAULT_PORTFOLIO_STATS
|
if (!account || !borrowAssets.length || !lendingAssets.length) return DEFAULT_PORTFOLIO_STATS
|
||||||
@ -32,6 +34,8 @@ function Content(props: Props) {
|
|||||||
prices,
|
prices,
|
||||||
borrowAssets,
|
borrowAssets,
|
||||||
lendingAssets,
|
lendingAssets,
|
||||||
|
hlsStrategies,
|
||||||
|
account.kind === 'high_levered_strategy',
|
||||||
)
|
)
|
||||||
|
|
||||||
return [
|
return [
|
||||||
@ -72,7 +76,7 @@ function Content(props: Props) {
|
|||||||
sub: DEFAULT_PORTFOLIO_STATS[4].sub,
|
sub: DEFAULT_PORTFOLIO_STATS[4].sub,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}, [account, borrowAssets, lendingAssets, prices])
|
}, [account, borrowAssets, hlsStrategies, lendingAssets, prices])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Skeleton
|
<Skeleton
|
||||||
|
@ -12,6 +12,7 @@ import useAccount from 'hooks/useAccount'
|
|||||||
import useAccountId from 'hooks/useAccountId'
|
import useAccountId from 'hooks/useAccountId'
|
||||||
import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData'
|
import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData'
|
||||||
import useHealthComputer from 'hooks/useHealthComputer'
|
import useHealthComputer from 'hooks/useHealthComputer'
|
||||||
|
import useHLSStakingAssets from 'hooks/useHLSStakingAssets'
|
||||||
import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData'
|
import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData'
|
||||||
import useLocalStorage from 'hooks/useLocalStorage'
|
import useLocalStorage from 'hooks/useLocalStorage'
|
||||||
import usePrices from 'hooks/usePrices'
|
import usePrices from 'hooks/usePrices'
|
||||||
@ -34,6 +35,8 @@ export default function PortfolioCard(props: Props) {
|
|||||||
const currentAccountId = useAccountId()
|
const currentAccountId = useAccountId()
|
||||||
const { allAssets: lendingAssets } = useLendingMarketAssetsTableData()
|
const { allAssets: lendingAssets } = useLendingMarketAssetsTableData()
|
||||||
const { data } = useBorrowMarketAssetsTableData(false)
|
const { data } = useBorrowMarketAssetsTableData(false)
|
||||||
|
const { data: hlsStrategies } = useHLSStakingAssets()
|
||||||
|
|
||||||
const borrowAssets = useMemo(() => data?.allAssets || [], [data])
|
const borrowAssets = useMemo(() => data?.allAssets || [], [data])
|
||||||
const [reduceMotion] = useLocalStorage<boolean>(
|
const [reduceMotion] = useLocalStorage<boolean>(
|
||||||
LocalStorageKeys.REDUCE_MOTION,
|
LocalStorageKeys.REDUCE_MOTION,
|
||||||
@ -52,8 +55,15 @@ export default function PortfolioCard(props: Props) {
|
|||||||
|
|
||||||
const apr = useMemo(() => {
|
const apr = useMemo(() => {
|
||||||
if (!lendingAssets.length || !borrowAssets.length || !prices.length || !account) return null
|
if (!lendingAssets.length || !borrowAssets.length || !prices.length || !account) return null
|
||||||
return calculateAccountApr(account, borrowAssets, lendingAssets, prices)
|
return calculateAccountApr(
|
||||||
}, [lendingAssets, borrowAssets, prices, account])
|
account,
|
||||||
|
borrowAssets,
|
||||||
|
lendingAssets,
|
||||||
|
prices,
|
||||||
|
hlsStrategies,
|
||||||
|
account.kind === 'high_levered_strategy',
|
||||||
|
)
|
||||||
|
}, [lendingAssets, borrowAssets, prices, account, hlsStrategies])
|
||||||
|
|
||||||
const stats: { title: ReactNode; sub: string }[] = useMemo(() => {
|
const stats: { title: ReactNode; sub: string }[] = useMemo(() => {
|
||||||
const isLoaded = account && prices.length && apr !== null
|
const isLoaded = account && prices.length && apr !== null
|
||||||
|
@ -7,6 +7,7 @@ import SummarySkeleton from 'components/Portfolio/SummarySkeleton'
|
|||||||
import { MAX_AMOUNT_DECIMALS } from 'constants/math'
|
import { MAX_AMOUNT_DECIMALS } from 'constants/math'
|
||||||
import useAccounts from 'hooks/useAccounts'
|
import useAccounts from 'hooks/useAccounts'
|
||||||
import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData'
|
import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData'
|
||||||
|
import useHLSStakingAssets from 'hooks/useHLSStakingAssets'
|
||||||
import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData'
|
import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData'
|
||||||
import usePrices from 'hooks/usePrices'
|
import usePrices from 'hooks/usePrices'
|
||||||
import useStore from 'store'
|
import useStore from 'store'
|
||||||
@ -21,6 +22,7 @@ export default function PortfolioSummary() {
|
|||||||
const borrowAssets = useMemo(() => data?.allAssets || [], [data])
|
const borrowAssets = useMemo(() => data?.allAssets || [], [data])
|
||||||
const { allAssets: lendingAssets } = useLendingMarketAssetsTableData()
|
const { allAssets: lendingAssets } = useLendingMarketAssetsTableData()
|
||||||
const { data: accounts } = useAccounts('default', urlAddress || walletAddress)
|
const { data: accounts } = useAccounts('default', urlAddress || walletAddress)
|
||||||
|
const { data: hlsStrategies } = useHLSStakingAssets()
|
||||||
|
|
||||||
const stats = useMemo(() => {
|
const stats = useMemo(() => {
|
||||||
if (!accounts?.length) return
|
if (!accounts?.length) return
|
||||||
@ -47,6 +49,7 @@ export default function PortfolioSummary() {
|
|||||||
prices,
|
prices,
|
||||||
borrowAssets,
|
borrowAssets,
|
||||||
lendingAssets,
|
lendingAssets,
|
||||||
|
hlsStrategies,
|
||||||
)
|
)
|
||||||
|
|
||||||
return [
|
return [
|
||||||
@ -87,7 +90,7 @@ export default function PortfolioSummary() {
|
|||||||
sub: 'Combined leverage',
|
sub: 'Combined leverage',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}, [accounts, borrowAssets, lendingAssets, prices])
|
}, [accounts, borrowAssets, hlsStrategies, lendingAssets, prices])
|
||||||
|
|
||||||
if (!walletAddress && !urlAddress) return null
|
if (!walletAddress && !urlAddress) return null
|
||||||
|
|
||||||
|
@ -3,12 +3,16 @@ import { Navigate, Outlet, Route, Routes as RoutesWrapper } from 'react-router-d
|
|||||||
import Layout from 'pages/_layout'
|
import Layout from 'pages/_layout'
|
||||||
import BorrowPage from 'pages/BorrowPage'
|
import BorrowPage from 'pages/BorrowPage'
|
||||||
import FarmPage from 'pages/FarmPage'
|
import FarmPage from 'pages/FarmPage'
|
||||||
|
import HLSFarmPage from 'pages/HLSFarmPage'
|
||||||
import HLSStakingPage from 'pages/HLSStakingPage'
|
import HLSStakingPage from 'pages/HLSStakingPage'
|
||||||
import LendPage from 'pages/LendPage'
|
import LendPage from 'pages/LendPage'
|
||||||
import MobilePage from 'pages/MobilePage'
|
import MobilePage from 'pages/MobilePage'
|
||||||
|
import PerpsPage from 'pages/PerpsPage'
|
||||||
import PortfolioAccountPage from 'pages/PortfolioAccountPage'
|
import PortfolioAccountPage from 'pages/PortfolioAccountPage'
|
||||||
import PortfolioPage from 'pages/PortfolioPage'
|
import PortfolioPage from 'pages/PortfolioPage'
|
||||||
import TradePage from 'pages/TradePage'
|
import TradePage from 'pages/TradePage'
|
||||||
|
import { ENABLE_PERPS } from 'utils/constants'
|
||||||
|
import { ENABLE_HLS } from 'utils/constants'
|
||||||
|
|
||||||
export default function Routes() {
|
export default function Routes() {
|
||||||
return (
|
return (
|
||||||
@ -21,25 +25,27 @@ export default function Routes() {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Route path='/trade' element={<TradePage />} />
|
<Route path='/trade' element={<TradePage />} />
|
||||||
|
{ENABLE_PERPS && <Route path='/perps' element={<PerpsPage />} />}
|
||||||
<Route path='/farm' element={<FarmPage />} />
|
<Route path='/farm' element={<FarmPage />} />
|
||||||
<Route path='/lend' element={<LendPage />} />
|
<Route path='/lend' element={<LendPage />} />
|
||||||
<Route path='/borrow' element={<BorrowPage />} />
|
<Route path='/borrow' element={<BorrowPage />} />
|
||||||
<Route path='/portfolio' element={<PortfolioPage />} />
|
<Route path='/portfolio' element={<PortfolioPage />} />
|
||||||
<Route path='/mobile' element={<MobilePage />} />
|
<Route path='/mobile' element={<MobilePage />} />
|
||||||
<Route path='/hls-staking' element={<HLSStakingPage />} />
|
{ENABLE_HLS && <Route path='/hls-staking' element={<HLSStakingPage />} />}
|
||||||
{/*<Route path='/hls-farm' element={<HLSFarmPage />} />*/}
|
{ENABLE_HLS && <Route path='/hls-farm' element={<HLSFarmPage />} />}
|
||||||
<Route path='/' element={<TradePage />} />
|
<Route path='/' element={<TradePage />} />
|
||||||
<Route path='/wallets/:address'>
|
<Route path='/wallets/:address'>
|
||||||
<Route path='trade' element={<TradePage />} />
|
<Route path='trade' element={<TradePage />} />
|
||||||
|
{ENABLE_PERPS && <Route path='perps' element={<PerpsPage />} />}
|
||||||
<Route path='farm' element={<FarmPage />} />
|
<Route path='farm' element={<FarmPage />} />
|
||||||
<Route path='lend' element={<LendPage />} />
|
<Route path='lend' element={<LendPage />} />
|
||||||
<Route path='borrow' element={<BorrowPage />} />
|
<Route path='borrow' element={<BorrowPage />} />
|
||||||
<Route path='portfolio' element={<PortfolioPage />} />
|
<Route path='portfolio' element={<PortfolioPage />} />
|
||||||
<Route path='hls-staking' element={<HLSStakingPage />} />
|
{ENABLE_HLS && <Route path='hls-staking' element={<HLSStakingPage />} />}
|
||||||
|
{ENABLE_HLS && <Route path='hls-farm' element={<HLSFarmPage />} />}
|
||||||
<Route path='portfolio/:accountId'>
|
<Route path='portfolio/:accountId'>
|
||||||
<Route path='' element={<PortfolioAccountPage />} />
|
<Route path='' element={<PortfolioAccountPage />} />
|
||||||
</Route>
|
</Route>
|
||||||
{/*<Route path='hls-farm' element={<HLSFarmPage />} />*/}
|
|
||||||
<Route path='' element={<TradePage />} />
|
<Route path='' element={<TradePage />} />
|
||||||
</Route>
|
</Route>
|
||||||
<Route path='*' element={<Navigate to='/' />} />
|
<Route path='*' element={<Navigate to='/' />} />
|
||||||
|
@ -11,7 +11,6 @@ import useMarketAssets from 'hooks/useMarketAssets'
|
|||||||
import { BNCoin } from 'types/classes/BNCoin'
|
import { BNCoin } from 'types/classes/BNCoin'
|
||||||
import { byDenom } from 'utils/array'
|
import { byDenom } from 'utils/array'
|
||||||
import { formatValue } from 'utils/formatters'
|
import { formatValue } from 'utils/formatters'
|
||||||
import { convertAprToApy } from 'utils/parsers'
|
|
||||||
|
|
||||||
interface Props extends SelectOption {
|
interface Props extends SelectOption {
|
||||||
isSelected?: boolean
|
isSelected?: boolean
|
||||||
@ -80,7 +79,7 @@ export default function Option(props: Props) {
|
|||||||
})}
|
})}
|
||||||
</Text>
|
</Text>
|
||||||
<AssetRate
|
<AssetRate
|
||||||
rate={convertAprToApy(marketAsset?.borrowRate ?? 0, 365)}
|
rate={marketAsset?.apy.borrow ?? 0}
|
||||||
isEnabled={marketAsset?.borrowEnabled ?? false}
|
isEnabled={marketAsset?.borrowEnabled ?? false}
|
||||||
className='col-span-2 text-white/50'
|
className='col-span-2 text-white/50'
|
||||||
type='apy'
|
type='apy'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
import { ChangeEvent, useEffect, useMemo, useRef, useState } from 'react'
|
import { ChangeEvent, useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||||
import Draggable from 'react-draggable'
|
import Draggable from 'react-draggable'
|
||||||
|
|
||||||
import { OverlayMark } from 'components/Icons'
|
import { OverlayMark } from 'components/Icons'
|
||||||
@ -34,7 +34,7 @@ export default function Slider(props: Props) {
|
|||||||
const nodeRef = useRef(null)
|
const nodeRef = useRef(null)
|
||||||
const [isDragging, setIsDragging] = useToggle()
|
const [isDragging, setIsDragging] = useToggle()
|
||||||
|
|
||||||
function handleSliderRect() {
|
const handleSliderRect = useCallback(() => {
|
||||||
const leftCap = ref.current?.getBoundingClientRect().left ?? 0
|
const leftCap = ref.current?.getBoundingClientRect().left ?? 0
|
||||||
const rightCap = ref.current?.getBoundingClientRect().right ?? 0
|
const rightCap = ref.current?.getBoundingClientRect().right ?? 0
|
||||||
const newSliderWidth = ref.current?.getBoundingClientRect().width ?? 0
|
const newSliderWidth = ref.current?.getBoundingClientRect().width ?? 0
|
||||||
@ -50,7 +50,7 @@ export default function Slider(props: Props) {
|
|||||||
width: newSliderWidth,
|
width: newSliderWidth,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}, [sliderRect.left, sliderRect.right, sliderRect.width])
|
||||||
|
|
||||||
function handleDrag(e: any) {
|
function handleDrag(e: any) {
|
||||||
if (!isDragging) {
|
if (!isDragging) {
|
||||||
@ -107,7 +107,7 @@ export default function Slider(props: Props) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
handleSliderRect()
|
handleSliderRect()
|
||||||
}, [])
|
}, [handleSliderRect])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
3
src/components/Spacer.tsx
Normal file
3
src/components/Spacer.tsx
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export function Spacer() {
|
||||||
|
return <div className='h-full w-full flex-1' />
|
||||||
|
}
|
@ -1,7 +1,9 @@
|
|||||||
|
import classNames from 'classnames'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
import { FormattedNumber } from 'components/FormattedNumber'
|
import { FormattedNumber } from 'components/FormattedNumber'
|
||||||
import Text from 'components/Text'
|
import Text from 'components/Text'
|
||||||
|
import WarningMessages from 'components/WarningMessages'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
items: SummaryItem[]
|
items: SummaryItem[]
|
||||||
@ -13,11 +15,17 @@ export default function SummaryItems(props: Props) {
|
|||||||
{props.items.map((item) => (
|
{props.items.map((item) => (
|
||||||
<React.Fragment key={item.title}>
|
<React.Fragment key={item.title}>
|
||||||
<Text className='text-white/60 text-sm'>{item.title}</Text>
|
<Text className='text-white/60 text-sm'>{item.title}</Text>
|
||||||
<FormattedNumber
|
<span className='flex justify-end'>
|
||||||
className='place-self-end text-sm'
|
<WarningMessages messages={item.warningMessages || []} />
|
||||||
amount={item.amount}
|
<FormattedNumber
|
||||||
options={item.options}
|
className={classNames(
|
||||||
/>
|
'place-self-end text-sm',
|
||||||
|
item.warningMessages?.length && 'text-warning',
|
||||||
|
)}
|
||||||
|
amount={item.amount}
|
||||||
|
options={item.options}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,32 +1,51 @@
|
|||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
|
import { useCallback } from 'react'
|
||||||
|
|
||||||
import SwitchWithLabel from 'components/Switch/SwitchWithLabel'
|
import SwitchWithLabel from 'components/Switch/SwitchWithLabel'
|
||||||
|
import { DEFAULT_SETTINGS } from 'constants/defaultSettings'
|
||||||
|
import { LocalStorageKeys } from 'constants/localStorageKeys'
|
||||||
import useAutoLend from 'hooks/useAutoLend'
|
import useAutoLend from 'hooks/useAutoLend'
|
||||||
|
import useLocalStorage from 'hooks/useLocalStorage'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
accountId: string
|
accountId: string
|
||||||
className?: string
|
className?: string
|
||||||
onChange?: () => void
|
|
||||||
value?: boolean
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function SwitchAutoLend(props: Props) {
|
export default function SwitchAutoLend(props: Props) {
|
||||||
const { accountId, className } = props
|
const { accountId, className } = props
|
||||||
const { autoLendEnabledAccountIds, toggleAutoLend } = useAutoLend()
|
const { autoLendEnabledAccountIds, disableAutoLend, enableAutoLend } = useAutoLend()
|
||||||
const isAutoLendEnabled = autoLendEnabledAccountIds.includes(accountId)
|
const isAutoLendEnabledForAccount = autoLendEnabledAccountIds.includes(accountId)
|
||||||
|
const [isAutoLendEnabled, setIsAutoLendEnabled] = useLocalStorage<boolean>(
|
||||||
|
LocalStorageKeys.LEND_ASSETS,
|
||||||
|
DEFAULT_SETTINGS.lendAssets,
|
||||||
|
)
|
||||||
|
|
||||||
function handleToggle() {
|
const handleToggle = useCallback(() => {
|
||||||
if (props.onChange) return props.onChange()
|
if (!isAutoLendEnabledForAccount) {
|
||||||
|
enableAutoLend(accountId)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
toggleAutoLend(accountId)
|
if (isAutoLendEnabled) {
|
||||||
}
|
setIsAutoLendEnabled(false)
|
||||||
|
disableAutoLend(accountId)
|
||||||
|
}
|
||||||
|
}, [
|
||||||
|
accountId,
|
||||||
|
disableAutoLend,
|
||||||
|
enableAutoLend,
|
||||||
|
isAutoLendEnabled,
|
||||||
|
isAutoLendEnabledForAccount,
|
||||||
|
setIsAutoLendEnabled,
|
||||||
|
])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classNames('w-full', className)}>
|
<div className={classNames('w-full', className)}>
|
||||||
<SwitchWithLabel
|
<SwitchWithLabel
|
||||||
name='isLending'
|
name={`isLending-${accountId}`}
|
||||||
label='Lend assets to earn yield'
|
label='Lend assets to earn yield'
|
||||||
value={props.value !== undefined ? props.value : isAutoLendEnabled}
|
value={isAutoLendEnabledForAccount}
|
||||||
onChange={handleToggle}
|
onChange={handleToggle}
|
||||||
tooltip={`Fund your account and lend assets effortlessly! By lending, you'll earn attractive interest (APY) without impacting your loan to value (LTV). It's a win-win situation - don't miss out on this easy opportunity to grow your holdings!`}
|
tooltip={`Fund your account and lend assets effortlessly! By lending, you'll earn attractive interest (APY) without impacting your loan to value (LTV). It's a win-win situation - don't miss out on this easy opportunity to grow your holdings!`}
|
||||||
/>
|
/>
|
||||||
|
@ -23,6 +23,7 @@ interface Props {
|
|||||||
current: number
|
current: number
|
||||||
max: number
|
max: number
|
||||||
}
|
}
|
||||||
|
warningMessages: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function TokenInputWithSlider(props: Props) {
|
export default function TokenInputWithSlider(props: Props) {
|
||||||
@ -70,6 +71,7 @@ export default function TokenInputWithSlider(props: Props) {
|
|||||||
hasSelect={props.hasSelect}
|
hasSelect={props.hasSelect}
|
||||||
balances={props.balances}
|
balances={props.balances}
|
||||||
accountId={props.accountId}
|
accountId={props.accountId}
|
||||||
|
warningMessages={props.warningMessages}
|
||||||
/>
|
/>
|
||||||
<Slider
|
<Slider
|
||||||
value={percentage || 0}
|
value={percentage || 0}
|
||||||
|
@ -5,11 +5,11 @@ import AssetImage from 'components/Asset/AssetImage'
|
|||||||
import Button from 'components/Button'
|
import Button from 'components/Button'
|
||||||
import DisplayCurrency from 'components/DisplayCurrency'
|
import DisplayCurrency from 'components/DisplayCurrency'
|
||||||
import { FormattedNumber } from 'components/FormattedNumber'
|
import { FormattedNumber } from 'components/FormattedNumber'
|
||||||
import { ExclamationMarkTriangle, TrashBin } from 'components/Icons'
|
import { TrashBin } from 'components/Icons'
|
||||||
import NumberInput from 'components/NumberInput'
|
import NumberInput from 'components/NumberInput'
|
||||||
import Select from 'components/Select'
|
import Select from 'components/Select'
|
||||||
import Text from 'components/Text'
|
import Text from 'components/Text'
|
||||||
import { Tooltip } from 'components/Tooltip'
|
import WarningMessages from 'components/WarningMessages'
|
||||||
import { ASSETS } from 'constants/assets'
|
import { ASSETS } from 'constants/assets'
|
||||||
import useStore from 'store'
|
import useStore from 'store'
|
||||||
import { BNCoin } from 'types/classes/BNCoin'
|
import { BNCoin } from 'types/classes/BNCoin'
|
||||||
@ -26,9 +26,9 @@ interface Props {
|
|||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
hasSelect?: boolean
|
hasSelect?: boolean
|
||||||
maxText?: string
|
maxText?: string
|
||||||
warning?: string
|
|
||||||
onChangeAsset?: (asset: Asset) => void
|
onChangeAsset?: (asset: Asset) => void
|
||||||
onDelete?: () => void
|
onDelete?: () => void
|
||||||
|
warningMessages: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function TokenInput(props: Props) {
|
export default function TokenInput(props: Props) {
|
||||||
@ -55,7 +55,7 @@ export default function TokenInput(props: Props) {
|
|||||||
data-testid='token-input-wrapper'
|
data-testid='token-input-wrapper'
|
||||||
className={classNames(
|
className={classNames(
|
||||||
'relative isolate z-20 box-content flex h-11 w-full rounded-sm border bg-white/5',
|
'relative isolate z-20 box-content flex h-11 w-full rounded-sm border bg-white/5',
|
||||||
props.warning ? 'border-warning' : 'border-white/20',
|
props.warningMessages.length ? 'border-warning' : 'border-white/20',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{props.hasSelect && props.balances ? (
|
{props.hasSelect && props.balances ? (
|
||||||
@ -87,17 +87,7 @@ export default function TokenInput(props: Props) {
|
|||||||
<TrashBin width={16} />
|
<TrashBin width={16} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{props.warning && (
|
<WarningMessages messages={props.warningMessages} />
|
||||||
<div className='grid items-center px-2'>
|
|
||||||
<Tooltip
|
|
||||||
content={`You don't have any ${props.asset.symbol}. Please first deposit ${props.asset.symbol} into your Credit Account before.`}
|
|
||||||
type='info'
|
|
||||||
interactive
|
|
||||||
>
|
|
||||||
<ExclamationMarkTriangle className='text-warning' />
|
|
||||||
</Tooltip>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='flex'>
|
<div className='flex'>
|
||||||
|
@ -130,8 +130,8 @@ export class DataFeed implements IDatafeedChartApi {
|
|||||||
|
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
await this.getPairsWithData()
|
await this.getPairsWithData()
|
||||||
callback(configurationData)
|
|
||||||
})
|
})
|
||||||
|
callback(configurationData)
|
||||||
}
|
}
|
||||||
|
|
||||||
resolveSymbol(pairName: string, onResolve: ResolveCallback, onError: ErrorCallback) {
|
resolveSymbol(pairName: string, onResolve: ResolveCallback, onError: ErrorCallback) {
|
||||||
@ -181,7 +181,8 @@ export class DataFeed implements IDatafeedChartApi {
|
|||||||
onResult(bars)
|
onResult(bars)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
await this.getBarsFromTheGraph(symbolInfo, resolution, to).then((bars) => onResult(bars))
|
//await this.getBarsFromTheGraph(symbolInfo, resolution, to).then((bars) => onResult(bars))
|
||||||
|
onResult([], { noData: true })
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
@ -464,7 +465,7 @@ export class DataFeed implements IDatafeedChartApi {
|
|||||||
const denoms = name.split(PAIR_SEPARATOR)
|
const denoms = name.split(PAIR_SEPARATOR)
|
||||||
const pythFeedId1 = ASSETS.find(byDenom(denoms[0]))?.pythHistoryFeedId
|
const pythFeedId1 = ASSETS.find(byDenom(denoms[0]))?.pythHistoryFeedId
|
||||||
const pythFeedId2 = ASSETS.find(byDenom(denoms[1]))?.pythHistoryFeedId
|
const pythFeedId2 = ASSETS.find(byDenom(denoms[1]))?.pythHistoryFeedId
|
||||||
if (!pythFeedId1 || !pythFeedId2) return 'Osmosis'
|
//if (!pythFeedId1 || !pythFeedId2) return 'Osmosis'
|
||||||
return 'Pyth Oracle'
|
return 'Pyth Oracle'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { useEffect, useMemo, useRef } from 'react'
|
import { useEffect, useMemo, useRef } from 'react'
|
||||||
|
|
||||||
import Card from 'components/Card'
|
import Card from 'components/Card'
|
||||||
import { DataFeed, PAIR_SEPARATOR } from 'components/Trade/TradeChart/DataFeed'
|
|
||||||
import { disabledFeatures, enabledFeatures, overrides } from 'components/Trade/TradeChart/constants'
|
import { disabledFeatures, enabledFeatures, overrides } from 'components/Trade/TradeChart/constants'
|
||||||
|
import { DataFeed, PAIR_SEPARATOR } from 'components/Trade/TradeChart/DataFeed'
|
||||||
import useStore from 'store'
|
import useStore from 'store'
|
||||||
import {
|
import {
|
||||||
ChartingLibraryWidgetOptions,
|
ChartingLibraryWidgetOptions,
|
||||||
@ -102,7 +102,7 @@ export const TVChartContainer = (props: Props) => {
|
|||||||
}, [props.buyAsset.denom, props.sellAsset.denom])
|
}, [props.buyAsset.denom, props.sellAsset.denom])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card title='Trading Chart' contentClassName='px-0.5 pb-0.5 h-full'>
|
<Card title='Trading Chart' contentClassName='px-0.5 pb-0.5 h-full' className='h-full'>
|
||||||
<div ref={chartContainerRef} className='h-full overflow-hidden rounded-b-base' />
|
<div ref={chartContainerRef} className='h-full overflow-hidden rounded-b-base' />
|
||||||
</Card>
|
</Card>
|
||||||
)
|
)
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
import Switch from 'components/Switch'
|
||||||
|
import Text from 'components/Text'
|
||||||
|
import { Tooltip } from 'components/Tooltip'
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
checked: boolean
|
||||||
|
onChange: (value: boolean) => void
|
||||||
|
buyAssetSymbol: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function AutoRepayToggle(props: Props) {
|
||||||
|
return (
|
||||||
|
<div className='flex flex-row justify-between flex-1 px-4 py-2 bg-white/5'>
|
||||||
|
<div className='flex items-center gap-1'>
|
||||||
|
<Text size='sm'>Auto Repay Debt</Text>
|
||||||
|
<Tooltip
|
||||||
|
type='info'
|
||||||
|
content={
|
||||||
|
<Text size='sm'>
|
||||||
|
Use the bought {props.buyAssetSymbol} directly to repay your {props.buyAssetSymbol}{' '}
|
||||||
|
debt.
|
||||||
|
</Text>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='flex flex-row'>
|
||||||
|
<Switch {...props} name='repay' />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user