From b0998d32ada87d729c6d455466920dbd32e7b22a Mon Sep 17 00:00:00 2001 From: Linkie Link Date: Wed, 31 Jan 2024 15:26:01 +0100 Subject: [PATCH] v2.2.1 (#759) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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] 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] 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] 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 * 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] 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] 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] 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] 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] 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] 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] Co-authored-by: Linkie Link 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] 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] 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] 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] 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 * 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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 * 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] Co-authored-by: Linkie Link 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] 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] 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] 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 * 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] 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] 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] 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] 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] 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 * ✨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] 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 * 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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 * 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> * temp: remove liquidation price (#661) * Revert "temp: remove liquidation price (#661)" (#663) This reverts commit 0cba668c82c264b8d6b1cb556e722fe1c7d1382e. * πŸ› fix liquidation price (#664) * Hls text fixes (#667) * πŸ› incorrect vault values calc * πŸ› incorrect message for no balance in wallet hls * πŸ› hls message on keep leverage * update to correct wasm files * update to correct wasm files * v2.1.0 (#669) * Repay from Wallet (#673) * feat: added repay from wallet * tidy: refactor * UX/UI finetuning (#672) * feat: added Buy/Sell token ratio to the TradingView header * fix: changed the order in the trading view description * feat: added minute timeframe to the chart * fix: changed WBTC to WBTC/USD pyth price feed * fix: adjusted HLS health curve * fix: made HLS accounts unselectable * copy: changed the APY range and Strategy text * tidy: fix the tables layout to be more readable * fix: change the precision of the Trading chart header * feat: added summary collapsable * fix: removed Debt Column for active HLS positions * fix: added Memo to TVChart * fix: adjust Trade page layout * tidy: refactor table meta * fix: DisplayCurrency is able to take options now * tidy: remove unneeded typesafety * fix: adjusted according feedback * env: enabled autoRepay and updated version * fix: auto-repay * fix: disable lend on auto repay on trade * tidy: refactor * feat: make USDC the standard secondary asset (for trade) (#681) * Add usePerpsMarket hook and adjust routing (#680) * Add usePerpsMarket hook and adjust routing * fix: enable 7 links in the header --------- Co-authored-by: Linkie Link * Liq price in balances (#679) * add liquidation price to balances table trade * add depositcap to HLS * fix: add width classes to the balances table, remove abbreviation, remove flicker * fix: fixed the account selection and added a tooltip * fix wasm file for debt liquidation price --------- Co-authored-by: Linkie Link * added sharp (#682) * env: added sharp * fix: use dvh over vh * add cache for asset params (#683) * Build(deps): bump @sentry/nextjs from 7.77.0 to 7.84.0 (#677) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.77.0 to 7.84.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.77.0...7.84.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump @splinetool/runtime from 0.9.482 to 0.9.516 (#676) Bumps @splinetool/runtime from 0.9.482 to 0.9.516. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump @types/react from 18.2.33 to 18.2.41 (#675) Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.33 to 18.2.41. - [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] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump react-helmet-async from 1.3.0 to 2.0.3 (#674) Bumps [react-helmet-async](https://github.com/staylor/react-helmet-async) from 1.3.0 to 2.0.3. - [Release notes](https://github.com/staylor/react-helmet-async/releases) - [Commits](https://github.com/staylor/react-helmet-async/commits) --- updated-dependencies: - dependency-name: react-helmet-async dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump @adobe/css-tools from 4.3.1 to 4.3.2 (#671) Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.3.1 to 4.3.2. - [Changelog](https://github.com/adobe/css-tools/blob/main/History.md) - [Commits](https://github.com/adobe/css-tools/commits) --- updated-dependencies: - dependency-name: "@adobe/css-tools" dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump @types/debounce-promise from 3.1.7 to 3.1.9 (#659) Bumps [@types/debounce-promise](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/debounce-promise) from 3.1.7 to 3.1.9. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/debounce-promise) --- updated-dependencies: - dependency-name: "@types/debounce-promise" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Simple spot trading (#684) * env: added sharp * fix: use dvh over vh * feat: prepared the trade view for perps and spot * fix: adjusted heights for Trade * feat: added Navigation submenu * feat: added first interface itteration * feat: added logic * feat: added pairsList * feat: finished Trade Spot Simple * fix: fixed Sell button * fix: adjusted capLeft logic and added sorting util * fix: order of values * fix: fixed the autoLend switch to be deselectable * env: bump version * fix: changes according to feedback * fix: fixed naming * tidy: refactor * fix: set default stable to USDC.axl * Build(deps): bump @splinetool/runtime from 0.9.516 to 0.9.521 (#690) Bumps @splinetool/runtime from 0.9.516 to 0.9.521. --- updated-dependencies: - dependency-name: "@splinetool/runtime" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump eslint-config-next from 14.0.0 to 14.0.4 (#687) Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 14.0.0 to 14.0.4. - [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.4/packages/eslint-config-next) --- updated-dependencies: - dependency-name: eslint-config-next dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump @types/react-helmet from 6.1.9 to 6.1.11 (#688) Bumps [@types/react-helmet](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-helmet) from 6.1.9 to 6.1.11. - [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] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump lint-staged from 15.0.1 to 15.2.0 (#689) Bumps [lint-staged](https://github.com/okonet/lint-staged) from 15.0.1 to 15.2.0. - [Release notes](https://github.com/okonet/lint-staged/releases) - [Changelog](https://github.com/lint-staged/lint-staged/blob/master/CHANGELOG.md) - [Commits](https://github.com/okonet/lint-staged/compare/v15.0.1...v15.2.0) --- updated-dependencies: - dependency-name: lint-staged dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: fixed deposit cap being negative * add execute message page (#694) * fix negative deposit cap, make trade pair selected button (#695) * fix: fixed the swap message for multihop swaps (#701) * fix: fixed the swap message for multihop swaps * fix: according to feedback * feat: added PYTH logo to the trade chart (#705) * Added chain agnostic v2 (#710) * update assets config and chains * make clients dynamic * feat: formatted ChainSelect * fix infinite rerender on trade page * feat: added NTRN icon * fix: fixed ChainInfoID * fix: fixed autoLendEnabled for NTRN * fix: fixed the navigation and dependencies * fix: fixed the pricefeed id * fix: fixed the header menu * fix: fixed the trading charts * fix: fixed the healthbars * fix: fixed naming of pion-1 * feast: updated xdefi image * env: updated contracts * make localStorage chain agnostic * fix: made the selected chain persistant * fix: fixed the wallet providers * fix: updated auto connect * fix: fixed auto connecting * fix: added ChainSelect to focusMode * store raw strings in localstorage * πŸ”₯ remnove tests * update caching keys + disconnect wallet on change chain * fix: fixed the chain select * env: bumped version --------- Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> * Build(deps): bump zustand from 4.4.6 to 4.4.7 (#699) Bumps [zustand](https://github.com/pmndrs/zustand) from 4.4.6 to 4.4.7. - [Release notes](https://github.com/pmndrs/zustand/releases) - [Commits](https://github.com/pmndrs/zustand/compare/v4.4.6...v4.4.7) --- updated-dependencies: - dependency-name: zustand dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump @types/node from 20.8.6 to 20.10.6 (#707) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.8.6 to 20.10.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] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump @sentry/nextjs from 7.84.0 to 7.91.0 (#704) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.84.0 to 7.91.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.84.0...7.91.0) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Perp queries (#711) * update assets config and chains * make clients dynamic * feat: formatted ChainSelect * fix infinite rerender on trade page * feat: added NTRN icon * fix: fixed ChainInfoID * fix: fixed autoLendEnabled for NTRN * fix: fixed the navigation and dependencies * fix: fixed the pricefeed id * fix: fixed the header menu * fix: fixed the trading charts * fix: fixed the healthbars * fix: fixed naming of pion-1 * feast: updated xdefi image * env: updated contracts * make localStorage chain agnostic * fix: made the selected chain persistant * fix: fixed the wallet providers * fix: updated auto connect * fix: fixed auto connecting * fix: added ChainSelect to focusMode * store raw strings in localstorage * πŸ”₯ remnove tests * update caching keys + disconnect wallet on change chain * update contract types and add perps asset select overlay * fix build + add perps positions to accounts --------- Co-authored-by: Linkie Link * Perp queries (#712) * update assets config and chains * make clients dynamic * feat: formatted ChainSelect * fix infinite rerender on trade page * feat: added NTRN icon * fix: fixed ChainInfoID * fix: fixed autoLendEnabled for NTRN * fix: fixed the navigation and dependencies * fix: fixed the pricefeed id * fix: fixed the header menu * fix: fixed the trading charts * fix: fixed the healthbars * fix: fixed naming of pion-1 * feast: updated xdefi image * env: updated contracts * make localStorage chain agnostic * fix: made the selected chain persistant * fix: fixed the wallet providers * fix: updated auto connect * fix: fixed auto connecting * fix: added ChainSelect to focusMode * store raw strings in localstorage * πŸ”₯ remnove tests * update caching keys + disconnect wallet on change chain * update contract types and add perps asset select overlay * fix build + add perps positions to accounts * fix healthcomputer errors * fix healthcomputer errors --------- Co-authored-by: Linkie Link * Cleanup env variables (#713) * fix: cleaned up env variables and disabled chain selector if there is only one chain * env: update .env.example * Add perps balances table (#714) * Add perps balances table * fix: updated svg --------- Co-authored-by: Linkie Link * fix: fixed unlend on withdraw with borrow (#720) * fix: fixed unlend on withdraw with borrow * fix: fixed the logic * fix: lending on funding * Extend perps (#721) * Build(deps): bump @cosmjs/cosmwasm-stargate from 0.31.1 to 0.32.2 (#719) Bumps [@cosmjs/cosmwasm-stargate](https://github.com/cosmos/cosmjs) from 0.31.1 to 0.32.2. - [Changelog](https://github.com/cosmos/cosmjs/blob/main/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmjs/compare/v0.31.1...v0.32.2) --- updated-dependencies: - dependency-name: "@cosmjs/cosmwasm-stargate" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Linkie Link * Build(deps-dev): bump eslint from 8.54.0 to 8.56.0 (#715) Bumps [eslint](https://github.com/eslint/eslint) from 8.54.0 to 8.56.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.54.0...v8.56.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Linkie Link * Build(deps): bump sharp from 0.33.0 to 0.33.1 (#717) Bumps [sharp](https://github.com/lovell/sharp) from 0.33.0 to 0.33.1. - [Release notes](https://github.com/lovell/sharp/releases) - [Changelog](https://github.com/lovell/sharp/blob/main/docs/changelog.md) - [Commits](https://github.com/lovell/sharp/compare/v0.33.0...v0.33.1) --- updated-dependencies: - dependency-name: sharp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Linkie Link * Build(deps): bump follow-redirects from 1.15.2 to 1.15.4 (#722) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.4) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Pyth price fetching (#723) * env: remove testing library * fix: use pyth over oracle * fix: fix the endpoints * fix: fix build * tidy: refactor * fix: fixed account fetching * fix: made all queries chain agnostic * fix: fixed the chart position * fix swap fee for osmosis (#725) * Websocket implementation (#726) * feat: first steps * feat: added websocket support and set the TradingChart to USD * fix: oracle staleness button * fix: set the background to solid and overide backgroundGradient settings (#727) * Edit perps position (#728) * add functional funding rate + selector (#729) * add functional funding rate + selector * Edit perps position (#728) * refactor components folder (#734) * refactor components folder * create leverage slider variants * Deposit cap highlighting (#735) * feat: added depositCap highlighting * feat: added depositCap highlighting * Custom Pyth Endpoint & Price Data on Tx's (#736) * env: remove testing library * fix: use pyth over oracle * fix: fix the endpoints * fix: fix build * tidy: refactor * fix: fixed account fetching * fix: made all queries chain agnostic * fix: fixed the chart position * feat: added basic auth * fix: added env validation * fix: added β€˜no-cors’ and included credentials * fix: removed β€˜no-cors’ mode * fix: change the isLessThanACent logic * tidy: console log * fix: added fallback api * feat: progress on pythVaas * fix: getting prices * fix: try catch * feat: add pythPriceData to transactions based on setting * fix: disable Pyth Update when user uses Ledger * tidy: copy * Miscellaneous (#737) * fix: sorted assets by value * tidy: refactored AssetsSelectTable * fix: fixed the multipleVaultWithdraw Modal * change labels for leverage slider (#738) * Build(deps): bump sharp from 0.33.1 to 0.33.2 (#731) Bumps [sharp](https://github.com/lovell/sharp) from 0.33.1 to 0.33.2. - [Release notes](https://github.com/lovell/sharp/releases) - [Changelog](https://github.com/lovell/sharp/blob/main/docs/changelog.md) - [Commits](https://github.com/lovell/sharp/compare/v0.33.1...v0.33.2) --- updated-dependencies: - dependency-name: sharp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: added external links and marked them accordingly (#740) * Build(deps-dev): bump prettier from 3.0.3 to 3.2.4 (#741) Bumps [prettier](https://github.com/prettier/prettier) from 3.0.3 to 3.2.4. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.0.3...3.2.4) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump @sentry/nextjs from 7.91.0 to 7.94.1 (#743) Bumps [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) from 7.91.0 to 7.94.1. - [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.91.0...7.94.1) --- updated-dependencies: - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): bump react-router-dom from 6.17.0 to 6.21.3 (#744) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.17.0 to 6.21.3. - [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.21.3/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] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * add hooks to fetch route (#739) * add hooks to fetch route * add missing routes endpoint for pion1 * feat: created AccountPerpsPositions for the AccountDetails component (#745) * feat: created AccountPerpsPositions for the AccountDetails component * fix: type fixing * feat: added ToolTip * tidy: refactor * fix: added unrealized PnL placeholder * tidy: finetune on the border color * fix: fixed tables * fix: adjustments according to feedback * fix: fixed lent assets table * fix: fixed typing * refactor: streamline size to amount * tidy: remove console.log * fixed refetchgin of account data (#747) Co-authored-by: Linkie Link * fix: fixed merge issues * fix: hide Perp Positions on Osmosis * tidy: refactor * Moved Markets data to SWR (#749) * Build(deps-dev): bump prettier-plugin-tailwindcss from 0.5.6 to 0.5.11 (#751) Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.5.6 to 0.5.11. - [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.6...v0.5.11) --- updated-dependencies: - dependency-name: prettier-plugin-tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump autoprefixer from 10.4.16 to 10.4.17 (#753) Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.16 to 10.4.17. - [Release notes](https://github.com/postcss/autoprefixer/releases) - [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/autoprefixer/compare/10.4.16...10.4.17) --- updated-dependencies: - dependency-name: autoprefixer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump eslint-plugin-import from 2.29.0 to 2.29.1 (#752) Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.29.0 to 2.29.1. - [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.29.0...v2.29.1) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): bump dotenv from 16.3.1 to 16.4.1 (#754) Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.3.1 to 16.4.1. - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](https://github.com/motdotla/dotenv/compare/v16.3.1...v16.4.1) --- updated-dependencies: - dependency-name: dotenv dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Linkie Link * fix: replaces the store with useChainConfig (#755) * Withdraw and fund fix (#756) * fix: fixed markets.find(byDenom()) * fix: fixed the account Summary in modals * fix: fixed the withdraw lent assets logic * Perps account preview (#750) * fix: fixed the Liquidation Price inside the TradeSummary * feat: added account preview * tidy: refactor * feat: added HLS intro * fix: closing the wallet select focusComponent * fix: added perps position update to edit as well * fix: fix update perp * fix: fail catch * fix: implemented suggest changes * tidy: fix * fix: unfix * fix: created helper function * tidy: console.log * Mp 2182 convert api folder to swr hooks (#758) * moved api/openingFee to hook * moved api/icns and api/balances to hooks * moved api/assetIncentivesApy to hooks * moved api/incentives to hooks * fix relative import * List milkTIA (#757) * tidy: update svgs * feat: list milkTIA * env: updated the version * fix: fixed null return of RedBank * fix: useMarketEnabledAssets * fix: fixed merge errors --------- Signed-off-by: dependabot[bot] 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> --- package.json | 10 +- public/images/tokens/akt.svg | 2 +- public/images/tokens/axl.svg | 2 +- public/images/tokens/axlusdc.svg | 2 +- public/images/tokens/inj.svg | 2 +- public/images/tokens/mars.svg | 141 +- public/images/tokens/milktia.svg | 41 + public/images/tokens/osmo.svg | 450 +- public/images/tokens/stosmo.svg | 32 +- public/images/tokens/usdc.svg | 11 +- public/images/tokens/usdt.svg | 2 +- src/api/cosmwasm-client.ts | 59 - .../incentives/calculateAssetIncentivesApy.ts | 41 - .../incentives/getTotalActiveEmissionValue.ts | 42 - src/api/incentives/getUnclaimedRewards.ts | 33 - src/api/markets/getMarket.ts | 24 - src/api/markets/getMarketBorrowings.ts | 35 - src/api/markets/getMarketDebts.ts | 31 - src/api/markets/getMarketDeposits.ts | 23 - src/api/markets/getMarketLiquidities.ts | 30 - .../getMarketUnderlyingLiquidityAmount.ts | 26 - src/api/markets/getMarkets.ts | 59 - src/api/wallets/getICNS.ts | 15 - src/api/wallets/getWalletBalances.ts | 15 - .../AddVaultBorrowAssetsModalContent.tsx | 38 +- src/components/Modals/AssetsSelect/index.tsx | 12 +- src/components/Modals/BorrowModal.tsx | 14 +- .../FundWithdraw/WithdrawFromAccount.tsx | 5 +- .../Modals/HLS/Deposit/Leverage.tsx | 18 +- .../Modals/HLS/Deposit/LeverageSummary.tsx | 8 +- .../Modals/HLS/Deposit/Summary/index.tsx | 11 +- src/components/Modals/HLS/Deposit/index.tsx | 16 +- .../Modals/HLS/Deposit/useAccordionItems.tsx | 35 +- .../HLS/Deposit/useStakingController.tsx | 21 +- .../Modals/HLS/Deposit/useVaultController.tsx | 24 +- .../Modals/HLS/Manage/ChangeLeverage.tsx | 50 +- src/components/Modals/HLS/Manage/Deposit.tsx | 48 +- src/components/Modals/HLS/Manage/Repay.tsx | 36 +- src/components/Modals/HLS/Manage/Withdraw.tsx | 1 - src/components/Modals/HLS/Manage/index.tsx | 13 +- src/components/Modals/HLS/index.tsx | 14 +- .../Modals/ModalContentWithSummary.tsx | 6 +- .../Modals/Vault/VaultBorrowings.tsx | 7 +- src/components/Wallet/RecentTransactions.tsx | 3 +- src/components/Wallet/WalletBridges.tsx | 3 +- .../Wallet/WalletConnectedButton.tsx | 3 +- src/components/Wallet/WalletConnecting.tsx | 47 +- src/components/Wallet/WalletSelect.tsx | 3 +- .../AccountBalancesTable/Columns/Apy.tsx | 4 +- .../AccountBalancesTable/Columns/Size.tsx | 5 +- .../Columns/useAccountBalancesColumns.tsx | 5 +- .../account/AccountBalancesTable/functions.ts | 1 - .../useAccountBalanceData.tsx | 1 + src/components/account/AccountComposition.tsx | 4 +- .../account/AccountDetails/index.tsx | 6 +- .../AccountFund/AccountFundContent.tsx | 9 +- .../account/AccountList/AccountStats.tsx | 4 +- .../Columns/Asset.tsx | 3 +- src/components/account/AccountSummary.tsx | 8 +- src/components/borrow/Borrowings.tsx | 16 +- src/components/borrow/Table/Columns/Debt.tsx | 14 +- .../borrow/Table/Columns/Liquidity.tsx | 8 +- .../Table/useBorrowMarketAssetsTableData.ts | 38 + .../common/AvailableLiquidityMessage.tsx | 13 +- src/components/common/DisplayCurrency.tsx | 4 +- src/components/common/MarketDetails.tsx | 27 +- src/components/common/Select/Option.tsx | 8 +- src/components/common/Toaster/index.tsx | 3 +- src/components/common/TokenInput/index.tsx | 2 +- src/components/earn/farm/Vaults.tsx | 9 +- .../earn/lend/LendingActionButtons.tsx | 2 +- src/components/earn/lend/Lends.tsx | 15 +- .../Table}/useLendingMarketAssetsTableData.ts | 31 +- src/components/header/DesktopHeader.tsx | 15 +- .../header/navigation/DesktopNavigation.tsx | 5 +- src/components/header/navigation/Routes.tsx | 6 +- .../hls/Farm/AvailableHLSVaults.tsx | 7 +- src/components/hls/Farm/Table/Columns/APY.tsx | 7 +- .../hls/Staking/HLSStakingIntro.tsx | 2 +- .../hls/Staking/Table/Columns/ActiveApy.tsx | 4 +- .../hls/Staking/Table/Columns/ApyRange.tsx | 4 +- .../BalancesTable/Columns/TradeDirection.tsx | 1 + .../perps/Module/PerpsManageModule/index.tsx | 41 +- src/components/perps/Module/PerpsModule.tsx | 32 +- src/components/portfolio/Account/Balances.tsx | 4 +- src/components/portfolio/Account/Summary.tsx | 4 +- src/components/portfolio/Card/index.tsx | 4 +- src/components/portfolio/Overview/Summary.tsx | 4 +- src/components/trade/AccountDetailsCard.tsx | 4 +- .../TradeModule/AssetSelector/AssetList.tsx | 19 +- .../TradeModule/AssetSelector/PairsList.tsx | 12 +- .../TradeModule/SwapForm/TradeSummary.tsx | 4 +- .../trade/TradeModule/SwapForm/index.tsx | 34 +- src/configs/assets/milkTIA.ts | 15 + src/configs/chains/osmosis/devnet.ts | 3 +- src/configs/chains/osmosis/osmosis-1.ts | 6 + src/hooks/accounts/useAccountIds.tsx | 3 +- src/hooks/accounts/useAccounts.tsx | 2 +- src/hooks/assets/useAllAssets.ts | 5 +- src/hooks/assets/useBasetAsset.ts | 5 +- src/hooks/assets/useBorrowEnabledAssets.ts | 4 +- src/hooks/assets/useDisplayCurrencyAssets.ts | 4 +- src/hooks/assets/useMarketEnabledAssets.ts | 4 +- src/hooks/assets/usePerpsEnabledAssets.ts | 4 +- src/hooks/markets/useMarket.ts | 9 + src/hooks/markets/useMarketAssets.ts | 14 - src/hooks/markets/useMarketBorrowings.tsx | 17 - src/hooks/markets/useMarketDepositCaps.ts | 26 + src/hooks/markets/useMarketDeposits.ts | 13 - src/hooks/markets/useMarketLiquidities.ts | 17 - src/hooks/markets/useMarkets.ts | 44 + src/hooks/markets/useMarketsInfo.ts | 47 + src/hooks/perps/useOpeningFee.ts | 10 +- src/hooks/useAssetIncentiveApy.ts | 73 +- src/hooks/useBorrowAsset.ts | 10 - src/hooks/useBorrowEnabledMarkets.ts | 8 - src/hooks/useBorrowMarketAssetsTableData.ts | 55 - src/hooks/useClients.ts | 5 + src/hooks/useDepositEnabledMarkets.ts | 6 - src/hooks/useDisplayCurrencyPrice.ts | 9 +- src/hooks/useHLSStakingAssets.ts | 12 +- src/hooks/useICNSDomain.tsx | 15 +- src/hooks/useUnclaimedRewards.tsx | 29 +- src/hooks/useUpdatedAccount/functions.ts | 21 + src/hooks/useUpdatedAccount/index.ts | 15 + src/hooks/useVault.tsx | 6 +- src/hooks/useVaults.tsx | 12 +- src/hooks/useWalletBalances.tsx | 18 +- src/pages/LendPage.tsx | 8 +- src/pages/PortfolioAccountPage.tsx | 4 +- src/pages/_layout.tsx | 68 +- src/store/slices/broadcast.ts | 3 +- src/types/enums/docURL.ts | 1 + src/types/interfaces/asset.d.ts | 29 - src/types/interfaces/chain.d.ts | 1 + src/types/interfaces/market.d.ts | 18 +- src/utils/accounts.ts | 10 +- src/utils/assets.ts | 10 +- src/utils/formatters.ts | 8 +- src/utils/getPerpsPosition.ts | 23 + src/utils/middleware.ts | 13 + src/utils/resolvers.ts | 67 +- yarn.lock | 6560 +++++++++-------- 143 files changed, 4788 insertions(+), 4598 deletions(-) create mode 100644 public/images/tokens/milktia.svg delete mode 100644 src/api/incentives/calculateAssetIncentivesApy.ts delete mode 100644 src/api/incentives/getTotalActiveEmissionValue.ts delete mode 100644 src/api/incentives/getUnclaimedRewards.ts delete mode 100644 src/api/markets/getMarket.ts delete mode 100644 src/api/markets/getMarketBorrowings.ts delete mode 100644 src/api/markets/getMarketDebts.ts delete mode 100644 src/api/markets/getMarketDeposits.ts delete mode 100644 src/api/markets/getMarketLiquidities.ts delete mode 100644 src/api/markets/getMarketUnderlyingLiquidityAmount.ts delete mode 100644 src/api/markets/getMarkets.ts delete mode 100644 src/api/wallets/getICNS.ts delete mode 100644 src/api/wallets/getWalletBalances.ts create mode 100644 src/components/borrow/Table/useBorrowMarketAssetsTableData.ts rename src/{hooks => components/earn/lend/Table}/useLendingMarketAssetsTableData.ts (51%) create mode 100644 src/configs/assets/milkTIA.ts create mode 100644 src/hooks/markets/useMarket.ts delete mode 100644 src/hooks/markets/useMarketAssets.ts delete mode 100644 src/hooks/markets/useMarketBorrowings.tsx create mode 100644 src/hooks/markets/useMarketDepositCaps.ts delete mode 100644 src/hooks/markets/useMarketDeposits.ts delete mode 100644 src/hooks/markets/useMarketLiquidities.ts create mode 100644 src/hooks/markets/useMarkets.ts create mode 100644 src/hooks/markets/useMarketsInfo.ts delete mode 100644 src/hooks/useBorrowAsset.ts delete mode 100644 src/hooks/useBorrowEnabledMarkets.ts delete mode 100644 src/hooks/useBorrowMarketAssetsTableData.ts delete mode 100644 src/hooks/useDepositEnabledMarkets.ts create mode 100644 src/utils/getPerpsPosition.ts create mode 100644 src/utils/middleware.ts diff --git a/package.json b/package.json index ef1e29ba..9731ddba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mars-v2-frontend", - "version": "2.2.0", + "version": "2.2.1", "private": true, "scripts": { "build": "yarn validate-env && next build", @@ -62,17 +62,17 @@ "@types/react": "18.2.41", "@types/react-dom": "18.2.15", "@types/react-helmet": "^6.1.11", - "autoprefixer": "^10.4.16", - "dotenv": "^16.3.1", + "autoprefixer": "^10.4.17", + "dotenv": "^16.4.1", "dotenv-cli": "^7.3.0", "eslint": "^8.56.0", "eslint-config-next": "^14.0.4", - "eslint-plugin-import": "^2.29.0", + "eslint-plugin-import": "^2.29.1", "husky": "^8.0.3", "identity-obj-proxy": "^3.0.0", "lint-staged": "^15.2.0", "prettier": "^3.2.4", - "prettier-plugin-tailwindcss": "^0.5.6", + "prettier-plugin-tailwindcss": "^0.5.11", "shelljs": "^0.8.5", "tailwindcss": "^3.3.3", "typescript": "5.2.2" diff --git a/public/images/tokens/akt.svg b/public/images/tokens/akt.svg index 0d58ae4d..5c507d30 100644 --- a/public/images/tokens/akt.svg +++ b/public/images/tokens/akt.svg @@ -1,4 +1,4 @@ - + diff --git a/public/images/tokens/axl.svg b/public/images/tokens/axl.svg index 4a79129b..1186b02c 100644 --- a/public/images/tokens/axl.svg +++ b/public/images/tokens/axl.svg @@ -1,4 +1,4 @@ - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/tokens/milktia.svg b/public/images/tokens/milktia.svg new file mode 100644 index 00000000..ab5c2575 --- /dev/null +++ b/public/images/tokens/milktia.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + diff --git a/public/images/tokens/osmo.svg b/public/images/tokens/osmo.svg index a1935c96..ecafd4a0 100644 --- a/public/images/tokens/osmo.svg +++ b/public/images/tokens/osmo.svg @@ -1,340 +1,340 @@ - + - - - + + + - - - + + + - - - + + + - - - - + + + + - - + + - - - - + + + + - - + + - - + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - \ No newline at end of file + diff --git a/public/images/tokens/stosmo.svg b/public/images/tokens/stosmo.svg index cd1ed2d0..29ea4225 100644 --- a/public/images/tokens/stosmo.svg +++ b/public/images/tokens/stosmo.svg @@ -1,9 +1,25 @@ - - - - - - - - + + + + + + + + diff --git a/public/images/tokens/usdc.svg b/public/images/tokens/usdc.svg index 60234a85..d45fc551 100644 --- a/public/images/tokens/usdc.svg +++ b/public/images/tokens/usdc.svg @@ -1,13 +1,4 @@ - + + = new Map() -let _accountNftQueryClient: Map = new Map() let _creditManagerQueryClient: Map = new Map() let _oracleQueryClient: Map = new Map() -let _redBankQueryClient: Map = new Map() let _paramsQueryClient: Map = new Map() let _incentivesQueryClient: Map = new Map() let _swapperOsmosisClient: Map = new Map() let _perpsClient: Map = new Map() -let _ICNSQueryClient: Map = new Map() const getClient = async (rpc: string) => { try { @@ -35,23 +29,6 @@ const getClient = async (rpc: string) => { } } -const getAccountNftQueryClient = async (chainConfig: ChainConfig) => { - try { - const contract = chainConfig.contracts.accountNft - const rpc = chainConfig.endpoints.rpc - const key = rpc + contract - - if (!_accountNftQueryClient.get(key)) { - const client = await getClient(rpc) - _accountNftQueryClient.set(key, new MarsAccountNftQueryClient(client, contract)) - } - - return _accountNftQueryClient.get(key)! - } catch (error) { - throw error - } -} - const getCreditManagerQueryClient = async (chainConfig: ChainConfig) => { try { const contract = chainConfig.contracts.creditManager @@ -103,23 +80,6 @@ const getOracleQueryClient = async (chainConfig: ChainConfig) => { } } -const getRedBankQueryClient = async (chainConfig: ChainConfig) => { - try { - const contract = chainConfig.contracts.redBank - const rpc = chainConfig.endpoints.rpc - const key = rpc + contract - - if (!_redBankQueryClient.get(key)) { - const client = await getClient(rpc) - _redBankQueryClient.set(key, new MarsRedBankQueryClient(client, contract)) - } - - return _redBankQueryClient.get(key)! - } catch (error) { - throw error - } -} - const getVaultQueryClient = async (chainConfig: ChainConfig, address: string) => { try { const client = await getClient(chainConfig.endpoints.rpc) @@ -177,31 +137,12 @@ const getPerpsQueryClient = async (chainConfig: ChainConfig) => { } } -const getICNSQueryClient = async (chainConfig: ChainConfig) => { - try { - const contract = chainConfig.contracts.params - const rpc = chainConfig.endpoints.rpc - const key = rpc + contract - if (!_ICNSQueryClient.get(key)) { - const client = await getClient(rpc) - _ICNSQueryClient.set(key, new ICNSQueryClient(client)) - } - - return _ICNSQueryClient.get(key)! - } catch (error) { - throw error - } -} - export { - getAccountNftQueryClient, getClient, getCreditManagerQueryClient, - getICNSQueryClient, getIncentivesQueryClient, getOracleQueryClient, getParamsQueryClient, - getRedBankQueryClient, getSwapperQueryClient, getVaultQueryClient, getPerpsQueryClient, diff --git a/src/api/incentives/calculateAssetIncentivesApy.ts b/src/api/incentives/calculateAssetIncentivesApy.ts deleted file mode 100644 index 243a952b..00000000 --- a/src/api/incentives/calculateAssetIncentivesApy.ts +++ /dev/null @@ -1,41 +0,0 @@ -import getTotalActiveEmissionValue from 'api/incentives/getTotalActiveEmissionValue' -import getMarket from 'api/markets/getMarket' -import getUnderlyingLiquidityAmount from 'api/markets/getMarketUnderlyingLiquidityAmount' -import getPrice from 'api/prices/getPrice' -import { byDenom } from 'utils/array' -import { SECONDS_IN_A_YEAR } from 'utils/constants' -import { BN } from 'utils/helpers' - -export default async function calculateAssetIncentivesApy( - chainConfig: ChainConfig, - denom: string, -): Promise { - try { - const [totalActiveEmissionValue, market] = await Promise.all([ - getTotalActiveEmissionValue(chainConfig, denom), - getMarket(chainConfig, denom), - ]) - - if (!totalActiveEmissionValue) return null - - const [marketLiquidityAmount, assetPrice] = await Promise.all([ - getUnderlyingLiquidityAmount(chainConfig, market), - getPrice(chainConfig, denom), - ]) - - const assetDecimals = (chainConfig.assets.find(byDenom(denom)) as Asset).decimals - - const marketLiquidityValue = BN(marketLiquidityAmount) - .shiftedBy(-assetDecimals) - .multipliedBy(assetPrice) - - const marketReturns = BN(market.apy.deposit).multipliedBy(marketLiquidityValue) - const annualEmission = totalActiveEmissionValue.multipliedBy(SECONDS_IN_A_YEAR) - - const totalAnnualReturnsValue = annualEmission.plus(marketReturns) - return totalAnnualReturnsValue.dividedBy(marketLiquidityValue).multipliedBy(100) - } catch (ex) { - console.error(ex) - return null - } -} diff --git a/src/api/incentives/getTotalActiveEmissionValue.ts b/src/api/incentives/getTotalActiveEmissionValue.ts deleted file mode 100644 index f71132a2..00000000 --- a/src/api/incentives/getTotalActiveEmissionValue.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { cacheFn, emissionsCache } from 'api/cache' -import { getIncentivesQueryClient } from 'api/cosmwasm-client' -import getPrice from 'api/prices/getPrice' -import { BN_ZERO } from 'constants/math' -import { byDenom } from 'utils/array' -import { BN } from 'utils/helpers' - -export default async function getTotalActiveEmissionValue( - chainConfig: ChainConfig, - denom: string, -): Promise { - try { - const client = await getIncentivesQueryClient(chainConfig) - const activeEmissions = await cacheFn( - () => - client.activeEmissions({ - collateralDenom: denom, - }), - emissionsCache, - `emission/${denom}`, - 60, - ) - - if (activeEmissions.length === 0) { - throw 'Asset has no active incentive emission.' - } - - const prices = await Promise.all( - activeEmissions.map((activeEmission) => getPrice(chainConfig, activeEmission.denom)), - ) - - return activeEmissions.reduce((accumulation, current, index) => { - const price = prices[index] - const decimals = chainConfig.assets.find(byDenom(current.denom))?.decimals as number - const emissionValue = BN(current.emission_rate).shiftedBy(-decimals).multipliedBy(price) - - return accumulation.plus(emissionValue) - }, BN_ZERO) - } catch (ex) { - return null - } -} diff --git a/src/api/incentives/getUnclaimedRewards.ts b/src/api/incentives/getUnclaimedRewards.ts deleted file mode 100644 index 66304905..00000000 --- a/src/api/incentives/getUnclaimedRewards.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { cacheFn, unclaimedRewardsCache } from 'api/cache' -import { getIncentivesQueryClient } from 'api/cosmwasm-client' -import { BNCoin } from 'types/classes/BNCoin' -import iterateContractQuery from 'utils/iterateContractQuery' - -export default async function getUnclaimedRewards( - chainConfig: ChainConfig, - accountId: string, -): Promise { - try { - const client = await getIncentivesQueryClient(chainConfig) - const unclaimedRewards = await cacheFn( - () => - iterateContractQuery(() => - client.userUnclaimedRewards({ - user: chainConfig.contracts.creditManager, - accountId, - }), - ), - unclaimedRewardsCache, - `incentives/${accountId}`, - 60, - ) - - if (unclaimedRewards.length === 0) return [] - - return await Promise.all( - unclaimedRewards.map((reward) => new BNCoin({ denom: reward.denom, amount: reward.amount })), - ) - } catch (ex) { - return [] - } -} diff --git a/src/api/markets/getMarket.ts b/src/api/markets/getMarket.ts deleted file mode 100644 index 078bf5fc..00000000 --- a/src/api/markets/getMarket.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { cacheFn, marketCache } from 'api/cache' -import { getParamsQueryClient, getRedBankQueryClient } from 'api/cosmwasm-client' -import { resolveMarketResponse } from 'utils/resolvers' - -export default async function getMarket(chainConfig: ChainConfig, denom: string): Promise { - return cacheFn(() => fetchMarket(chainConfig, denom), marketCache, denom, 60) -} - -async function fetchMarket(chainConfig: ChainConfig, denom: string) { - try { - const redBankClient = await getRedBankQueryClient(chainConfig) - const paramsClient = await getParamsQueryClient(chainConfig) - - const [market, assetParams, assetCap] = await Promise.all([ - redBankClient.market({ denom }), - paramsClient.assetParams({ denom }), - paramsClient.totalDeposit({ denom }), - ]) - - return resolveMarketResponse(market, assetParams, assetCap) - } catch (ex) { - throw ex - } -} diff --git a/src/api/markets/getMarketBorrowings.ts b/src/api/markets/getMarketBorrowings.ts deleted file mode 100644 index 1b0c65b8..00000000 --- a/src/api/markets/getMarketBorrowings.ts +++ /dev/null @@ -1,35 +0,0 @@ -import getMarketLiquidities from 'api/markets/getMarketLiquidities' -import getMarkets from 'api/markets/getMarkets' -import getPrices from 'api/prices/getPrices' -import { BN } from 'utils/helpers' - -export default async function getMarketBorrowings( - chainConfig: ChainConfig, -): Promise { - const liquidities = await getMarketLiquidities(chainConfig) - const borrowEnabledMarkets = (await getMarkets(chainConfig)).filter( - (market: Market) => market.borrowEnabled, - ) - const prices = await getPrices(chainConfig) - - const borrow: BorrowAsset[] = borrowEnabledMarkets.map((market) => { - const price = prices.find((coin) => coin.denom === market.denom)?.amount ?? '1' - const amount = liquidities.find((coin) => coin.denom === market.denom)?.amount ?? '0' - const asset = chainConfig.assets.find((asset) => asset.denom === market.denom)! - - return { - ...asset, - borrowRate: market.apy.borrow ?? 0, - liquidity: { - amount: BN(amount), - value: BN(amount).multipliedBy(price), - }, - } - }) - - if (borrow) { - return borrow - } - - return new Promise((_, reject) => reject('No data')) -} diff --git a/src/api/markets/getMarketDebts.ts b/src/api/markets/getMarketDebts.ts deleted file mode 100644 index ab3e3c0f..00000000 --- a/src/api/markets/getMarketDebts.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { cacheFn, underlyingDebtCache } from 'api/cache' -import { getRedBankQueryClient } from 'api/cosmwasm-client' -import getMarkets from 'api/markets/getMarkets' -import { BNCoin } from 'types/classes/BNCoin' - -export default async function getMarketDebts(chainConfig: ChainConfig): Promise { - try { - const markets: Market[] = await getMarkets(chainConfig) - const redBankQueryClient = await getRedBankQueryClient(chainConfig) - - const debtQueries = markets.map((asset) => - cacheFn( - () => - redBankQueryClient.underlyingDebtAmount({ - denom: asset.denom, - amountScaled: asset.debtTotalScaled, - }), - underlyingDebtCache, - `marketDebts/${asset.denom}/amount/${asset.debtTotalScaled}`, - 60, - ), - ) - const debtsResults = await Promise.all(debtQueries) - - return debtsResults.map( - (debt, index) => new BNCoin({ denom: markets[index].denom, amount: debt }), - ) - } catch (ex) { - throw ex - } -} diff --git a/src/api/markets/getMarketDeposits.ts b/src/api/markets/getMarketDeposits.ts deleted file mode 100644 index 824c824e..00000000 --- a/src/api/markets/getMarketDeposits.ts +++ /dev/null @@ -1,23 +0,0 @@ -import getMarkets from 'api/markets/getMarkets' -import getUnderlyingLiquidityAmount from 'api/markets/getMarketUnderlyingLiquidityAmount' -import { BNCoin } from 'types/classes/BNCoin' - -export default async function getMarketDeposits(chainConfig: ChainConfig): Promise { - try { - const markets: Market[] = await getMarkets(chainConfig) - const depositQueries = markets.map((market) => - getUnderlyingLiquidityAmount(chainConfig, market), - ) - const depositsResults = await Promise.all(depositQueries) - - return depositsResults.map( - (deposit, index) => - new BNCoin({ - denom: markets[index].denom, - amount: deposit, - }), - ) - } catch (ex) { - throw ex - } -} diff --git a/src/api/markets/getMarketLiquidities.ts b/src/api/markets/getMarketLiquidities.ts deleted file mode 100644 index 0c8cb3e0..00000000 --- a/src/api/markets/getMarketLiquidities.ts +++ /dev/null @@ -1,30 +0,0 @@ -import getMarketDebts from 'api/markets/getMarketDebts' -import getMarketDeposits from 'api/markets/getMarketDeposits' -import { BNCoin } from 'types/classes/BNCoin' - -export default async function getMarketLiquidities(chainConfig: ChainConfig): Promise { - const deposits = await getMarketDeposits(chainConfig) - const debts = await getMarketDebts(chainConfig) - - const liquidity: BNCoin[] = deposits.map((deposit) => { - const debt = debts.find((debt) => debt.denom === deposit.denom) - - if (debt) { - return new BNCoin({ - denom: deposit.denom, - amount: deposit.amount.minus(debt.amount).toString(), - }) - } - - return new BNCoin({ - denom: deposit.denom, - amount: '0', - }) - }) - - if (liquidity) { - return liquidity - } - - return new Promise((_, reject) => reject('No data')) -} diff --git a/src/api/markets/getMarketUnderlyingLiquidityAmount.ts b/src/api/markets/getMarketUnderlyingLiquidityAmount.ts deleted file mode 100644 index e2fe4de0..00000000 --- a/src/api/markets/getMarketUnderlyingLiquidityAmount.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { cacheFn, underlyingLiquidityAmountCache } from 'api/cache' -import { getRedBankQueryClient } from 'api/cosmwasm-client' - -export default async function getUnderlyingLiquidityAmount( - chainConfig: ChainConfig, - market: Market, -): Promise { - return cacheFn( - () => fetchUnderlyingLiquidityAmount(chainConfig, market), - underlyingLiquidityAmountCache, - `underlyingLiquidity/${market.denom}/amount/${market.collateralTotalScaled}`, - 60, - ) -} - -async function fetchUnderlyingLiquidityAmount(chainConfig: ChainConfig, market: Market) { - try { - const client = await getRedBankQueryClient(chainConfig) - return await client.underlyingLiquidityAmount({ - denom: market.denom, - amountScaled: market.collateralTotalScaled, - }) - } catch (ex) { - throw ex - } -} diff --git a/src/api/markets/getMarkets.ts b/src/api/markets/getMarkets.ts deleted file mode 100644 index cbcc4370..00000000 --- a/src/api/markets/getMarkets.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { allParamsCache, cacheFn, marketsCache, totalDepositCache } from 'api/cache' -import { getParamsQueryClient, getRedBankQueryClient } from 'api/cosmwasm-client' -import { - AssetParamsBaseForAddr as AssetParams, - TotalDepositResponse, -} from 'types/generated/mars-params/MarsParams.types' -import { Market as RedBankMarket } from 'types/generated/mars-red-bank/MarsRedBank.types' -import { byDenom } from 'utils/array' -import iterateContractQuery from 'utils/iterateContractQuery' -import { resolveMarketResponse } from 'utils/resolvers' - -export default async function getMarkets(chainConfig: ChainConfig): Promise { - try { - const redBankClient = await getRedBankQueryClient(chainConfig) - const paramsClient = await getParamsQueryClient(chainConfig) - - const marketAssets = chainConfig.assets.filter((asset) => asset.isMarket) - - const capQueries = marketAssets - .filter((asset) => asset.isMarket) - .map((asset) => - cacheFn( - () => paramsClient.totalDeposit({ denom: asset.denom }), - totalDepositCache, - `chains/${chainConfig.id}/enabledMarkets/${asset.denom}`, - 60, - ), - ) - - const caps = await Promise.all(capQueries) - - const [markets, assetParams, assetCaps] = await Promise.all([ - cacheFn( - () => iterateContractQuery(redBankClient.markets), - marketsCache, - `chains/${chainConfig.id}/markets`, - 60, - ), - cacheFn( - async () => await iterateContractQuery(paramsClient.allAssetParams), - allParamsCache, - `chains/${chainConfig.id}/params`, - 60, - ), - Promise.all(capQueries), - ]) - - return marketAssets.map((asset) => - resolveMarketResponse( - markets.find(byDenom(asset.denom)) as RedBankMarket, - assetParams.find(byDenom(asset.denom)) as AssetParams, - assetCaps.find(byDenom(asset.denom)) as TotalDepositResponse, - ), - ) - } catch (ex) { - console.log(ex) - throw ex - } -} diff --git a/src/api/wallets/getICNS.ts b/src/api/wallets/getICNS.ts deleted file mode 100644 index 3e951714..00000000 --- a/src/api/wallets/getICNS.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { getICNSQueryClient } from 'api/cosmwasm-client' -import { ChainInfoID } from 'types/enums/wallet' - -export default async function getICNS( - chainConfig: ChainConfig, - address?: string, -): Promise { - if (!address || chainConfig.id !== ChainInfoID.Osmosis1) return - try { - const icnsQueryClient = await getICNSQueryClient(chainConfig) - return icnsQueryClient.primaryName({ address }) - } catch (ex) { - throw ex - } -} diff --git a/src/api/wallets/getWalletBalances.ts b/src/api/wallets/getWalletBalances.ts deleted file mode 100644 index c6ea4d3f..00000000 --- a/src/api/wallets/getWalletBalances.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default async function getWalletBalances( - chainConfig: ChainConfig, - address: string, -): Promise { - const uri = '/cosmos/bank/v1beta1/balances/' - - const response = await fetch(`${chainConfig.endpoints.rest}${uri}${address}`) - - if (response.ok) { - const data = await response.json() - return data.balances - } - - return new Promise((_, reject) => reject('No data')) -} diff --git a/src/components/Modals/AddVaultAssets/AddVaultBorrowAssetsModalContent.tsx b/src/components/Modals/AddVaultAssets/AddVaultBorrowAssetsModalContent.tsx index 8bd8e29f..f68e6a6f 100644 --- a/src/components/Modals/AddVaultAssets/AddVaultBorrowAssetsModalContent.tsx +++ b/src/components/Modals/AddVaultAssets/AddVaultBorrowAssetsModalContent.tsx @@ -1,9 +1,9 @@ import { useCallback, useMemo, useState } from 'react' -import AssetsSelect from 'components/Modals/AssetsSelect' import SearchBar from 'components/common/SearchBar' import Text from 'components/common/Text' -import useMarketBorrowings from 'hooks/markets/useMarketBorrowings' +import AssetsSelect from 'components/Modals/AssetsSelect' +import useMarkets from 'hooks/markets/useMarkets' import useStore from 'store' interface Props { @@ -14,16 +14,16 @@ interface Props { export default function AddVaultAssetsModalContent(props: Props) { const [searchString, setSearchString] = useState('') - const { data: borrowAssets } = useMarketBorrowings() + const markets = useMarkets() - const filteredBorrowAssets: BorrowAsset[] = useMemo(() => { - return borrowAssets.filter( - (asset) => - asset.name.toLowerCase().includes(searchString.toLowerCase()) || - asset.denom.toLowerCase().includes(searchString.toLowerCase()) || - asset.symbol.toLowerCase().includes(searchString.toLowerCase()), + const filteredMarkets: Market[] = useMemo(() => { + return markets.filter( + (market) => + market.asset.name.toLowerCase().includes(searchString.toLowerCase()) || + market.asset.denom.toLowerCase().includes(searchString.toLowerCase()) || + market.asset.symbol.toLowerCase().includes(searchString.toLowerCase()), ) - }, [borrowAssets, searchString]) + }, [markets, searchString]) function onChangeSearchString(value: string) { setSearchString(value) @@ -31,21 +31,21 @@ export default function AddVaultAssetsModalContent(props: Props) { const [poolAssets, stableAssets] = useMemo( () => - filteredBorrowAssets.reduce( - (acc, asset) => { + filteredMarkets.reduce( + (acc, market) => { if ( - asset.denom === props.vault.denoms.primary || - asset.denom === props.vault.denoms.secondary + market.asset.denom === props.vault.denoms.primary || + market.asset.denom === props.vault.denoms.secondary ) { - acc[0].push(asset) - } else if (asset.isStable) { - acc[1].push(asset) + acc[0].push(market.asset) + } else if (market.asset.isStable) { + acc[1].push(market.asset) } return acc }, - [[], []] as [BorrowAsset[], BorrowAsset[]], + [[], []] as [Asset[], Asset[]], ), - [filteredBorrowAssets, props.vault.denoms.primary, props.vault.denoms.secondary], + [filteredMarkets, props.vault.denoms.primary, props.vault.denoms.secondary], ) const selectedDenoms = useStore((s) => s.addVaultBorrowingsModal?.selectedDenoms) diff --git a/src/components/Modals/AssetsSelect/index.tsx b/src/components/Modals/AssetsSelect/index.tsx index 3c8ffbf9..eaa4f7ea 100644 --- a/src/components/Modals/AssetsSelect/index.tsx +++ b/src/components/Modals/AssetsSelect/index.tsx @@ -1,15 +1,16 @@ import { RowSelectionState } from '@tanstack/react-table' import { useEffect, useMemo, useState } from 'react' -import useAssetSelectColumns from 'components/Modals/AssetsSelect/Columns/useAssetSelectColumns' import Table from 'components/common/Table' +import useAssetSelectColumns from 'components/Modals/AssetsSelect/Columns/useAssetSelectColumns' import useGetCoinValue from 'hooks/assets/useGetCoinValue' -import useMarketAssets from 'hooks/markets/useMarketAssets' +import useMarkets from 'hooks/markets/useMarkets' import useStore from 'store' import { BNCoin } from 'types/classes/BNCoin' import { byDenom } from 'utils/array' import { BN } from 'utils/helpers' +// TODO: Pass the market data directly here instead of the assets interface Props { assets: Asset[] onChangeSelected: (selected: string[]) => void @@ -20,12 +21,11 @@ interface Props { export default function AssetsSelect(props: Props) { const { assets, onChangeSelected, selectedDenoms, isBorrow } = props const columns = useAssetSelectColumns(isBorrow) - const { data: markets } = useMarketAssets() + const markets = useMarkets() const getCoinValue = useGetCoinValue() const defaultSelected = useMemo(() => { - const selectableAssets = assets - return selectableAssets.reduce( + return assets.reduce( (acc, asset, index) => { if (selectedDenoms?.includes(asset.denom)) { acc[index] = true @@ -48,7 +48,7 @@ export default function AssetsSelect(props: Props) { asset, balance: balancesForAsset?.amount ?? '0', value, - market: markets.find((market) => market.denom === asset.denom), + market: markets.find((market) => market.asset.denom === asset.denom), } }) }, [balances, assets, markets, getCoinValue]) diff --git a/src/components/Modals/BorrowModal.tsx b/src/components/Modals/BorrowModal.tsx index 81fb7b66..a526c0f2 100644 --- a/src/components/Modals/BorrowModal.tsx +++ b/src/components/Modals/BorrowModal.tsx @@ -16,7 +16,7 @@ import TokenInputWithSlider from 'components/common/TokenInput/TokenInputWithSli import Modal from 'components/Modals/Modal' import { BN_ZERO } from 'constants/math' import useCurrentAccount from 'hooks/accounts/useCurrentAccount' -import useMarketAssets from 'hooks/markets/useMarketAssets' +import useMarkets from 'hooks/markets/useMarkets' import useAutoLend from 'hooks/useAutoLend' import useHealthComputer from 'hooks/useHealthComputer' import useToggle from 'hooks/useToggle' @@ -91,7 +91,7 @@ function BorrowModal(props: Props) { const isAutoLendEnabled = autoLendEnabledAccountIds.includes(account.id) const { computeMaxBorrowAmount } = useHealthComputer(account) const totalDebt = BN(getDebtAmount(modal)) - const { data: marketAssets } = useMarketAssets() + const markets = useMarkets() const [depositBalance, lendBalance] = useMemo( () => [ @@ -107,13 +107,13 @@ function BorrowModal(props: Props) { ) const overpayExeedsCap = useMemo(() => { - const marketAsset = marketAssets.find(byDenom(asset.denom)) + const marketAsset = markets.find((market) => market.asset.denom === asset.denom) if (!marketAsset) return const overpayAmount = totalDebtRepayAmount.minus(totalDebt) const marketCapAfterOverpay = marketAsset.cap.used.plus(overpayAmount) return marketAsset.cap.max.isLessThanOrEqualTo(marketCapAfterOverpay) - }, [marketAssets, asset.denom, totalDebt, totalDebtRepayAmount]) + }, [markets, asset.denom, totalDebt, totalDebtRepayAmount]) const maxRepayAmount = useMemo(() => { const maxBalance = repayFromWallet @@ -187,7 +187,7 @@ function BorrowModal(props: Props) { ? BN_ZERO : computeMaxBorrowAmount(asset.denom, borrowToWallet ? 'wallet' : 'deposit') - return BigNumber.min(maxBorrowAmount, modal.marketData?.liquidity?.amount || 0) + return BigNumber.min(maxBorrowAmount, modal.marketData?.liquidity || 0) }, [asset.denom, borrowToWallet, computeMaxBorrowAmount, isRepay, modal.marketData]) useEffect(() => { @@ -266,7 +266,7 @@ function BorrowModal(props: Props) {
@@ -274,7 +274,7 @@ function BorrowModal(props: Props) { className='text-xs' coin={BNCoin.fromDenomAndBigNumber( asset.denom, - modal.marketData?.liquidity?.amount ?? BN_ZERO, + modal.marketData?.liquidity ?? BN_ZERO, )} parentheses /> diff --git a/src/components/Modals/FundWithdraw/WithdrawFromAccount.tsx b/src/components/Modals/FundWithdraw/WithdrawFromAccount.tsx index 9488088a..d7c31755 100644 --- a/src/components/Modals/FundWithdraw/WithdrawFromAccount.tsx +++ b/src/components/Modals/FundWithdraw/WithdrawFromAccount.tsx @@ -51,9 +51,8 @@ export default function WithdrawFromAccount(props: Props) { const accountLent = account.lends.find(byDenom(currentAsset.denom))?.amount ?? BN_ZERO const shouldReclaim = amount.isGreaterThan(accountDeposit) && !accountLent.isZero() const isReclaimingMaxAmount = accountLent.isLessThanOrEqualTo(amount.minus(accountDeposit)) - const reclaimAmount = isReclaimingMaxAmount - ? amount - : accountLent.minus(amount).minus(accountDeposit) + + const reclaimAmount = isReclaimingMaxAmount ? amount : amount.minus(accountDeposit) function onChangeAmount(val: BigNumber) { setAmount(val) diff --git a/src/components/Modals/HLS/Deposit/Leverage.tsx b/src/components/Modals/HLS/Deposit/Leverage.tsx index acb2da25..b23ac0ff 100644 --- a/src/components/Modals/HLS/Deposit/Leverage.tsx +++ b/src/components/Modals/HLS/Deposit/Leverage.tsx @@ -2,13 +2,13 @@ import React, { useMemo } from 'react' import Button from 'components/common/Button' import { ArrowRight } from 'components/common/Icons' -import LeverageSummary from 'components/Modals/HLS/Deposit/LeverageSummary' import TokenInputWithSlider from 'components/common/TokenInput/TokenInputWithSlider' +import LeverageSummary from 'components/Modals/HLS/Deposit/LeverageSummary' import { getLeveragedApy } from 'utils/math' interface Props { amount: BigNumber - asset: BorrowAsset + borrowMarket: Market max: BigNumber onChangeAmount: (amount: BigNumber) => void onClickBtn: () => void @@ -21,15 +21,15 @@ interface 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]) + if (!props.borrowMarket.apy.borrow) return 0 + return getLeveragedApy(props.baseApy, props.borrowMarket.apy.borrow, props.leverage) + }, [props.baseApy, props.borrowMarket.apy.borrow, props.leverage]) return (
- +
diff --git a/src/components/Modals/HLS/Deposit/LeverageSummary.tsx b/src/components/Modals/HLS/Deposit/LeverageSummary.tsx index 7139eac2..a4d233b1 100644 --- a/src/components/Modals/HLS/Deposit/LeverageSummary.tsx +++ b/src/components/Modals/HLS/Deposit/LeverageSummary.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from 'react' import SummaryItems from 'components/common/SummaryItems' -import useBorrowAsset from 'hooks/useBorrowAsset' +import useMarket from 'hooks/markets/useMarket' interface Props { asset: Asset @@ -10,7 +10,7 @@ interface Props { } export default function LeverageSummary(props: Props) { - const borrowAsset = useBorrowAsset(props.asset.denom) + const market = useMarket(props.asset.denom) const items: SummaryItem[] = useMemo(() => { return [ @@ -21,7 +21,7 @@ export default function LeverageSummary(props: Props) { }, { title: `Borrow APR ${props.asset.symbol}`, - amount: borrowAsset?.borrowRate || 0, + amount: market?.apy.borrow || 0, options: { suffix: '%', minDecimals: 2, maxDecimals: 2 }, }, { @@ -30,7 +30,7 @@ export default function LeverageSummary(props: Props) { options: { prefix: '$' }, }, ] - }, [borrowAsset?.borrowRate, props.apy, props.asset.symbol, props.positionValue]) + }, [market?.apy.borrow, props.apy, props.asset.symbol, props.positionValue]) return } diff --git a/src/components/Modals/HLS/Deposit/Summary/index.tsx b/src/components/Modals/HLS/Deposit/Summary/index.tsx index 43099a90..c780bded 100644 --- a/src/components/Modals/HLS/Deposit/Summary/index.tsx +++ b/src/components/Modals/HLS/Deposit/Summary/index.tsx @@ -4,13 +4,12 @@ import Button from 'components/common/Button' import { ArrowRight } from 'components/common/Icons' import AssetSummary from 'components/Modals/HLS/Deposit/Summary/AssetSummary' import YourPosition from 'components/Modals/HLS/Deposit/Summary/YourPosition' -import useBorrowAsset from 'hooks/useBorrowAsset' import { BNCoin } from 'types/classes/BNCoin' interface Props { apy: number borrowAmount: BigNumber - borrowAsset: Asset + borrowMarket: Market collateralAsset: Asset depositAmount: BigNumber leverage: number @@ -20,18 +19,14 @@ interface Props { } export default function Summary(props: Props) { - const borrowAsset = useBorrowAsset(props.borrowAsset.denom) - - if (!borrowAsset) return null - return (
- +
{props.borrowings.map((coin) => { const asset = assets.find(byDenom(coin.denom)) - const borrowRate = marketAssets?.find((market) => market.denom === coin.denom)?.apy.borrow + const borrowRate = markets?.find((market) => market.asset.denom === coin.denom)?.apy + .borrow if (!asset || !borrowRate) return diff --git a/src/components/Wallet/RecentTransactions.tsx b/src/components/Wallet/RecentTransactions.tsx index 5dfe2cd3..567da7d9 100644 --- a/src/components/Wallet/RecentTransactions.tsx +++ b/src/components/Wallet/RecentTransactions.tsx @@ -8,11 +8,12 @@ import { TextLink } from 'components/common/TextLink' import { generateToastContent } from 'components/common/Toaster' import useTransactions from 'hooks/localStorage/useTransactions' import useStore from 'store' +import useChainConfig from 'hooks/useChainConfig' export default function RecentTransactions() { const address = useStore((s) => s.address) const [transactions, setTransactions] = useTransactions() - const chainConfig = useStore((s) => s.chainConfig) + const chainConfig = useChainConfig() const recentTransactions = transactions.recent .filter((tx) => tx.address === address) .sort((a, b) => (a.timestamp > b.timestamp ? -1 : 1)) diff --git a/src/components/Wallet/WalletBridges.tsx b/src/components/Wallet/WalletBridges.tsx index 25f35999..504f46bd 100644 --- a/src/components/Wallet/WalletBridges.tsx +++ b/src/components/Wallet/WalletBridges.tsx @@ -17,6 +17,7 @@ import useStore from 'store' import { byDenom } from 'utils/array' import { defaultFee } from 'utils/constants' import { BN } from 'utils/helpers' +import useChainConfig from 'hooks/useChainConfig' function Bridge({ name, url, image }: Bridge) { return ( @@ -35,7 +36,7 @@ function Bridge({ name, url, image }: Bridge) { } export default function WalletBridges() { - const chainConfig = useStore((s) => s.chainConfig) + const chainConfig = useChainConfig() const address = useStore((s) => s.address) const currentWallet = useCurrentWallet() diff --git a/src/components/Wallet/WalletConnectedButton.tsx b/src/components/Wallet/WalletConnectedButton.tsx index 00ffdf03..5cc4a907 100644 --- a/src/components/Wallet/WalletConnectedButton.tsx +++ b/src/components/Wallet/WalletConnectedButton.tsx @@ -27,6 +27,7 @@ import { NETWORK } from 'types/enums/network' import { ChainInfoID } from 'types/enums/wallet' import { truncate } from 'utils/formatters' import { getPage, getRoute } from 'utils/route' +import useChainConfig from 'hooks/useChainConfig' export default function WalletConnectedButton() { // --------------- @@ -40,7 +41,7 @@ export default function WalletConnectedButton() { const userDomain = useStore((s) => s.userDomain) const focusComponent = useStore((s) => s.focusComponent) const network = useStore((s) => s.client?.connectedWallet.network) - const chainConfig = useStore((s) => s.chainConfig) + const chainConfig = useChainConfig() const baseAsset = useBaseAsset() const { data: walletBalances, isLoading } = useWalletBalances(address) const { data: icnsData, isLoading: isLoadingICNS } = useICNSDomain(address) diff --git a/src/components/Wallet/WalletConnecting.tsx b/src/components/Wallet/WalletConnecting.tsx index e9a3e5fa..156e01aa 100644 --- a/src/components/Wallet/WalletConnecting.tsx +++ b/src/components/Wallet/WalletConnecting.tsx @@ -26,8 +26,16 @@ const mapErrorMessages = (providerId: string, errorMessage: string, name: string } export default function WalletConnecting(props: Props) { - const { connect, mobileConnect, simulate, sign, broadcast, mobileProviders, extensionProviders } = - useShuttle() + const { + connect, + mobileConnect, + simulate, + sign, + broadcast, + mobileProviders, + extensionProviders, + disconnect, + } = useShuttle() const providers = useMemo( () => [...mobileProviders, ...extensionProviders], [mobileProviders, extensionProviders], @@ -85,6 +93,9 @@ export default function WalletConnecting(props: Props) { }} /> ), + onClose: () => { + disconnect({ chainId: chainConfig.id }) + }, }, }) } @@ -92,7 +103,17 @@ export default function WalletConnecting(props: Props) { } if (!isConnecting) handleConnectAsync() }, - [isConnecting, client, setIsConnecting, connect, chainConfig, broadcast, sign, simulate], + [ + isConnecting, + client, + setIsConnecting, + connect, + chainConfig, + broadcast, + sign, + simulate, + disconnect, + ], ) const handleMobileConnect = useCallback( @@ -105,6 +126,9 @@ export default function WalletConnecting(props: Props) { userDomain: undefined, focusComponent: { component: , + onClose: () => { + disconnect({ chainId: chainConfig.id }) + }, }, }) return @@ -144,6 +168,9 @@ export default function WalletConnecting(props: Props) { }} /> ), + onClose: () => { + disconnect({ chainId: chainConfig.id }) + }, }, }) } @@ -161,6 +188,7 @@ export default function WalletConnecting(props: Props) { broadcast, sign, simulate, + disconnect, ], ) @@ -172,6 +200,9 @@ export default function WalletConnecting(props: Props) { userDomain: undefined, focusComponent: { component: , + onClose: () => { + disconnect({ chainId: chainConfig.id }) + }, }, }) return @@ -188,7 +219,15 @@ export default function WalletConnecting(props: Props) { return } handleConnect(provider.id) - }, [handleConnect, isConnecting, providerId, providers, handleMobileConnect]) + }, [ + handleConnect, + isConnecting, + providerId, + providers, + handleMobileConnect, + disconnect, + chainConfig.id, + ]) return ( s.chainConfig) + const chainConfig = useChainConfig() const { extensionProviders, mobileProviders, mobileConnect } = useShuttle() const [qrCodeUrl, setQRCodeUrl] = useState('') const [error, setError] = useState(props.error) diff --git a/src/components/account/AccountBalancesTable/Columns/Apy.tsx b/src/components/account/AccountBalancesTable/Columns/Apy.tsx index 68e40cf0..a57baa6e 100644 --- a/src/components/account/AccountBalancesTable/Columns/Apy.tsx +++ b/src/components/account/AccountBalancesTable/Columns/Apy.tsx @@ -1,5 +1,4 @@ import AssetRate from 'components/common/assets/AssetRate' -import { byDenom } from 'utils/array' export const APY_META = { accessorKey: 'apy', header: 'APY', meta: { className: 'w-30' } } @@ -14,7 +13,8 @@ export default function Apr(props: Props) { const { markets, type, denom, apy } = props if (apy === 0) return

- const isEnabled = markets.find(byDenom(denom))?.borrowEnabled ?? false + const isEnabled = + markets.find((market) => market.asset.denom === props.denom)?.borrowEnabled ?? false return ( , b: Row getAmountChangeColor(type, amountChange), [amountChange, type]) if (type === 'vault') return

- - const color = getAmountChangeColor(type, amountChange) const className = classNames('text-xs text-right', color) const allowZero = !amountChange.isZero() @@ -47,6 +47,7 @@ export default function Size(props: Props) { const formattedAmount = formatAmountToPrecision(size, MAX_AMOUNT_DECIMALS) const minimumAmount = allowZero ? 0 : MIN_AMOUNT const lowAmount = formattedAmount === 0 ? minimumAmount : Math.max(formattedAmount, MIN_AMOUNT) + return ( s.updatedAccount) const { computeLiquidationPrice } = useHealthComputer(updatedAccount ?? account) diff --git a/src/components/account/AccountBalancesTable/functions.ts b/src/components/account/AccountBalancesTable/functions.ts index b523cb4d..35072bd1 100644 --- a/src/components/account/AccountBalancesTable/functions.ts +++ b/src/components/account/AccountBalancesTable/functions.ts @@ -58,7 +58,6 @@ export function getVaultAccountBalanceRow( } export function getAmountChangeColor(type: PositionType, amount: BigNumber) { - if (type === 'perp') return '' if (type === 'borrow') { if (amount.isGreaterThan(0)) return 'text-loss' if (amount.isLessThan(0)) return 'text-profit' diff --git a/src/components/account/AccountBalancesTable/useAccountBalanceData.tsx b/src/components/account/AccountBalancesTable/useAccountBalanceData.tsx index 73391524..e9f660eb 100644 --- a/src/components/account/AccountBalancesTable/useAccountBalanceData.tsx +++ b/src/components/account/AccountBalancesTable/useAccountBalanceData.tsx @@ -37,6 +37,7 @@ export default function useAccountBalanceData(props: Props) { ? hlsStrategies.find((strategy) => strategy.denoms.deposit === asset.denom)?.apy ?? 0 : 0 const prevDeposit = updatedAccount ? account?.deposits.find(byDenom(deposit.denom)) : deposit + deposits.push( getAssetAccountBalanceRow('deposit', asset, prices, assets, deposit, apy, prevDeposit), ) diff --git a/src/components/account/AccountComposition.tsx b/src/components/account/AccountComposition.tsx index 3a791f48..936bc265 100644 --- a/src/components/account/AccountComposition.tsx +++ b/src/components/account/AccountComposition.tsx @@ -2,16 +2,16 @@ import BigNumber from 'bignumber.js' import classNames from 'classnames' import { useMemo } from 'react' +import useBorrowMarketAssetsTableData from 'components/borrow/Table/useBorrowMarketAssetsTableData' import DisplayCurrency from 'components/common/DisplayCurrency' import { FormattedNumber } from 'components/common/FormattedNumber' import { ArrowRight } from 'components/common/Icons' import Text from 'components/common/Text' +import useLendingMarketAssetsTableData from 'components/earn/lend/Table/useLendingMarketAssetsTableData' import { BN_ZERO, MAX_AMOUNT_DECIMALS } from 'constants/math' import { ORACLE_DENOM } from 'constants/oracle' import useAllAssets from 'hooks/assets/useAllAssets' -import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData' import useHLSStakingAssets from 'hooks/useHLSStakingAssets' -import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData' import usePrices from 'hooks/usePrices' import useStore from 'store' import { BNCoin } from 'types/classes/BNCoin' diff --git a/src/components/account/AccountDetails/index.tsx b/src/components/account/AccountDetails/index.tsx index 79d0ff8b..6cc4631d 100644 --- a/src/components/account/AccountDetails/index.tsx +++ b/src/components/account/AccountDetails/index.tsx @@ -8,6 +8,7 @@ import AccountDetailsLeverage from 'components/account/AccountDetails/AccountDet import Skeleton from 'components/account/AccountDetails/Skeleton' import AccountPerpPositionTable from 'components/account/AccountPerpPositionTable' import { HealthGauge } from 'components/account/Health/HealthGauge' +import useBorrowMarketAssetsTableData from 'components/borrow/Table/useBorrowMarketAssetsTableData' import EscButton from 'components/common/Button/EscButton' import { glowElement } from 'components/common/Button/utils' import Card from 'components/common/Card' @@ -15,6 +16,7 @@ import DisplayCurrency from 'components/common/DisplayCurrency' import { FormattedNumber } from 'components/common/FormattedNumber' import { ThreeDots } from 'components/common/Icons' import Text from 'components/common/Text' +import useLendingMarketAssetsTableData from 'components/earn/lend/Table/useLendingMarketAssetsTableData' import { DEFAULT_SETTINGS } from 'constants/defaultSettings' import { LocalStorageKeys } from 'constants/localStorageKeys' import { ORACLE_DENOM } from 'constants/oracle' @@ -24,10 +26,8 @@ import useCurrentAccount from 'hooks/accounts/useCurrentAccount' import useAllAssets from 'hooks/assets/useAllAssets' import useLocalStorage from 'hooks/localStorage/useLocalStorage' import useAccountId from 'hooks/useAccountId' -import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData' -import useHLSStakingAssets from 'hooks/useHLSStakingAssets' import useHealthComputer from 'hooks/useHealthComputer' -import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData' +import useHLSStakingAssets from 'hooks/useHLSStakingAssets' import usePrices from 'hooks/usePrices' import useStore from 'store' import { BNCoin } from 'types/classes/BNCoin' diff --git a/src/components/account/AccountFund/AccountFundContent.tsx b/src/components/account/AccountFund/AccountFundContent.tsx index b28a2734..4a5294d6 100644 --- a/src/components/account/AccountFund/AccountFundContent.tsx +++ b/src/components/account/AccountFund/AccountFundContent.tsx @@ -10,7 +10,7 @@ import Text from 'components/common/Text' import WalletBridges from 'components/Wallet/WalletBridges' import { BN_ZERO } from 'constants/math' import useBaseAsset from 'hooks/assets/useBasetAsset' -import useMarketAssets from 'hooks/markets/useMarketAssets' +import useMarkets from 'hooks/markets/useMarkets' import useAutoLend from 'hooks/useAutoLend' import { useUpdatedAccount } from 'hooks/useUpdatedAccount' import useWalletBalances from 'hooks/useWalletBalances' @@ -35,7 +35,8 @@ export default function AccountFundContent(props: Props) { const { autoLendEnabledAccountIds } = useAutoLend() const isLending = autoLendEnabledAccountIds.includes(props.accountId) const [fundingAssets, setFundingAssets] = useState([]) - const { data: marketAssets } = useMarketAssets() + const markets = useMarkets() + const { data: walletBalances } = useWalletBalances(props.address) const { simulateDeposits } = useUpdatedAccount(props.account) const baseAsset = useBaseAsset() @@ -127,7 +128,7 @@ export default function AccountFundContent(props: Props) { const depositCapReachedCoins = useMemo(() => { const depositCapReachedCoins: BNCoin[] = [] fundingAssets.forEach((asset) => { - const marketAsset = marketAssets.find(byDenom(asset.denom)) + const marketAsset = markets.find((market) => market.asset.denom === asset.denom) if (!marketAsset) return const capLeft = getCapLeftWithBuffer(marketAsset.cap) @@ -137,7 +138,7 @@ export default function AccountFundContent(props: Props) { depositCapReachedCoins.push(BNCoin.fromDenomAndBigNumber(asset.denom, capLeft)) }) return depositCapReachedCoins - }, [fundingAssets, marketAssets]) + }, [fundingAssets, markets]) return ( <> diff --git a/src/components/account/AccountList/AccountStats.tsx b/src/components/account/AccountList/AccountStats.tsx index 4cc73228..3dec345f 100644 --- a/src/components/account/AccountList/AccountStats.tsx +++ b/src/components/account/AccountList/AccountStats.tsx @@ -2,15 +2,15 @@ import { useCallback, useMemo } from 'react' import AccountFundFullPage from 'components/account/AccountFund/AccountFundFullPage' import Skeleton from 'components/account/AccountList/Skeleton' +import useBorrowMarketAssetsTableData from 'components/borrow/Table/useBorrowMarketAssetsTableData' import Button from 'components/common/Button' import { ArrowDownLine, ArrowUpLine, TrashBin } from 'components/common/Icons' import SwitchAutoLend from 'components/common/Switch/SwitchAutoLend' +import useLendingMarketAssetsTableData from 'components/earn/lend/Table/useLendingMarketAssetsTableData' import useAccount from 'hooks/accounts/useAccount' import useAllAssets from 'hooks/assets/useAllAssets' -import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData' import useHealthComputer from 'hooks/useHealthComputer' import useHLSStakingAssets from 'hooks/useHLSStakingAssets' -import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData' import usePrices from 'hooks/usePrices' import useStore from 'store' import { calculateAccountApr, calculateAccountBalanceValue } from 'utils/accounts' diff --git a/src/components/account/AccountPerpPositionTable/Columns/Asset.tsx b/src/components/account/AccountPerpPositionTable/Columns/Asset.tsx index 4294f544..39092c82 100644 --- a/src/components/account/AccountPerpPositionTable/Columns/Asset.tsx +++ b/src/components/account/AccountPerpPositionTable/Columns/Asset.tsx @@ -16,7 +16,7 @@ interface Props { } function LabelAndValue(props: { label: string; children: ReactNode; className?: string }) { - const { label, children, className } = props + const { label, children } = props return (
@@ -58,6 +58,7 @@ function TooltipContent(props: Props) { export default function Asset(props: Props) { const { row } = props + return ( } type='info'> diff --git a/src/components/account/AccountSummary.tsx b/src/components/account/AccountSummary.tsx index 38e39a58..0f7fc463 100644 --- a/src/components/account/AccountSummary.tsx +++ b/src/components/account/AccountSummary.tsx @@ -5,21 +5,21 @@ import AccountBalancesTable from 'components/account/AccountBalancesTable' import AccountComposition from 'components/account/AccountComposition' import AccountPerpPositionTable from 'components/account/AccountPerpPositionTable' import HealthBar from 'components/account/Health/HealthBar' +import useBorrowMarketAssetsTableData from 'components/borrow/Table/useBorrowMarketAssetsTableData' import Accordion from 'components/common/Accordion' import Card from 'components/common/Card' import DisplayCurrency from 'components/common/DisplayCurrency' import { FormattedNumber } from 'components/common/FormattedNumber' import { ArrowRight } from 'components/common/Icons' import Text from 'components/common/Text' +import useLendingMarketAssetsTableData from 'components/earn/lend/Table/useLendingMarketAssetsTableData' import { DEFAULT_SETTINGS } from 'constants/defaultSettings' import { LocalStorageKeys } from 'constants/localStorageKeys' import { BN_ZERO } from 'constants/math' import { ORACLE_DENOM } from 'constants/oracle' import useAllAssets from 'hooks/assets/useAllAssets' import useLocalStorage from 'hooks/localStorage/useLocalStorage' -import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData' import useHealthComputer from 'hooks/useHealthComputer' -import useLendingMarketAssetsTableData from 'hooks/useLendingMarketAssetsTableData' import usePrices from 'hooks/usePrices' import useStore from 'store' import { BNCoin } from 'types/classes/BNCoin' @@ -38,7 +38,6 @@ export default function AccountSummary(props: Props) { const { data: prices } = usePrices() const assets = useAllAssets() const updatedAccount = useStore((s) => s.updatedAccount) - const chainConfig = useStore((s) => s.chainConfig) const accountBalance = useMemo( () => props.account @@ -104,7 +103,7 @@ export default function AccountSummary(props: Props) { renderSubTitle: () => <>, }, ] - if (chainConfig.perps) + if (props.account.perps.length > 0) itemsArray.push({ title: 'Perp Positions', renderContent: () => @@ -122,7 +121,6 @@ export default function AccountSummary(props: Props) { borrowAssetsData, lendingAssetsData, props.isHls, - chainConfig.perps, handleToggle, accountSummaryTabs, ]) diff --git a/src/components/borrow/Borrowings.tsx b/src/components/borrow/Borrowings.tsx index 9f896c3b..a30cc99e 100644 --- a/src/components/borrow/Borrowings.tsx +++ b/src/components/borrow/Borrowings.tsx @@ -1,8 +1,8 @@ import AvailableBorrowingsTable from 'components/borrow/Table/AvailableBorrowingsTable' import DepositedBorrowingsTable from 'components/borrow/Table/DepositedBorrowingsTable' +import useBorrowMarketAssetsTableData from 'components/borrow/Table/useBorrowMarketAssetsTableData' import { BN_ZERO } from 'constants/math' import useBorrowEnabledAssets from 'hooks/assets/useBorrowEnabledAssets' -import useBorrowMarketAssetsTableData from 'hooks/useBorrowMarketAssetsTableData' export default function Borrowings() { const data = useBorrowMarketAssetsTableData() @@ -30,10 +30,18 @@ function Fallback() { max: 0, liq: 0, }, - liquidity: null, - marketDepositAmount: BN_ZERO, + liquidity: BN_ZERO, marketLiquidityRate: 0, - marketLiquidityAmount: BN_ZERO, + cap: { + denom: asset.denom, + max: BN_ZERO, + used: BN_ZERO, + }, + debt: BN_ZERO, + borrowEnabled: true, + depositEnabled: true, + deposits: BN_ZERO, + accountDebt: BN_ZERO, })) return diff --git a/src/components/borrow/Table/Columns/Debt.tsx b/src/components/borrow/Table/Columns/Debt.tsx index ebf827b7..794822c6 100644 --- a/src/components/borrow/Table/Columns/Debt.tsx +++ b/src/components/borrow/Table/Columns/Debt.tsx @@ -16,15 +16,9 @@ export const debtSortingFn = ( ): number => { const assetA = a.original.asset const assetB = b.original.asset - if (!a.original.debt || !b.original.debt) return 0 - const assetAPrice = (a.original.liquidity?.value ?? BN_ZERO).div( - a.original.liquidity?.amount ?? BN_ZERO, - ) - const assetBPrice = (b.original.liquidity?.value ?? BN_ZERO).div( - b.original.liquidity?.amount ?? BN_ZERO, - ) - const debtA = a.original.debt.times(assetAPrice).shiftedBy(-assetA.decimals) - const debtB = b.original.debt.times(assetBPrice).shiftedBy(-assetB.decimals) + if (!a.original.accountDebt || !b.original.accountDebt) return 0 + const debtA = a.original.accountDebt.shiftedBy(-assetA.decimals) + const debtB = b.original.accountDebt.shiftedBy(-assetB.decimals) return debtA.minus(debtB).toNumber() } @@ -38,5 +32,5 @@ export default function Debt(props: Props) { if (!asset) return null - return + return } diff --git a/src/components/borrow/Table/Columns/Liquidity.tsx b/src/components/borrow/Table/Columns/Liquidity.tsx index 78353068..c2202edc 100644 --- a/src/components/borrow/Table/Columns/Liquidity.tsx +++ b/src/components/borrow/Table/Columns/Liquidity.tsx @@ -19,8 +19,8 @@ export const liquiditySortingFn = ( ): number => { const assetA = a.original.asset const assetB = b.original.asset - const liquidityA = demagnify(a.original.liquidity?.amount ?? 0, assetA) - const liquidityB = demagnify(b.original.liquidity?.amount ?? 0, assetB) + const liquidityA = demagnify(a.original.liquidity ?? 0, assetA) + const liquidityB = demagnify(b.original.liquidity ?? 0, assetB) return liquidityA - liquidityB } @@ -35,9 +35,9 @@ export default function Liquidity(props: Props) { if (!asset) return null - if (liquidity === null) { + if (liquidity.isZero()) { return } - return + return } diff --git a/src/components/borrow/Table/useBorrowMarketAssetsTableData.ts b/src/components/borrow/Table/useBorrowMarketAssetsTableData.ts new file mode 100644 index 00000000..d5650cc2 --- /dev/null +++ b/src/components/borrow/Table/useBorrowMarketAssetsTableData.ts @@ -0,0 +1,38 @@ +import { useMemo } from 'react' + +import useCurrentAccount from 'hooks/accounts/useCurrentAccount' +import useMarkets from 'hooks/markets/useMarkets' + +export default function useBorrowMarketAssetsTableData() { + const account = useCurrentAccount() + const markets = useMarkets() + + return useMemo((): { + accountBorrowedAssets: BorrowMarketTableData[] + availableAssets: BorrowMarketTableData[] + allAssets: BorrowMarketTableData[] + } => { + const accountBorrowedAssets: BorrowMarketTableData[] = [], + availableAssets: BorrowMarketTableData[] = [] + + markets + .filter((market) => market.borrowEnabled) + .forEach((market) => { + const debt = account?.debts?.find((debt) => debt.denom === market.asset.denom) + + const borrowMarketAsset: BorrowMarketTableData = { + ...market, + accountDebt: debt?.amount, + } + ;(borrowMarketAsset.accountDebt ? accountBorrowedAssets : availableAssets).push( + borrowMarketAsset, + ) + }) + + return { + accountBorrowedAssets, + availableAssets, + allAssets: [...accountBorrowedAssets, ...availableAssets], + } + }, [account?.debts, markets]) +} diff --git a/src/components/common/AvailableLiquidityMessage.tsx b/src/components/common/AvailableLiquidityMessage.tsx index 78c891e4..2b55af87 100644 --- a/src/components/common/AvailableLiquidityMessage.tsx +++ b/src/components/common/AvailableLiquidityMessage.tsx @@ -2,28 +2,27 @@ import { FormattedNumber } from 'components/common/FormattedNumber' import Text from 'components/common/Text' interface Props { - availableLiquidity: BigNumber - asset: BorrowAsset + market: Market } export default function AvailableLiquidityMessage(props: Props) { - const { availableLiquidity, asset } = props + const { market } = props return (
Not enough Liquidty! - {`This transaction would exceed the amount of ${asset.symbol} currently available for borrowing on Mars.`} + {`This transaction would exceed the amount of ${market.asset.symbol} currently available for borrowing on Mars.`}
Available Liquidity: diff --git a/src/components/common/DisplayCurrency.tsx b/src/components/common/DisplayCurrency.tsx index d2b43796..e356dafd 100644 --- a/src/components/common/DisplayCurrency.tsx +++ b/src/components/common/DisplayCurrency.tsx @@ -63,8 +63,8 @@ export default function DisplayCurrency(props: Props) { ? amount > 0 ? '+' : amount < 0 - ? '-' - : '' + ? '-' + : '' : '' const approximationPrefix = isApproximation ? '~ ' : '' const smallerThanPrefix = isLessThanACent && !showZero ? '< ' : '' diff --git a/src/components/common/MarketDetails.tsx b/src/components/common/MarketDetails.tsx index 269e2a70..545c3492 100644 --- a/src/components/common/MarketDetails.tsx +++ b/src/components/common/MarketDetails.tsx @@ -23,9 +23,7 @@ export default function MarketDetails({ row, type }: Props) { symbol: displayCurrencySymbol, } = useDisplayCurrencyPrice() - const { asset, ltv, marketDepositAmount, marketLiquidityAmount } = row.original - - const totalBorrowed = marketDepositAmount.minus(marketLiquidityAmount) + const { asset, ltv, cap, liquidity, deposits, debt } = row.original const details: Detail[] = useMemo(() => { const isDollar = displayCurrencySymbol === '$' @@ -33,7 +31,7 @@ export default function MarketDetails({ row, type }: Props) { function getLendingMarketDetails() { return [ { - amount: convertAmount(asset, marketDepositAmount).toNumber(), + amount: convertAmount(asset, deposits).toNumber(), options: { abbreviated: true, suffix: isDollar ? undefined : ` ${displayCurrencySymbol}`, @@ -62,9 +60,7 @@ export default function MarketDetails({ row, type }: Props) { title: 'Oracle Price', }, { - amount: totalBorrowed.isZero() - ? 0 - : totalBorrowed.dividedBy(marketDepositAmount).multipliedBy(100).toNumber(), + amount: debt.isZero() ? 0 : debt.dividedBy(deposits).multipliedBy(100).toNumber(), // TODO: Check if this number is still correct options: { minDecimals: 2, maxDecimals: 2, suffix: '%' }, title: 'Utilization Rate', }, @@ -74,7 +70,7 @@ export default function MarketDetails({ row, type }: Props) { function getBorrowMarketDetails() { return [ { - amount: convertAmount(asset, totalBorrowed).toNumber(), + amount: convertAmount(asset, debt).toNumber(), options: { abbreviated: true, suffix: isDollar ? undefined : ` ${displayCurrencySymbol}`, @@ -93,9 +89,7 @@ export default function MarketDetails({ row, type }: Props) { title: 'Oracle Price', }, { - amount: totalBorrowed.isZero() - ? 0 - : totalBorrowed.dividedBy(marketDepositAmount).multipliedBy(100).toNumber(), + amount: debt.isZero() ? 0 : debt.dividedBy(deposits).multipliedBy(100).toNumber(), // TODO: CHeck if this is still correct options: { minDecimals: 2, maxDecimals: 2, suffix: '%' }, title: 'Utilization Rate', }, @@ -105,14 +99,15 @@ export default function MarketDetails({ row, type }: Props) { if (type === 'lend') return getLendingMarketDetails() return getBorrowMarketDetails() }, [ - type, - asset, - marketDepositAmount, - ltv, - totalBorrowed, displayCurrencySymbol, + type, convertAmount, + asset, + debt, + ltv.max, + ltv.liq, getConversionRate, + deposits, ]) return ( diff --git a/src/components/common/Select/Option.tsx b/src/components/common/Select/Option.tsx index 89fe8e25..34cb5dc1 100644 --- a/src/components/common/Select/Option.tsx +++ b/src/components/common/Select/Option.tsx @@ -7,9 +7,8 @@ import { ChevronDown, ChevronRight } from 'components/common/Icons' import Text from 'components/common/Text' import { BN_ZERO } from 'constants/math' import useAsset from 'hooks/assets/useAsset' -import useMarketAssets from 'hooks/markets/useMarketAssets' +import useMarkets from 'hooks/markets/useMarkets' import { BNCoin } from 'types/classes/BNCoin' -import { byDenom } from 'utils/array' import { formatValue } from 'utils/formatters' interface Props extends SelectOption { @@ -22,7 +21,8 @@ interface Props extends SelectOption { export default function Option(props: Props) { const isCoin = !!props.denom - const { data: marketAssets } = useMarketAssets() + const markets = useMarkets() + const asset = useAsset(props.denom || '') function handleOnClick(value: string | undefined) { @@ -32,7 +32,7 @@ export default function Option(props: Props) { if (isCoin) { const balance = props.amount ?? BN_ZERO - const marketAsset = marketAssets.find(byDenom(props.denom || '')) + const marketAsset = markets.find((market) => market.asset.denom === props.denom) if (!asset || !marketAsset) return null diff --git a/src/components/common/Toaster/index.tsx b/src/components/common/Toaster/index.tsx index 9e27b26d..f83e80b7 100644 --- a/src/components/common/Toaster/index.tsx +++ b/src/components/common/Toaster/index.tsx @@ -15,6 +15,7 @@ import useTransactionStore from 'hooks/useTransactionStore' import useStore from 'store' import { formatAmountWithSymbol } from 'utils/formatters' import { BN } from 'utils/helpers' +import useChainConfig from 'hooks/useChainConfig' const toastBodyClasses = classNames( 'flex flex-wrap w-full group/transaction', @@ -60,7 +61,7 @@ export default function Toaster() { LocalStorageKeys.REDUCE_MOTION, DEFAULT_SETTINGS.reduceMotion, ) - const chainConfig = useStore((s) => s.chainConfig) + const chainConfig = useChainConfig() const toast = useStore((s) => s.toast) const { addTransaction } = useTransactionStore() diff --git a/src/components/common/TokenInput/index.tsx b/src/components/common/TokenInput/index.tsx index b88619b3..f1e50e5f 100644 --- a/src/components/common/TokenInput/index.tsx +++ b/src/components/common/TokenInput/index.tsx @@ -54,7 +54,7 @@ export default function TokenInput(props: Props) {
diff --git a/src/components/earn/farm/Vaults.tsx b/src/components/earn/farm/Vaults.tsx index be0a2d20..4374403c 100644 --- a/src/components/earn/farm/Vaults.tsx +++ b/src/components/earn/farm/Vaults.tsx @@ -5,17 +5,17 @@ import DepositedVaultsTable from 'components/earn/farm/Table/DepositedVaultsTabl import VaultUnlockBanner from 'components/earn/farm/VaultUnlockBanner' import { BN_ZERO } from 'constants/math' import useAccountId from 'hooks/useAccountId' +import useChainConfig from 'hooks/useChainConfig' import useDepositedVaults from 'hooks/useDepositedVaults' import useVaults from 'hooks/useVaults' -import useStore from 'store' import { VaultStatus } from 'types/enums/vault' function Content() { const accountId = useAccountId() const { data: vaults } = useVaults() const { data: depositedVaults } = useDepositedVaults(accountId || '') - - const vaultMetaData = useStore((s) => s.chainConfig.vaults) + const chainConfig = useChainConfig() + const vaultMetaData = chainConfig.vaults const { deposited, available } = useMemo(() => { return vaultMetaData.reduce( @@ -60,7 +60,8 @@ function Content() { } function Fallback() { - const vaults = useStore((s) => s.chainConfig.vaults) + const chainConfig = useChainConfig() + const vaults = chainConfig.vaults const mockVaults: Vault[] = vaults.map((vault) => ({ ...vault, apy: null, diff --git a/src/components/earn/lend/LendingActionButtons.tsx b/src/components/earn/lend/LendingActionButtons.tsx index 4fc28613..99923f0a 100644 --- a/src/components/earn/lend/LendingActionButtons.tsx +++ b/src/components/earn/lend/LendingActionButtons.tsx @@ -58,7 +58,7 @@ export default function LendingActionButtons(props: Props) { return (
- {accountLendValue && ( + {accountLendValue && accountLendValue.isGreaterThan(0) && (
)} - +
+ {!address && } + +
) : (
diff --git a/src/components/header/navigation/DesktopNavigation.tsx b/src/components/header/navigation/DesktopNavigation.tsx index f194e1d1..92fc1a47 100644 --- a/src/components/header/navigation/DesktopNavigation.tsx +++ b/src/components/header/navigation/DesktopNavigation.tsx @@ -3,10 +3,11 @@ import classNames from 'classnames' import { useMemo } from 'react' import Button from 'components/common/Button' -import { menuTree } from 'components/header/DesktopHeader' import { ChevronDown, Logo } from 'components/common/Icons' +import { menuTree } from 'components/header/DesktopHeader' import { NavLink } from 'components/header/navigation/NavLink' import { NavMenu } from 'components/header/navigation/NavMenu' +import useChainConfig from 'hooks/useChainConfig' import useToggle from 'hooks/useToggle' import useStore from 'store' import { WalletID } from 'types/enums/wallet' @@ -19,7 +20,7 @@ export function getIsActive(pages: string[]) { export default function DesktopNavigation() { const [showMenu, setShowMenu] = useToggle() const { recentWallet } = useShuttle() - const chainConfig = useStore((s) => s.chainConfig) + const chainConfig = useChainConfig() const walletId = (recentWallet?.providerId as WalletID) ?? WalletID.Keplr const focusComponent = useStore((s) => s.focusComponent) diff --git a/src/components/header/navigation/Routes.tsx b/src/components/header/navigation/Routes.tsx index 0794a61e..4c2eb851 100644 --- a/src/components/header/navigation/Routes.tsx +++ b/src/components/header/navigation/Routes.tsx @@ -1,6 +1,6 @@ import { Navigate, Outlet, Route, Routes as RoutesWrapper } from 'react-router-dom' -import Layout from 'pages/_layout' +import useChainConfig from 'hooks/useChainConfig' import BorrowPage from 'pages/BorrowPage' import ExecuteMessagePage from 'pages/ExecuteMessagePage' import FarmPage from 'pages/FarmPage' @@ -12,10 +12,10 @@ import PerpsPage from 'pages/PerpsPage' import PortfolioAccountPage from 'pages/PortfolioAccountPage' import PortfolioPage from 'pages/PortfolioPage' import TradePage from 'pages/TradePage' -import useStore from 'store' +import Layout from 'pages/_layout' export default function Routes() { - const chainConfig = useStore((s) => s.chainConfig) + const chainConfig = useChainConfig() return ( s.chainConfig.vaults) + const chainConfig = useChainConfig() + const vaults = chainConfig.vaults const mockVaults: Vault[] = vaults .filter((v) => v.isHls) .map((vault) => ({ diff --git a/src/components/hls/Farm/Table/Columns/APY.tsx b/src/components/hls/Farm/Table/Columns/APY.tsx index 0ccea4aa..7a98bd2e 100644 --- a/src/components/hls/Farm/Table/Columns/APY.tsx +++ b/src/components/hls/Farm/Table/Columns/APY.tsx @@ -2,7 +2,7 @@ import React from 'react' import { FormattedNumber } from 'components/common/FormattedNumber' import Loading from 'components/common/Loading' -import useMarketBorrowings from 'hooks/markets/useMarketBorrowings' +import useMarket from 'hooks/markets/useMarket' export const APY_META = { accessorKey: 'apy', header: 'APY Range' } @@ -12,10 +12,7 @@ interface Props { export default function Apy(props: Props) { const { vault } = props - const { data: marketBorrowings } = useMarketBorrowings() - - const borrowRate = marketBorrowings.find((asset) => asset.denom === vault.hls?.borrowDenom) - ?.borrowRate + const borrowRate = useMarket(vault.hls?.borrowDenom || '')?.apy.borrow if (vault.apy === null || borrowRate === null) return diff --git a/src/components/hls/Staking/HLSStakingIntro.tsx b/src/components/hls/Staking/HLSStakingIntro.tsx index 7b04bc54..e4e11601 100644 --- a/src/components/hls/Staking/HLSStakingIntro.tsx +++ b/src/components/hls/Staking/HLSStakingIntro.tsx @@ -20,7 +20,7 @@ export default function HLSStakingIntro() { leftIcon={} onClick={(e) => { e.preventDefault() - window.open(DocURL.FARM_INTRO_URL, '_blank') + window.open(DocURL.HLS_INTRO_URL, '_blank') }} color='secondary' /> diff --git a/src/components/hls/Staking/Table/Columns/ActiveApy.tsx b/src/components/hls/Staking/Table/Columns/ActiveApy.tsx index 0118c1e6..bec47e52 100644 --- a/src/components/hls/Staking/Table/Columns/ActiveApy.tsx +++ b/src/components/hls/Staking/Table/Columns/ActiveApy.tsx @@ -5,7 +5,7 @@ import { FormattedNumber } from 'components/common/FormattedNumber' import Loading from 'components/common/Loading' import TitleAndSubCell from 'components/common/TitleAndSubCell' import useAllAssets from 'hooks/assets/useAllAssets' -import useBorrowAsset from 'hooks/useBorrowAsset' +import useMarket from 'hooks/markets/useMarket' import usePrices from 'hooks/usePrices' import { calculateAccountLeverage } from 'utils/accounts' import { getLeveragedApy } from 'utils/math' @@ -27,7 +27,7 @@ interface Props { export default function ActiveAPY(props: Props) { const { data: prices } = usePrices() const assets = useAllAssets() - const borrowRate = useBorrowAsset(props.account.strategy.denoms.borrow)?.borrowRate + const borrowRate = useMarket(props.account.strategy.denoms.borrow)?.apy.borrow const leverage = useMemo( () => calculateAccountLeverage(props.account, prices, assets), diff --git a/src/components/hls/Staking/Table/Columns/ApyRange.tsx b/src/components/hls/Staking/Table/Columns/ApyRange.tsx index 6bc154b8..949a33ec 100644 --- a/src/components/hls/Staking/Table/Columns/ApyRange.tsx +++ b/src/components/hls/Staking/Table/Columns/ApyRange.tsx @@ -3,7 +3,7 @@ import { Row } from '@tanstack/react-table' import { FormattedNumber } from 'components/common/FormattedNumber' import Loading from 'components/common/Loading' import TitleAndSubCell from 'components/common/TitleAndSubCell' -import useBorrowAsset from 'hooks/useBorrowAsset' +import useMarket from 'hooks/markets/useMarket' import { getLeveragedApy } from 'utils/math' export const APY_RANGE_META = { header: 'APY range', accessorKey: 'apy' } @@ -19,7 +19,7 @@ interface Props { export default function ApyRange(props: Props) { const baseApy = props.strategy.apy - const borrowRate = useBorrowAsset(props.strategy.denoms.borrow)?.borrowRate + const borrowRate = useMarket(props.strategy.denoms.borrow)?.apy.borrow if (!borrowRate || props.isLoading || !baseApy) { return diff --git a/src/components/perps/BalancesTable/Columns/TradeDirection.tsx b/src/components/perps/BalancesTable/Columns/TradeDirection.tsx index 24223075..f2872036 100644 --- a/src/components/perps/BalancesTable/Columns/TradeDirection.tsx +++ b/src/components/perps/BalancesTable/Columns/TradeDirection.tsx @@ -5,6 +5,7 @@ export const PERP_TYPE_META = { accessorKey: 'tradeDirection', header: 'Side' } type Props = { tradeDirection: TradeDirection className?: string + directionChange?: boolean } export default function TradeDirection(props: Props) { diff --git a/src/components/perps/Module/PerpsManageModule/index.tsx b/src/components/perps/Module/PerpsManageModule/index.tsx index 0712df18..b1cbb2d8 100644 --- a/src/components/perps/Module/PerpsManageModule/index.tsx +++ b/src/components/perps/Module/PerpsManageModule/index.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames' -import { useState } from 'react' +import debounce from 'lodash.debounce' +import { useEffect, useMemo, useState } from 'react' import { Cross } from 'components/common/Icons' import LeverageSlider from 'components/common/LeverageSlider' @@ -11,12 +12,16 @@ import { Or } from 'components/perps/Module/Or' import usePerpsManageModule from 'components/perps/Module/PerpsManageModule/usePerpsManageModule' import PerpsSummary from 'components/perps/Module/Summary' import AssetAmountInput from 'components/trade/TradeModule/SwapForm/AssetAmountInput' +import useCurrentAccount from 'hooks/accounts/useCurrentAccount' +import { useUpdatedAccount } from 'hooks/useUpdatedAccount' +import getPerpsPosition from 'utils/getPerpsPosition' import { BN } from 'utils/helpers' export function PerpsManageModule() { const [tradeDirection, setTradeDirection] = useState(null) const [amount, setAmount] = useState(null) - + const account = useCurrentAccount() + const { simulatePerps, addedPerps } = useUpdatedAccount(account) const { closeManagePerpModule, previousAmount, @@ -26,6 +31,36 @@ export function PerpsManageModule() { asset, } = usePerpsManageModule(amount) + const debouncedUpdateAccount = useMemo( + () => + debounce((perpsPosition: PerpsPosition) => { + if ( + addedPerps && + perpsPosition.amount === addedPerps.amount && + perpsPosition.tradeDirection === addedPerps.tradeDirection + ) + return + simulatePerps(perpsPosition) + }, 100), + [simulatePerps, addedPerps], + ) + + useEffect(() => { + const perpsPosition = getPerpsPosition( + asset, + amount ?? previousAmount, + tradeDirection ?? previousTradeDirection, + ) + debouncedUpdateAccount(perpsPosition) + }, [ + debouncedUpdateAccount, + asset, + amount, + previousAmount, + tradeDirection, + previousTradeDirection, + ]) + if (!asset) return null return ( @@ -47,7 +82,7 @@ export function PerpsManageModule() { /> ('long') const { perpsAsset } = usePerpsAsset() const [leverage, setLeverage] = useState(1) - + const account = useCurrentAccount() + const { simulatePerps, addedPerps } = useUpdatedAccount(account) const [amount, setAmount] = useState(BN_ZERO) + const debouncedUpdateAccount = useMemo( + () => + debounce((perpsPosition: PerpsPosition) => { + if ( + addedPerps && + perpsPosition.amount === addedPerps.amount && + perpsPosition.tradeDirection === addedPerps.tradeDirection + ) + return + simulatePerps(perpsPosition) + }, 100), + [simulatePerps, addedPerps], + ) + + useEffect(() => { + const perpsPosition = getPerpsPosition(perpsAsset, amount, tradeDirection) + debouncedUpdateAccount(perpsPosition) + }, [debouncedUpdateAccount, amount, perpsAsset, tradeDirection]) + if (!perpsAsset) return null return ( } - className='mb-4 h-full' + className='h-full mb-4' > s.chainConfig.assets[0].denom) + const chainConfig = useChainConfig() + const baseDenom = chainConfig.assets[0].denom const { assets, type, isOpen, toggleOpen, onChangeAsset } = props const account = useCurrentAccount() - const { data: marketAssets } = useMarketAssets() - const { data: marketDeposits } = useMarketDeposits() + const markets = useMarkets() const { data: prices } = usePrices() const marketEnabledAssets = useMarketEnabledAssets() const balances = useMemo(() => { @@ -36,8 +35,8 @@ export default function AssetList(props: Props) { }, [account, marketEnabledAssets]) const sortedAssets = useMemo( - () => sortAssetsOrPairs(assets, prices, marketDeposits, balances, baseDenom) as Asset[], - [assets, prices, marketDeposits, balances, baseDenom], + () => sortAssetsOrPairs(assets, prices, markets, balances, baseDenom) as Asset[], + [assets, prices, markets, balances, baseDenom], ) return ( @@ -63,9 +62,7 @@ export default function AssetList(props: Props) { balances={balances} key={`${type}-${asset.symbol}`} onSelect={props.onChangeAsset} - depositCap={ - type === 'buy' ? marketAssets?.find(byDenom(asset.denom))?.cap : undefined - } + depositCap={type === 'buy' ? markets?.find(byDenom(asset.denom))?.cap : undefined} asset={asset} /> ))} diff --git a/src/components/trade/TradeModule/AssetSelector/PairsList.tsx b/src/components/trade/TradeModule/AssetSelector/PairsList.tsx index ea738b40..b5a9399f 100644 --- a/src/components/trade/TradeModule/AssetSelector/PairsList.tsx +++ b/src/components/trade/TradeModule/AssetSelector/PairsList.tsx @@ -5,8 +5,7 @@ import AssetSelectorItem from 'components/trade/TradeModule/AssetSelector/AssetS import useCurrentAccount from 'hooks/accounts/useCurrentAccount' import useBaseAsset from 'hooks/assets/useBasetAsset' import useMarketEnabledAssets from 'hooks/assets/useMarketEnabledAssets' -import useMarketAssets from 'hooks/markets/useMarketAssets' -import useMarketDeposits from 'hooks/markets/useMarketDeposits' +import useMarkets from 'hooks/markets/useMarkets' import usePrices from 'hooks/usePrices' import { getMergedBalancesForAsset } from 'utils/accounts' import { byDenom } from 'utils/array' @@ -22,8 +21,7 @@ interface Props { export default function PairsList(props: Props) { const account = useCurrentAccount() - const { data: marketAssets } = useMarketAssets() - const { data: marketDeposits } = useMarketDeposits() + const markets = useMarkets() const { data: prices } = usePrices() const baseDenom = useBaseAsset().denom const marketEnabledAssets = useMarketEnabledAssets() @@ -44,8 +42,8 @@ export default function PairsList(props: Props) { }, [props.stables, props.assets]) const sortedPairs = useMemo( - () => sortAssetsOrPairs(pairs, prices, marketDeposits, balances, baseDenom) as AssetPair[], - [pairs, prices, marketDeposits, balances, baseDenom], + () => sortAssetsOrPairs(pairs, prices, markets, balances, baseDenom) as AssetPair[], + [pairs, prices, markets, balances, baseDenom], ) return ( @@ -62,7 +60,7 @@ export default function PairsList(props: Props) { balances={balances} key={`${assetPair.buy.symbol}-${assetPair.sell.symbol}`} onSelect={props.onChangeAssetPair} - depositCap={marketAssets?.find(byDenom(assetPair.buy.denom))?.cap} + depositCap={markets?.find(byDenom(assetPair.buy.denom))?.cap} asset={assetPair.buy} sellAsset={assetPair.sell} /> diff --git a/src/components/trade/TradeModule/SwapForm/TradeSummary.tsx b/src/components/trade/TradeModule/SwapForm/TradeSummary.tsx index 247cf1dc..117d2d5c 100644 --- a/src/components/trade/TradeModule/SwapForm/TradeSummary.tsx +++ b/src/components/trade/TradeModule/SwapForm/TradeSummary.tsx @@ -1,5 +1,5 @@ import classNames from 'classnames' -import React, { useMemo } from 'react' +import { useMemo } from 'react' import ActionButton from 'components/common/Button/ActionButton' import { CircularProgress } from 'components/common/CircularProgress' @@ -108,7 +108,7 @@ export default function TradeSummary(props: Props) { )}
diff --git a/src/components/trade/TradeModule/SwapForm/index.tsx b/src/components/trade/TradeModule/SwapForm/index.tsx index 5e97ac61..e6c70ebe 100644 --- a/src/components/trade/TradeModule/SwapForm/index.tsx +++ b/src/components/trade/TradeModule/SwapForm/index.tsx @@ -22,8 +22,7 @@ import { BN_ZERO } from 'constants/math' import useCurrentAccount from 'hooks/accounts/useCurrentAccount' import useMarketEnabledAssets from 'hooks/assets/useMarketEnabledAssets' import useLocalStorage from 'hooks/localStorage/useLocalStorage' -import useMarketAssets from 'hooks/markets/useMarketAssets' -import useMarketBorrowings from 'hooks/markets/useMarketBorrowings' +import useMarkets from 'hooks/markets/useMarkets' import useAutoLend from 'hooks/useAutoLend' import useChainConfig from 'hooks/useChainConfig' import useHealthComputer from 'hooks/useHealthComputer' @@ -53,8 +52,7 @@ export default function SwapForm(props: Props) { const [slippage] = useLocalStorage(LocalStorageKeys.SLIPPAGE, DEFAULT_SETTINGS.slippage) const { computeMaxSwapAmount } = useHealthComputer(account) const [tradeDirection, setTradeDirection] = useState('long') - const { data: borrowAssets } = useMarketBorrowings() - const { data: marketAssets } = useMarketAssets() + const markets = useMarkets() const [inputAsset, outputAsset] = useMemo(() => { if (isAdvanced) return [sellAsset, buyAsset] @@ -65,7 +63,8 @@ export default function SwapForm(props: Props) { inputAsset.denom, outputAsset.denom, ) - const isBorrowEnabled = !!marketAssets.find(byDenom(inputAsset.denom))?.borrowEnabled + const isBorrowEnabled = !!markets.find((market) => market.asset.denom === inputAsset.denom) + ?.borrowEnabled const isRepayable = !!account?.debts.find(byDenom(outputAsset.denom)) const [isMarginChecked, setMarginChecked] = useToggle(isBorrowEnabled ? useMargin : false) const [isAutoRepayChecked, setAutoRepayChecked] = useToggle( @@ -87,7 +86,7 @@ export default function SwapForm(props: Props) { const assets = useMarketEnabledAssets() const depositCapReachedCoins: BNCoin[] = useMemo(() => { - const outputMarketAsset = marketAssets.find(byDenom(outputAsset.denom)) + const outputMarketAsset = markets.find((market) => market.asset.denom === outputAsset.denom) if (!outputMarketAsset) return [] @@ -97,7 +96,7 @@ export default function SwapForm(props: Props) { } return [] - }, [marketAssets, outputAsset.denom, outputAssetAmount]) + }, [markets, outputAsset.denom, outputAssetAmount]) const onChangeInputAmount = useCallback( (amount: BigNumber) => { @@ -305,9 +304,9 @@ export default function SwapForm(props: Props) { modal, ]) - const borrowAsset = useMemo( - () => borrowAssets.find(byDenom(inputAsset.denom)), - [borrowAssets, inputAsset.denom], + const borrowMarket = useMemo( + () => markets.find((market) => market.asset.denom === inputAsset.denom), + [markets, inputAsset.denom], ) useEffect(() => { @@ -324,8 +323,8 @@ export default function SwapForm(props: Props) { ) const availableLiquidity = useMemo( - () => borrowAsset?.liquidity?.amount ?? BN_ZERO, - [borrowAsset?.liquidity?.amount], + () => borrowMarket?.liquidity ?? BN_ZERO, + [borrowMarket?.liquidity], ) const isSwapDisabled = useMemo( @@ -349,7 +348,7 @@ export default function SwapForm(props: Props) { @@ -411,11 +410,8 @@ export default function SwapForm(props: Props) { className='p-4 bg-white/5' /> - {borrowAsset && borrowAmount.isGreaterThanOrEqualTo(availableLiquidity) && ( - + {borrowMarket && borrowAmount.isGreaterThanOrEqualTo(availableLiquidity) && ( + )} {isAdvanced ? ( getAccountIds(chainConfig, address).then((accountIdsAndKinds) => { if (noHls) { diff --git a/src/hooks/accounts/useAccounts.tsx b/src/hooks/accounts/useAccounts.tsx index 21027704..c1d6cc48 100644 --- a/src/hooks/accounts/useAccounts.tsx +++ b/src/hooks/accounts/useAccounts.tsx @@ -8,7 +8,7 @@ export default function useAccounts(kind: AccountKind, address?: string, suspens const chainConfig = useChainConfig() return useSWR( - `chains/${chainConfig.id}/accounts/${kind}`, + address && `chains/${chainConfig.id}/accounts/${kind}`, () => getAccounts(kind, chainConfig, address), { suspense: suspense, diff --git a/src/hooks/assets/useAllAssets.ts b/src/hooks/assets/useAllAssets.ts index f50e50cc..7844a5c8 100644 --- a/src/hooks/assets/useAllAssets.ts +++ b/src/hooks/assets/useAllAssets.ts @@ -1,5 +1,6 @@ -import useStore from 'store' +import useChainConfig from 'hooks/useChainConfig' export default function useAllAssets() { - return useStore((s) => s.chainConfig.assets) + const chainConfig = useChainConfig() + return chainConfig.assets } diff --git a/src/hooks/assets/useBasetAsset.ts b/src/hooks/assets/useBasetAsset.ts index 01b2a270..83176cc3 100644 --- a/src/hooks/assets/useBasetAsset.ts +++ b/src/hooks/assets/useBasetAsset.ts @@ -1,7 +1,8 @@ -import useStore from 'store' +import useChainConfig from 'hooks/useChainConfig' export default function useBaseAsset() { - const assets = useStore((s) => s.chainConfig.assets) + const chainConfig = useChainConfig() + const assets = chainConfig.assets return assets[0] } diff --git a/src/hooks/assets/useBorrowEnabledAssets.ts b/src/hooks/assets/useBorrowEnabledAssets.ts index 8d6fd680..18474b0c 100644 --- a/src/hooks/assets/useBorrowEnabledAssets.ts +++ b/src/hooks/assets/useBorrowEnabledAssets.ts @@ -1,7 +1,7 @@ -import useStore from 'store' +import useAllAssets from 'hooks/assets/useAllAssets' export default function useBorrowEnabledAssets() { - const assets = useStore((s) => s.chainConfig.assets) + const assets = useAllAssets() return assets.filter((asset) => asset.isBorrowEnabled) } diff --git a/src/hooks/assets/useDisplayCurrencyAssets.ts b/src/hooks/assets/useDisplayCurrencyAssets.ts index c3eb2a90..f57bd87b 100644 --- a/src/hooks/assets/useDisplayCurrencyAssets.ts +++ b/src/hooks/assets/useDisplayCurrencyAssets.ts @@ -1,7 +1,7 @@ -import useStore from 'store' +import useAllAssets from 'hooks/assets/useAllAssets' export default function useDisplayCurrencyAssets() { - const assets = useStore((s) => s.chainConfig.assets) + const assets = useAllAssets() return assets.filter((asset) => asset.isDisplayCurrency) } diff --git a/src/hooks/assets/useMarketEnabledAssets.ts b/src/hooks/assets/useMarketEnabledAssets.ts index 152bd05b..971776b3 100644 --- a/src/hooks/assets/useMarketEnabledAssets.ts +++ b/src/hooks/assets/useMarketEnabledAssets.ts @@ -1,8 +1,8 @@ import { useMemo } from 'react' -import useStore from 'store' +import useAllAssets from 'hooks/assets/useAllAssets' export default function useMarketEnabledAssets() { - const assets = useStore((s) => s.chainConfig.assets) + const assets = useAllAssets() return useMemo(() => assets.filter((asset) => asset.isEnabled && asset.isMarket), [assets]) } diff --git a/src/hooks/assets/usePerpsEnabledAssets.ts b/src/hooks/assets/usePerpsEnabledAssets.ts index 984c8c9f..1f2f793a 100644 --- a/src/hooks/assets/usePerpsEnabledAssets.ts +++ b/src/hooks/assets/usePerpsEnabledAssets.ts @@ -1,7 +1,7 @@ -import useStore from 'store' +import useAllAssets from 'hooks/assets/useAllAssets' export default function usePerpsEnabledAssets() { - const assets = useStore((s) => s.chainConfig.assets) + const assets = useAllAssets() return assets.filter((asset) => asset.isPerpsEnabled) } diff --git a/src/hooks/markets/useMarket.ts b/src/hooks/markets/useMarket.ts new file mode 100644 index 00000000..6b2f4c50 --- /dev/null +++ b/src/hooks/markets/useMarket.ts @@ -0,0 +1,9 @@ +import { useMemo } from 'react' + +import useMarkets from 'hooks/markets/useMarkets' + +export default function useMarket(denom: string) { + const markets = useMarkets() + + return useMemo(() => markets.find((market) => market.asset.denom === denom), [denom, markets]) +} diff --git a/src/hooks/markets/useMarketAssets.ts b/src/hooks/markets/useMarketAssets.ts deleted file mode 100644 index ec4d24f8..00000000 --- a/src/hooks/markets/useMarketAssets.ts +++ /dev/null @@ -1,14 +0,0 @@ -import useSWR from 'swr' - -import getMarkets from 'api/markets/getMarkets' -import useChainConfig from 'hooks/useChainConfig' - -export default function useMarketAssets() { - const chainConfig = useChainConfig() - return useSWR(`chains/${chainConfig.id}/markets`, () => getMarkets(chainConfig), { - suspense: true, - fallbackData: [], - revalidateOnFocus: false, - keepPreviousData: false, - }) -} diff --git a/src/hooks/markets/useMarketBorrowings.tsx b/src/hooks/markets/useMarketBorrowings.tsx deleted file mode 100644 index 40f33a69..00000000 --- a/src/hooks/markets/useMarketBorrowings.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import useSWR from 'swr' - -import getMarketBorrowings from 'api/markets/getMarketBorrowings' -import useChainConfig from 'hooks/useChainConfig' - -export default function useMarketBorrowings() { - const chainConfig = useChainConfig() - return useSWR( - `chains/${chainConfig.id}/markets/borrowings`, - () => getMarketBorrowings(chainConfig), - { - fallbackData: [], - suspense: false, - revalidateOnFocus: false, - }, - ) -} diff --git a/src/hooks/markets/useMarketDepositCaps.ts b/src/hooks/markets/useMarketDepositCaps.ts new file mode 100644 index 00000000..79790ced --- /dev/null +++ b/src/hooks/markets/useMarketDepositCaps.ts @@ -0,0 +1,26 @@ +import useSWR from 'swr' + +import useMarketEnabledAssets from 'hooks/assets/useMarketEnabledAssets' +import useChainConfig from 'hooks/useChainConfig' +import useClients from 'hooks/useClients' + +export default function useMarketDepositCaps() { + const chainConfig = useChainConfig() + const clients = useClients() + const assets = useMarketEnabledAssets() + + return useSWR( + assets.length > 0 && clients && `chains/${chainConfig.id}/markets/depositCap`, + () => getMarketsDepositCap(clients!, assets), + { + revalidateOnFocus: false, + revalidateOnReconnect: false, + revalidateIfStale: false, + }, + ) +} + +async function getMarketsDepositCap(clients: ContractClients, assets: Asset[]) { + const capQueries = assets.map((asset) => clients.params.totalDeposit({ denom: asset.denom })) + return Promise.all(capQueries) +} diff --git a/src/hooks/markets/useMarketDeposits.ts b/src/hooks/markets/useMarketDeposits.ts deleted file mode 100644 index 16f62730..00000000 --- a/src/hooks/markets/useMarketDeposits.ts +++ /dev/null @@ -1,13 +0,0 @@ -import useSWR from 'swr' - -import getMarketDeposits from 'api/markets/getMarketDeposits' -import useChainConfig from 'hooks/useChainConfig' - -export default function useMarketDeposits() { - const chainConfig = useChainConfig() - return useSWR(`chains/${chainConfig.id}/markets/deposits`, () => getMarketDeposits(chainConfig), { - suspense: true, - fallbackData: [], - revalidateOnFocus: false, - }) -} diff --git a/src/hooks/markets/useMarketLiquidities.ts b/src/hooks/markets/useMarketLiquidities.ts deleted file mode 100644 index db6a4f50..00000000 --- a/src/hooks/markets/useMarketLiquidities.ts +++ /dev/null @@ -1,17 +0,0 @@ -import useSWR from 'swr' - -import getMarketLiquidities from 'api/markets/getMarketLiquidities' -import useChainConfig from 'hooks/useChainConfig' - -export default function useMarketLiquidities() { - const chainConfig = useChainConfig() - return useSWR( - `chains/${chainConfig.id}/markets/liquidities`, - () => getMarketLiquidities(chainConfig), - { - suspense: true, - fallbackData: [], - revalidateOnFocus: false, - }, - ) -} diff --git a/src/hooks/markets/useMarkets.ts b/src/hooks/markets/useMarkets.ts new file mode 100644 index 00000000..3e9dd0fc --- /dev/null +++ b/src/hooks/markets/useMarkets.ts @@ -0,0 +1,44 @@ +import useSWR from 'swr' + +import useMarketDepositCaps from 'hooks/markets/useMarketDepositCaps' +import useMarketsInfo from 'hooks/markets/useMarketsInfo' +import useAssetParams from 'hooks/params/useAssetParams' +import useAssets from 'hooks/useAssets' +import useChainConfig from 'hooks/useChainConfig' +import { + AssetParamsBaseForAddr as AssetParams, + TotalDepositResponse, +} from 'types/generated/mars-params/MarsParams.types' +import { Market as RedBankMarket } from 'types/generated/mars-red-bank/MarsRedBank.types' +import { byDenom } from 'utils/array' +import { resolveMarketResponse } from 'utils/resolvers' + +export default function useMarkets() { + const chainConfig = useChainConfig() + const { data: marketInfos } = useMarketsInfo() + const { data: marketDepositCaps } = useMarketDepositCaps() + const { data: assetParams } = useAssetParams() + const assets = useAssets() + + const result = useSWR( + !!marketInfos?.length && + !!marketDepositCaps?.length && + !!assetParams.length && + `chains/${chainConfig.id}/markets`, + () => { + return assets.map((asset) => + resolveMarketResponse( + asset, + marketInfos!.find(byDenom(asset.denom)) as RedBankMarket & Partial, + assetParams.find(byDenom(asset.denom)) as AssetParams, + marketDepositCaps!.find(byDenom(asset.denom)) as TotalDepositResponse, + ), + ) + }, + { + fallbackData: [], + }, + ) + + return result.data +} diff --git a/src/hooks/markets/useMarketsInfo.ts b/src/hooks/markets/useMarketsInfo.ts new file mode 100644 index 00000000..b83e836e --- /dev/null +++ b/src/hooks/markets/useMarketsInfo.ts @@ -0,0 +1,47 @@ +import useSWR from 'swr' + +import useChainConfig from 'hooks/useChainConfig' +import useClients from 'hooks/useClients' +import { BN } from 'utils/helpers' +import iterateContractQuery from 'utils/iterateContractQuery' + +export default function useMarketsInfo() { + const chainConfig = useChainConfig() + const clients = useClients() + return useSWR( + clients && `chains/${chainConfig.id}/markets/info`, + () => getMarketsInfo(clients!), + { + revalidateOnFocus: false, + revalidateOnReconnect: false, + revalidateIfStale: false, + }, + ) +} + +async function getMarketsInfo(clients: ContractClients) { + const markets = await iterateContractQuery(clients.redBank.markets) + + const debts$ = markets.map((market) => + clients.redBank.underlyingDebtAmount({ + denom: market.denom, + amountScaled: market.debt_total_scaled, + }), + ) + + const liquidities$ = markets.map((market) => + clients.redBank.underlyingLiquidityAmount({ + denom: market.denom, + amountScaled: market.collateral_total_scaled, + }), + ) + + const [debts, liquidity] = await Promise.all([Promise.all(debts$), Promise.all(liquidities$)]) + + return markets.map((market, index) => ({ + ...market, + debt: BN(debts[index]), + deposits: BN(liquidity[index]), + liquidity: BN(liquidity[index]).minus(debts[index]), + })) +} diff --git a/src/hooks/perps/useOpeningFee.ts b/src/hooks/perps/useOpeningFee.ts index 2499d19d..d81cd390 100644 --- a/src/hooks/perps/useOpeningFee.ts +++ b/src/hooks/perps/useOpeningFee.ts @@ -1,16 +1,20 @@ import BigNumber from 'bignumber.js' import useSWR from 'swr' -import getOpeningFee from 'api/perps/getOpeningFee' import useChainConfig from 'hooks/useChainConfig' +import useClients from 'hooks/useClients' import useDebounce from 'hooks/useDebounce' +import { BNCoin } from 'types/classes/BNCoin' export default function useOpeningFee(denom: string, amount: BigNumber) { const chainConfig = useChainConfig() const debouncedAmount = useDebounce(amount.toString(), 500) - const enabled = !amount.isZero() + const clients = useClients() + const enabled = !amount.isZero() && clients return useSWR(enabled && `${chainConfig.id}/perps/${denom}/openingFee/${debouncedAmount}`, () => - getOpeningFee(chainConfig, denom, amount.toString()), + clients!.perps + .openingFee({ denom, size: amount as any }) + .then((resp) => BNCoin.fromCoin(resp.fee)), ) } diff --git a/src/hooks/useAssetIncentiveApy.ts b/src/hooks/useAssetIncentiveApy.ts index 54329fa1..45851b4d 100644 --- a/src/hooks/useAssetIncentiveApy.ts +++ b/src/hooks/useAssetIncentiveApy.ts @@ -1,15 +1,82 @@ import useSWR from 'swr' -import calculateAssetIncentivesApy from 'api/incentives/calculateAssetIncentivesApy' +import { BN_ZERO } from 'constants/math' +import useAllAssets from 'hooks/assets/useAllAssets' +import useMarket from 'hooks/markets/useMarket' import useChainConfig from 'hooks/useChainConfig' +import useClients from 'hooks/useClients' +import usePrices from 'hooks/usePrices' +import { byDenom } from 'utils/array' +import { SECONDS_IN_A_YEAR } from 'utils/constants' +import { BN } from 'utils/helpers' export default function useAssetIncentivesApy(denom: string) { const chainConfig = useChainConfig() + const market = useMarket(denom) + const { data: prices } = usePrices() + const assets = useAllAssets() + const clients = useClients() + const enabled = !!market && !!prices.length && !!assets.length && !!clients + return useSWR( - `chains/${chainConfig.id}/assets/${denom}/incentives`, - () => calculateAssetIncentivesApy(chainConfig, denom), + enabled && `chains/${chainConfig.id}/assets/${denom}/incentives`, + () => calculateAssetIncentivesApy(clients!, assets, prices, market!), { revalidateOnFocus: false, }, ) } + +async function calculateAssetIncentivesApy( + clients: ContractClients, + assets: Asset[], + prices: BNCoin[], + market: Market, +) { + const totalActiveEmissionValue = await getTotalActiveEmissionValue( + clients, + assets, + prices, + market, + ) + + if (!totalActiveEmissionValue) return null + const price = prices.find(byDenom(market.asset.denom))?.amount ?? BN_ZERO + + const marketLiquidityValue = BN(market.deposits) + .shiftedBy(-market.asset.decimals) + .multipliedBy(price) + + const marketReturns = BN(market.apy.deposit).multipliedBy(marketLiquidityValue) + const annualEmission = totalActiveEmissionValue.multipliedBy(SECONDS_IN_A_YEAR) + + const totalAnnualReturnsValue = annualEmission.plus(marketReturns) + return totalAnnualReturnsValue.dividedBy(marketLiquidityValue).multipliedBy(100) +} + +async function getTotalActiveEmissionValue( + clients: ContractClients, + assets: Asset[], + prices: BNCoin[], + market: Market, +): Promise { + try { + const activeEmissions = await clients.incentives.activeEmissions({ + collateralDenom: market.asset.denom, + }) + + if (activeEmissions.length === 0) { + throw 'Asset has no active incentive emission.' + } + + return activeEmissions.reduce((accumulation, current, index) => { + const price = prices.find(byDenom(current.denom))?.amount ?? BN_ZERO + const decimals = assets.find(byDenom(current.denom))?.decimals as number + const emissionValue = BN(current.emission_rate).shiftedBy(-decimals).multipliedBy(price) + + return accumulation.plus(emissionValue) + }, BN_ZERO) + } catch (ex) { + return null + } +} diff --git a/src/hooks/useBorrowAsset.ts b/src/hooks/useBorrowAsset.ts deleted file mode 100644 index 99807ae8..00000000 --- a/src/hooks/useBorrowAsset.ts +++ /dev/null @@ -1,10 +0,0 @@ -import useMarketBorrowings from 'hooks/markets/useMarketBorrowings' -import { byDenom } from 'utils/array' - -export default function useBorrowAsset(denom: string) { - const { data: borrowAssets } = useMarketBorrowings() - - if (!borrowAssets.length) return null - - return borrowAssets.find(byDenom(denom)) -} diff --git a/src/hooks/useBorrowEnabledMarkets.ts b/src/hooks/useBorrowEnabledMarkets.ts deleted file mode 100644 index 450fafe6..00000000 --- a/src/hooks/useBorrowEnabledMarkets.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { useMemo } from 'react' - -import useMarketAssets from 'hooks/markets/useMarketAssets' - -export default function useBorrowEnabledMarkets() { - const { data: markets } = useMarketAssets() - return useMemo(() => markets.filter((market) => market.borrowEnabled), [markets]) -} diff --git a/src/hooks/useBorrowMarketAssetsTableData.ts b/src/hooks/useBorrowMarketAssetsTableData.ts deleted file mode 100644 index b22b4e36..00000000 --- a/src/hooks/useBorrowMarketAssetsTableData.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { useMemo } from 'react' - -import useCurrentAccount from 'hooks/accounts/useCurrentAccount' -import useAllAssets from 'hooks/assets/useAllAssets' -import useMarketBorrowings from 'hooks/markets/useMarketBorrowings' -import useMarketDeposits from 'hooks/markets/useMarketDeposits' -import useMarketLiquidities from 'hooks/markets/useMarketLiquidities' -import useBorrowEnabledMarkets from 'hooks/useBorrowEnabledMarkets' -import { byDenom } from 'utils/array' -import { BN } from 'utils/helpers' - -export default function useBorrowMarketAssetsTableData() { - const markets = useBorrowEnabledMarkets() - const account = useCurrentAccount() - const { data: borrowData } = useMarketBorrowings() - const { data: marketDeposits } = useMarketDeposits() - const { data: marketLiquidities } = useMarketLiquidities() - const assets = useAllAssets() - - return useMemo((): { - accountBorrowedAssets: BorrowMarketTableData[] - availableAssets: BorrowMarketTableData[] - allAssets: BorrowMarketTableData[] - } => { - const accountBorrowedAssets: BorrowMarketTableData[] = [], - availableAssets: BorrowMarketTableData[] = [] - - markets.forEach(({ denom, apy, ltv }) => { - const asset = assets.find(byDenom(denom)) as Asset - const borrow = borrowData.find((borrow) => borrow.denom === denom) - const marketDepositAmount = BN(marketDeposits.find(byDenom(denom))?.amount ?? 0) - const marketLiquidityAmount = BN(marketLiquidities.find(byDenom(denom))?.amount ?? 0) - - const debt = account?.debts?.find((debt) => debt.denom === denom) - if (!borrow) return - - const borrowMarketAsset: BorrowMarketTableData = { - ...borrow, - asset, - debt: debt?.amount, - marketDepositAmount, - marketLiquidityAmount, - apy, - ltv, - } - ;(borrowMarketAsset.debt ? accountBorrowedAssets : availableAssets).push(borrowMarketAsset) - }) - - return { - accountBorrowedAssets, - availableAssets, - allAssets: [...accountBorrowedAssets, ...availableAssets], - } - }, [account?.debts, assets, borrowData, marketDeposits, marketLiquidities, markets]) -} diff --git a/src/hooks/useClients.ts b/src/hooks/useClients.ts index 7f2e60e9..24b03dbb 100644 --- a/src/hooks/useClients.ts +++ b/src/hooks/useClients.ts @@ -2,6 +2,7 @@ import { CosmWasmClient } from '@cosmjs/cosmwasm-stargate' import useSWR from 'swr' import useChainConfig from 'hooks/useChainConfig' +import { ICNSQueryClient } from 'types/classes/ICNSClient.client' import { MarsAccountNftQueryClient } from 'types/generated/mars-account-nft/MarsAccountNft.client' import { MarsCreditManagerQueryClient } from 'types/generated/mars-credit-manager/MarsCreditManager.client' import { MarsIncentivesQueryClient } from 'types/generated/mars-incentives/MarsIncentives.client' @@ -31,9 +32,13 @@ export default function useClients() { swapper: new MarsSwapperOsmosisQueryClient(client, chainConfig.contracts.swapper), incentives: new MarsIncentivesQueryClient(client, chainConfig.contracts.incentives), perps: new MarsPerpsQueryClient(client, chainConfig.contracts.perps), + icns: new ICNSQueryClient(client), } as ContractClients }, { + revalidateOnFocus: false, + revalidateOnReconnect: false, + revalidateIfStale: false, keepPreviousData: false, }, ) diff --git a/src/hooks/useDepositEnabledMarkets.ts b/src/hooks/useDepositEnabledMarkets.ts deleted file mode 100644 index 5313d41b..00000000 --- a/src/hooks/useDepositEnabledMarkets.ts +++ /dev/null @@ -1,6 +0,0 @@ -import useMarketAssets from 'hooks/markets/useMarketAssets' - -export default function useDepositEnabledMarkets() { - const { data: markets } = useMarketAssets() - return markets.filter((market) => market.depositEnabled) -} diff --git a/src/hooks/useDisplayCurrencyPrice.ts b/src/hooks/useDisplayCurrencyPrice.ts index 17bf08bb..bf72328f 100644 --- a/src/hooks/useDisplayCurrencyPrice.ts +++ b/src/hooks/useDisplayCurrencyPrice.ts @@ -33,9 +33,12 @@ function useDisplayCurrencyPrice() { ) const convertAmount = useCallback( - (asset: Asset, amount: string | number | BigNumber) => - getConversionRate(asset.denom)?.multipliedBy(BN(amount).shiftedBy(-asset.decimals)) ?? - BN_ZERO, + (asset: Asset, amount: string | number | BigNumber) => { + return ( + getConversionRate(asset.denom)?.multipliedBy(BN(amount).shiftedBy(-asset.decimals)) ?? + BN_ZERO + ) + }, [getConversionRate], ) diff --git a/src/hooks/useHLSStakingAssets.ts b/src/hooks/useHLSStakingAssets.ts index ca57f47a..6493b0de 100644 --- a/src/hooks/useHLSStakingAssets.ts +++ b/src/hooks/useHLSStakingAssets.ts @@ -5,8 +5,12 @@ import useChainConfig from 'hooks/useChainConfig' export default function useHLSStakingAssets() { const chainConfig = useChainConfig() - return useSWR('hls-staking', () => getHLSStakingAssets(chainConfig), { - fallbackData: [], - revalidateOnFocus: false, - }) + return useSWR( + `chains/${chainConfig.id}/assets/hls/staking`, + () => getHLSStakingAssets(chainConfig), + { + fallbackData: [], + revalidateOnFocus: false, + }, + ) } diff --git a/src/hooks/useICNSDomain.tsx b/src/hooks/useICNSDomain.tsx index 7080edf2..30ce9dd0 100644 --- a/src/hooks/useICNSDomain.tsx +++ b/src/hooks/useICNSDomain.tsx @@ -1,12 +1,19 @@ import useSWR from 'swr' -import getICNS from 'api/wallets/getICNS' import useChainConfig from 'hooks/useChainConfig' +import useClients from 'hooks/useClients' +import { ChainInfoID } from 'types/enums/wallet' export default function useICNSDomain(address?: string) { const chainConfig = useChainConfig() + const clients = useClients() + const enabled = !!clients && chainConfig.id === ChainInfoID.Osmosis1 && address - return useSWR(`ICNS-${address}`, () => getICNS(chainConfig, address), { - revalidateOnFocus: false, - }) + return useSWR( + enabled && `chains/${chainConfig.id}/${address}/icns`, + () => clients!.icns.primaryName({ address: address! }), + { + revalidateOnFocus: false, + }, + ) } diff --git a/src/hooks/useUnclaimedRewards.tsx b/src/hooks/useUnclaimedRewards.tsx index ddf9f1cd..49d5f564 100644 --- a/src/hooks/useUnclaimedRewards.tsx +++ b/src/hooks/useUnclaimedRewards.tsx @@ -1,17 +1,21 @@ import useSWR from 'swr' -import getUnclaimedRewards from 'api/incentives/getUnclaimedRewards' import useAccountId from 'hooks/useAccountId' import useChainConfig from 'hooks/useChainConfig' +import useClients from 'hooks/useClients' import { BNCoin } from 'types/classes/BNCoin' +import iterateContractQuery from 'utils/iterateContractQuery' export default function useUserUnclaimedRewards() { const accountId = useAccountId() const chainConfig = useChainConfig() + const clients = useClients() + + const enabled = !!accountId && !!clients return useSWR( - `chains/${chainConfig.id}/accounts/${accountId}/unclaimed-rewards`, - () => getUnclaimedRewards(chainConfig, accountId ?? ''), + enabled && `chains/${chainConfig.id}/accounts/${accountId}/unclaimed-rewards`, + () => getUnclaimedRewards(clients!, accountId!), { fallbackData: [] as BNCoin[], isPaused: () => !accountId, @@ -19,3 +23,22 @@ export default function useUserUnclaimedRewards() { }, ) } + +async function getUnclaimedRewards(clients: ContractClients, accountId: string): Promise { + try { + const unclaimedRewards = await iterateContractQuery(() => + clients.incentives.userUnclaimedRewards({ + user: clients.creditManager.contractAddress, + accountId, + }), + ) + + if (unclaimedRewards.length === 0) return [] + + return await Promise.all( + unclaimedRewards.map((reward) => new BNCoin({ denom: reward.denom, amount: reward.amount })), + ) + } catch (ex) { + return [] + } +} diff --git a/src/hooks/useUpdatedAccount/functions.ts b/src/hooks/useUpdatedAccount/functions.ts index 5c7c9f0d..0e498b9e 100644 --- a/src/hooks/useUpdatedAccount/functions.ts +++ b/src/hooks/useUpdatedAccount/functions.ts @@ -36,6 +36,27 @@ export function removeCoins(coinsToRemove: BNCoin[], currentCoins: BNCoin[]) { return currentCoins } +export function updatePerpsPositions( + currentPositions: PerpsPosition[], + updatedPosition?: PerpsPosition, +): PerpsPosition[] { + if (!updatedPosition) { + return currentPositions ?? [] + } + const currentDenoms = currentPositions.map((position) => position.denom) + const index = currentDenoms.indexOf(updatedPosition.denom) + + if (index === -1) { + currentPositions.push(updatedPosition) + return currentPositions + } + + currentPositions[index].tradeDirection = updatedPosition.tradeDirection + currentPositions[index].amount = updatedPosition.amount + + return currentPositions +} + export function addValueToVaults( vaultValues: VaultValue[], vaults: DepositedVault[], diff --git a/src/hooks/useUpdatedAccount/index.ts b/src/hooks/useUpdatedAccount/index.ts index 1c44e492..519dd631 100644 --- a/src/hooks/useUpdatedAccount/index.ts +++ b/src/hooks/useUpdatedAccount/index.ts @@ -11,6 +11,7 @@ import { addValueToVaults, getDepositAndLendCoinsToSpend, removeCoins, + updatePerpsPositions, } from 'hooks/useUpdatedAccount/functions' import useVaults from 'hooks/useVaults' import useStore from 'store' @@ -43,6 +44,7 @@ export function useUpdatedAccount(account?: Account) { const [addedLends, addLends] = useState([]) const [removedLends, removeLends] = useState([]) const [addedTrades, addTrades] = useState([]) + const [addedPerps, addPerps] = useState() const [leverage, setLeverage] = useState(0) const removeDepositAndLendsByDenom = useCallback( @@ -241,6 +243,14 @@ export function useUpdatedAccount(account?: Account) { [account, assets, prices, slippage], ) + const simulatePerps = useCallback( + (position: PerpsPosition) => { + if (!account) return + addPerps(position) + }, + [account, addPerps], + ) + useEffect(() => { if (!account) return @@ -252,6 +262,7 @@ export function useUpdatedAccount(account?: Account) { [...accountCopy.vaults], availableVaults ?? [], ) + accountCopy.perps = updatePerpsPositions([...accountCopy.perps], addedPerps) accountCopy.deposits = removeCoins(removedDeposits, [...accountCopy.deposits]) accountCopy.debts = removeCoins(removedDebts, [...accountCopy.debts]) accountCopy.lends = addCoins(addedLends, [...accountCopy.lends]) @@ -274,6 +285,7 @@ export function useUpdatedAccount(account?: Account) { prices, addedTrades, assets, + addedPerps, ]) return { @@ -286,10 +298,12 @@ export function useUpdatedAccount(account?: Account) { addLends, removeLends, addVaultValues, + addPerps, addedDeposits, addedDebts, addedLends, addedTrades, + addedPerps, leverage, removedDeposits, removedDebts, @@ -303,5 +317,6 @@ export function useUpdatedAccount(account?: Account) { simulateTrade, simulateVaultDeposit, simulateWithdraw, + simulatePerps, } } diff --git a/src/hooks/useVault.tsx b/src/hooks/useVault.tsx index 528b63b5..9ff666e0 100644 --- a/src/hooks/useVault.tsx +++ b/src/hooks/useVault.tsx @@ -1,9 +1,9 @@ +import { useMemo } from 'react' + import useVaults from 'hooks/useVaults' export default function useVault(address: string) { const { data: vaults } = useVaults(false) - if (!vaults?.length) return null - - return vaults.find((v) => v.address === address) ?? null + return useMemo(() => vaults?.find((v) => v.address === address) ?? null, [vaults, address]) } diff --git a/src/hooks/useVaults.tsx b/src/hooks/useVaults.tsx index de85fc7b..31ed110b 100644 --- a/src/hooks/useVaults.tsx +++ b/src/hooks/useVaults.tsx @@ -6,8 +6,12 @@ import useChainConfig from 'hooks/useChainConfig' export default function useVaults(suspense: boolean = true, address?: string) { const chainConfig = useChainConfig() - return useSWR(`chains/${chainConfig.id}/vaults/${address}`, () => getVaults(chainConfig), { - suspense, - revalidateOnFocus: false, - }) + return useSWR( + address && `chains/${chainConfig.id}/vaults/${address}`, + () => getVaults(chainConfig), + { + suspense, + revalidateOnFocus: false, + }, + ) } diff --git a/src/hooks/useWalletBalances.tsx b/src/hooks/useWalletBalances.tsx index 952edc74..0a57a630 100644 --- a/src/hooks/useWalletBalances.tsx +++ b/src/hooks/useWalletBalances.tsx @@ -1,17 +1,29 @@ import useSWR from 'swr' -import getWalletBalances from 'api/wallets/getWalletBalances' import useChainConfig from 'hooks/useChainConfig' export default function useWalletBalances(address?: string) { const chainConfig = useChainConfig() return useSWR( - `chains/${chainConfig.id}/wallets/${address}/balances`, - () => getWalletBalances(chainConfig, address || ''), + address && `chains/${chainConfig.id}/wallets/${address}/balances`, + () => getWalletBalances(chainConfig, address!), { isPaused: () => !address, fallbackData: [], }, ) } + +async function getWalletBalances(chainConfig: ChainConfig, address: string): Promise { + const uri = '/cosmos/bank/v1beta1/balances/' + + const response = await fetch(`${chainConfig.endpoints.rest}${uri}${address}`) + + if (response.ok) { + const data = await response.json() + return data.balances + } + + return new Promise((_, reject) => reject('No data')) +} diff --git a/src/pages/LendPage.tsx b/src/pages/LendPage.tsx index 4cb0932e..81a15210 100644 --- a/src/pages/LendPage.tsx +++ b/src/pages/LendPage.tsx @@ -1,12 +1,12 @@ +import MigrationBanner from 'components/common/MigrationBanner' +import Tab from 'components/earn/Tab' import LendIntro from 'components/earn/lend/LendIntro' import Lends from 'components/earn/lend/Lends' -import Tab from 'components/earn/Tab' -import MigrationBanner from 'components/common/MigrationBanner' import { EARN_TABS } from 'constants/pages' -import useStore from 'store' +import useChainConfig from 'hooks/useChainConfig' export default function LendPage() { - const chainConfig = useStore((s) => s.chainConfig) + const chainConfig = useChainConfig() return (
diff --git a/src/pages/PortfolioAccountPage.tsx b/src/pages/PortfolioAccountPage.tsx index 8e2e7275..371d5ba8 100644 --- a/src/pages/PortfolioAccountPage.tsx +++ b/src/pages/PortfolioAccountPage.tsx @@ -7,11 +7,11 @@ import BreadCrumbs from 'components/portfolio/Account/BreadCrumbs' import PerpPositions from 'components/portfolio/Account/PerpPositions' import Summary from 'components/portfolio/Account/Summary' import useAccountId from 'hooks/useAccountId' -import useStore from 'store' +import useChainConfig from 'hooks/useChainConfig' import { getRoute } from 'utils/route' export default function PortfolioAccountPage() { - const chainConfig = useStore((s) => s.chainConfig) + const chainConfig = useChainConfig() const selectedAccountId = useAccountId() const { address, accountId } = useParams() const navigate = useNavigate() diff --git a/src/pages/_layout.tsx b/src/pages/_layout.tsx index 82f212aa..f4490983 100644 --- a/src/pages/_layout.tsx +++ b/src/pages/_layout.tsx @@ -2,19 +2,21 @@ import classNames from 'classnames' import { Suspense } from 'react' import { isMobile } from 'react-device-detect' import { useLocation } from 'react-router-dom' +import { SWRConfig } from 'swr' import AccountDetails from 'components/account/AccountDetails' import Background from 'components/common/Background' import Footer from 'components/common/Footer' -import DesktopHeader from 'components/header/DesktopHeader' -import ModalsContainer from 'components/Modals/ModalsContainer' import PageMetadata from 'components/common/PageMetadata' import Toaster from 'components/common/Toaster' +import DesktopHeader from 'components/header/DesktopHeader' +import ModalsContainer from 'components/Modals/ModalsContainer' import { DEFAULT_SETTINGS } from 'constants/defaultSettings' import { LocalStorageKeys } from 'constants/localStorageKeys' import useLocalStorage from 'hooks/localStorage/useLocalStorage' import useAccountId from 'hooks/useAccountId' import useStore from 'store' +import { debugSWR } from 'utils/middleware' interface Props { focusComponent: FocusComponent | null @@ -62,36 +64,38 @@ export default function Layout({ children }: { children: React.ReactNode }) { return ( <> - - - -
- - - {children} - - - -
-