Skip to content

Commit 93cbdcf

Browse files
committed
Fixed calculations test
1 parent 387a29c commit 93cbdcf

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

x/clp/keeper/calculations_test.go

+11-10
Original file line numberDiff line numberDiff line change
@@ -478,16 +478,17 @@ func TestKeeper_CalculateWithdrawal(t *testing.T) {
478478
asymmetry: sdk.NewInt(1),
479479
panicErr: "fail to convert 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 to cosmos.Dec: decimal '100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' out of range; bitLen: got 545, max 315",
480480
},
481-
{
482-
name: "fail to convert asymmetry to Dec",
483-
poolUnits: sdk.NewUint(1),
484-
nativeAssetBalance: "1",
485-
externalAssetBalance: "1",
486-
lpUnits: "1",
487-
wBasisPoints: "1",
488-
asymmetry: sdk.Int(sdk.NewUintFromString("10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")),
489-
panicErr: "bit length 293 greater than 256",
490-
},
481+
// The panic is from sdk.NewUintFromString and not CalculateWithdrawal
482+
//{
483+
// name: "fail to convert asymmetry to INT",
484+
// poolUnits: sdk.NewUint(1),
485+
// nativeAssetBalance: "1",
486+
// externalAssetBalance: "1",
487+
// lpUnits: "1",
488+
// wBasisPoints: "1",
489+
// asymmetry: sdk.Int(sdk.NewUintFromString("10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")),
490+
// panicErr: "fail to convert 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 to cosmos.Dec: decimal '10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' out of range; bitLen: got 293, max 256",
491+
//},
491492
{
492493
name: "asymmetric value negative",
493494
poolUnits: sdk.NewUint(1),

0 commit comments

Comments
 (0)