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

Derivatives unit test #627

Merged
merged 4 commits into from
Jul 7, 2023
Merged

Derivatives unit test #627

merged 4 commits into from
Jul 7, 2023

Conversation

Saturn-Radius
Copy link
Contributor

@Saturn-Radius Saturn-Radius commented Jun 23, 2023

  • wrote unit-test for ValidateBasic function in type
  • in query, wrote unit-test for QueryParamsRequest{}
  • wrote unit-test for genesis-state validate
  • fixed DefaultParams.

2nd Upate

  • fixed existing unit test (currLptPrice)
  • wrote unit test for query

if err != nil {
return sdk.ZeroDec()
}

return sdk.NewDecFromInt(perpFuturesLongPositionNum.PositionSizeInDenomExponent).Mul(baseDenomPrice.Price)
baseDenomPrice := currentBaseUsdRate.Quo(currentQuoteUsdRate)
Copy link
Contributor

Choose a reason for hiding this comment

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

@taiki1frsh can you check is this modification valid?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@kimurayu45z
Although I don't know why this part needs to be changed, I think this code should also works fine.

@kimurayu45z kimurayu45z marked this pull request as ready for review July 7, 2023 10:36
@kimurayu45z kimurayu45z merged commit d8b21aa into newDevelop Jul 7, 2023
@kimurayu45z kimurayu45z deleted the feat/derivatives-unit-test branch July 7, 2023 11:09
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.

3 participants