Skip to content

Commit

Permalink
Don't capture i accidentally
Browse files Browse the repository at this point in the history
  • Loading branch information
af-afk committed Jul 15, 2024
1 parent 9035635 commit 4ac835d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/config/pools.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import "github.com/fluidity-money/long.so/lib/types/seawater"

// Pool config, probably derived from config/pools.toml.
type Pool struct {
Displayed bool `toml:"displayed",json:"displayed"`
Classification seawater.Classification `toml:"classification",json:"classification"`
Displayed bool `toml:"displayed" json:"displayed"`
Classification seawater.Classification `toml:"classification" json:"classification"`
}
9 changes: 8 additions & 1 deletion lib/math/concentrated-liq_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ func TestGetAmountsForLiq(t *testing.T) {
test := test
t.Run(k, func(t *testing.T) {
t.Parallel()
amount0, amount1 := GetAmountsForLiq(test.sqrtRatioX96, test.sqrtRatioAX96, test.sqrtRatioBX96, new(big.Int).SetInt64(int64(test.liq)))
amount0, amount1 := GetAmountsForLiq(
test.sqrtRatioX96,
test.sqrtRatioAX96,
test.sqrtRatioBX96,
new(big.Int).SetInt64(int64(test.liq)),
)
assertOneDiff(t, test.expectedAmount0, amount0, "amount0 is wrong")
assertOneDiff(t, test.expectedAmount1, amount1, "amount1 is wrong")
})
Expand Down Expand Up @@ -4953,6 +4958,7 @@ var getAmountsForLiqLiveTestTable = []struct {

func TestGetAmountsForLiqLive(t *testing.T) {
for i, test := range getAmountsForLiqLiveTestTable {
i := i
test := test
t.Run(strconv.Itoa(i), func(t *testing.T) {
t.Parallel()
Expand Down Expand Up @@ -6627,6 +6633,7 @@ var getIndividualAmountsForLiquidityTestTable = []struct {

func TestGetIndividualAmountsForLiquidity(t *testing.T) {
for i, test := range getIndividualAmountsForLiquidityTestTable {
i := i
test := test
t.Run(strconv.Itoa(i), func(t *testing.T) {
t.Parallel()
Expand Down

0 comments on commit 4ac835d

Please sign in to comment.