Skip to content

Commit

Permalink
workaround cors
Browse files Browse the repository at this point in the history
  • Loading branch information
linkielink committed Dec 13, 2024
1 parent a8f7fd5 commit 906a93d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/adaptors/mars-protocol/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async function apy() {
});

const perpsVaultApyData = await axios.get(perpsVaultApi[chain]);
if (perpsVault && perpsVaultApyData) {
if (perpsVault) {
const perpsAsset = tokenInfos.data.find(
(token) => token.denom === perpsDenom[chain]
);
Expand All @@ -89,8 +89,7 @@ async function apy() {
perpsVault['total_balance']
).shiftedBy(-perpsAsset.decimals);

const apyBase = perpsVaultApyData.data.projected_apy;
if (!apyBase) return;
const apyBase = perpsVaultApyData?.data['projected_apy'] ?? 0;

apyData.push({
pool: `mars-cpv-${perpsDenom[chain]}-${chain}`.toLowerCase(),
Expand Down

0 comments on commit 906a93d

Please sign in to comment.