Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Position profit #117

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Added Position profit #117

wants to merge 12 commits into from

Conversation

Andrey-Onipchenko
Copy link
Collaborator

No description provided.

@vercel
Copy link

vercel bot commented May 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
abracadabra-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2023 1:51pm


const positionsProfit: any = {};

data.data.account.states.map(
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably makes sense to build a class around this and unit tests for each of the underlying methods (e.g., getProfit, getCurrentCollateralUsd), etc.

@@ -506,7 +513,7 @@ export default {
if (poolInterest) interest = poolInterest;
if (!poolInterest && pool?.interest) interest = pool?.interest;

if(pool.id === 36 && this.chainId === 1) interest = pool.interest; // deprecated WBTC
if (pool.id === 36 && this.chainId === 1) interest = pool.interest; // deprecated WBTC
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably leave a comment as to why we're doing this... When can we deprecate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants