diff --git a/components/explore/SpotTable.tsx b/components/explore/SpotTable.tsx index 1e0e9b70..5c93eb5c 100644 --- a/components/explore/SpotTable.tsx +++ b/components/explore/SpotTable.tsx @@ -75,7 +75,6 @@ const SpotTable = ({ tokens }: { tokens: BankWithMarketData[] }) => { for (const token of tokens) { const baseBank = token.bank const price = baseBank.uiPrice - const priceHistory = token?.market?.priceHistory?.length ? token.market.priceHistory ?.sort((a, b) => a.time - b.time) @@ -106,9 +105,7 @@ const SpotTable = ({ tokens }: { tokens: BankWithMarketData[] }) => { availableVaultBalance.toFixed(baseBank.mintDecimals), ) - availableValue = available - .mul(typeof price === 'number' ? price : 0) - .toNumber() + availableValue = available.mul(price).toNumber() depositRate = baseBank.getDepositRateUi() borrowRate = baseBank.getBorrowRateUi() assetWeight = baseBank diff --git a/package.json b/package.json index e6e282c6..d943c891 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "dependencies": { "@blockworks-foundation/mango-feeds": "0.1.7", "@blockworks-foundation/mango-mints-redemption": "^0.0.10", - "@blockworks-foundation/mango-v4": "0.33.7", + "@blockworks-foundation/mango-v4": "0.33.9", "@blockworks-foundation/mango-v4-settings": "0.14.24", "@blockworks-foundation/mangolana": "0.1.2", "@realms-today/spl-governance": "0.3.30", diff --git a/yarn.lock b/yarn.lock index 036b4d54..351ad84f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -401,10 +401,10 @@ bn.js "^5.2.1" eslint-config-prettier "^9.0.0" -"@blockworks-foundation/mango-v4@0.33.7": - version "0.33.7" - resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-v4/-/mango-v4-0.33.7.tgz#f2f49d1c5e6eb97851419a1dbc0aa26a8fed40dd" - integrity sha512-qBYDPsTmIFDwHGLkcB/1rQeJdDKQqM23G+cjoNffBCkrpCKHTYX94m0R5pxqVkE9IYwsdX0Qy1qSX+DzRP3RuQ== +"@blockworks-foundation/mango-v4@0.33.9": + version "0.33.9" + resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-v4/-/mango-v4-0.33.9.tgz#bf1dac84b24655e60db2a53743e009ec179316b9" + integrity sha512-WgB9WVenexVxRaJ9Hx+XMqry2/TI+cQADWrmooOQzXWeaCFw2RCWA6FzIpaXpKpnU21ByHqnBHOEhzk4TV/jmA== dependencies: "@blockworks-foundation/mango-v4-settings" "0.14.24" "@blockworks-foundation/mangolana" "0.1.2"