Skip to content

Commit d6d71b3

Browse files
committed
fix: router test type mismatch problem
1 parent 5b8bc9a commit d6d71b3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

contract/r/gnoswap/v1/router/fuzz_test.gno

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,14 +1038,12 @@ func TestFuzzFinalizeSwap(t *testing.T) {
10381038
)
10391039

10401040
// verify amountIn is positive string
1041-
inVal, err := strconv.ParseInt(amountIn, 10, 64)
1042-
if err != nil || inVal <= 0 {
1041+
if amountIn.Int64() <= 0 {
10431042
t.Errorf("Invalid amountIn: %s", amountIn)
10441043
}
10451044

10461045
// verify amountOut is negative string
1047-
outVal, err := strconv.ParseInt(amountOut, 10, 64)
1048-
if err != nil || outVal >= 0 {
1046+
if amountOut.Int64() >= 0 {
10491047
t.Errorf("Invalid amountOut: %s (should be negative)", amountOut)
10501048
}
10511049
}()

0 commit comments

Comments
 (0)