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

chore: fix function name in comment #2056

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions x/swap/types/base_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,21 +377,21 @@ func (p *BasePool) assertFeeIsValid(fee sdk.Dec) {
}
}

// assertSharesPositive panics if shares is zero or negative
// assertSharesArePositive panics if shares is zero or negative
func (p *BasePool) assertSharesArePositive(shares sdkmath.Int) {
if !shares.IsPositive() {
panic("invalid value: shares must be positive")
}
}

// assertSharesLessThanTotal panics if the number of shares is greater than the total shares
// assertSharesAreLessThanTotal panics if the number of shares is greater than the total shares
func (p *BasePool) assertSharesAreLessThanTotal(shares sdkmath.Int) {
if shares.GT(p.totalShares) {
panic(fmt.Sprintf("out of bounds: shares %s > total shares %s", shares, p.totalShares))
}
}

// assertDepositsPositive panics if a deposit is zero or negative
// assertDepositsArePositive panics if a deposit is zero or negative
func (p *BasePool) assertDepositsArePositive(depositA, depositB sdkmath.Int) {
if !depositA.IsPositive() {
panic("invalid value: deposit A must be positive")
Expand Down
2 changes: 1 addition & 1 deletion x/swap/types/denominated_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (p *DenominatedPool) coinA(amount sdkmath.Int) sdk.Coin {
return sdk.NewCoin(p.denomA, amount)
}

// coinA returns a new coin denominated in denomB
// coinB returns a new coin denominated in denomB
func (p *DenominatedPool) coinB(amount sdkmath.Int) sdk.Coin {
return sdk.NewCoin(p.denomB, amount)
}