Skip to content

Commit

Permalink
Kraken: Fix linter on tests
Browse files Browse the repository at this point in the history
Switched to nested ifs because it's easier to read anyway
  • Loading branch information
gbjk committed Oct 4, 2023
1 parent 6725d1c commit 9df1b6e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions exchanges/kraken/kraken_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -736,12 +736,12 @@ func TestOrders(t *testing.T) {
order.Sell.Lower(), order.Limit.Lower(),
0.00000001, 0, 0, 0, &args)

if assert.NoError(t, err, "AddOrder should not error") &&
assert.Len(t, resp.TransactionIds, 1, "One TransactionId should be returned") {

id := resp.TransactionIds[0]
_, err = k.CancelExistingOrder(context.Background(), id)
assert.NoErrorf(t, err, "CancelExistingOrder should not error, Please ensure order %s is cancelled manually", id)
if assert.NoError(t, err, "AddOrder should not error") {
if assert.Len(t, resp.TransactionIds, 1, "One TransactionId should be returned") {
id := resp.TransactionIds[0]
_, err = k.CancelExistingOrder(context.Background(), id)
assert.NoErrorf(t, err, "CancelExistingOrder should not error, Please ensure order %s is cancelled manually", id)
}
}
}

Expand Down

0 comments on commit 9df1b6e

Please sign in to comment.