Skip to content

Commit

Permalink
chore: fix function name in comment
Browse files Browse the repository at this point in the history
Signed-off-by: hongmengning <go@before.tech>
  • Loading branch information
hongmengning committed Nov 25, 2024
1 parent 795d922 commit cc675c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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)
}

0 comments on commit cc675c6

Please sign in to comment.