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

Optimization / Make DefiPositionsController State Private in MainController #1095

Merged
merged 8 commits into from
Nov 15, 2024

Conversation

sonytooo
Copy link
Collaborator

  • made defiPositions private in the MainController
  • impl defiPositionsBanners in selectedAccount
  • removed defiPositions.banners because these banners were specific for the selectedAccount only

By keeping the defiPositions state private and not sending it to the FE, we ensure optimal performance even with multiple heavy accounts added to the wallet

…ngified state from being sent to the frontend, improving performance
Comment on lines +131 to +133
this.#debounceFunctionCallsOnSameTick('updateDefiPositionsBanners', () =>
this.#updateDefiPositionsBanners()
)
Copy link
Member

Choose a reason for hiding this comment

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

Call it in #updateSelectedAccountDefiPositions as it only depends on them

})

return errorBanners
getDefiPostionsState(accountAddr: string) {
Copy link
Member

Choose a reason for hiding this comment

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

postions typo

@PetromirDev PetromirDev merged commit 3ff2536 into v2 Nov 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants