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

refactor: use queryMulti for staking computation #594

Merged
merged 1 commit into from
Mar 6, 2023

Conversation

gregdhill
Copy link
Member

Bundle staking queries and remove "duplicate" call getLockedCollateral which only checked reserve balance (anyway unused). Add assertion that computation returns correct amount for aUSD Vault.

Related: #593

this.getStakingPoolSlashTally(collateralCurrency, vaultId.accountId, nominatorId),
]);
const nonce = await this.getStakingPoolNonce(collateralCurrency, vaultId.accountId);
const [stake, slashPerToken, slashTally] = await this.api.queryMulti<[
Copy link
Contributor

Choose a reason for hiding this comment

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

:chefkiss:

@gregdhill gregdhill merged commit 5762411 into interlay:master Mar 6, 2023
@gregdhill gregdhill deleted the refactor/vault-collateral branch March 6, 2023 15:01
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.

2 participants