Skip to content

Commit cf2fd5a

Browse files
committed
rebase on query bigints + cleanup
1 parent 8c18468 commit cf2fd5a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

internal/api/v2/controllers_transactions_list_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func TestTransactionsList(t *testing.T) {
155155
Order: pointer.For(bunpaginate.Order(bunpaginate.OrderDesc)),
156156
Options: storagecommon.ResourceQuery[any]{
157157
PIT: &now,
158-
Builder: query.Lt("amount[EUR]", 20.0),
158+
Builder: query.Lt("amount[EUR]", big.NewInt(20)),
159159
Expand: make([]string, 0),
160160
},
161161
},

test/e2e/api_transactions_list_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ var _ = Context("Ledger transactions list API tests", func() {
456456
operations.V2ListTransactionsRequest{
457457
RequestBody: map[string]interface{}{
458458
"$gt": map[string]any{
459-
"amount[EUR]": 10,
459+
"amount[EUR]": big.NewInt(10),
460460
},
461461
},
462462
Ledger: "default",
@@ -466,14 +466,13 @@ var _ = Context("Ledger transactions list API tests", func() {
466466
)
467467
Expect(err).To(BeNil())
468468
})
469-
_ = response
470469
It("Should be ok", func() {
471470
Expect(response.V2TransactionsCursorResponse.Cursor.Next).NotTo(BeNil())
472471
cursor := &common.ColumnPaginatedQuery[any]{}
473472
Expect(bunpaginate.UnmarshalCursor(*response.V2TransactionsCursorResponse.Cursor.Next, cursor)).To(BeNil())
474473
Expect(cursor.PageSize).To(Equal(uint64(10)))
475474
Expect(cursor.Options).To(Equal(common.ResourceQuery[any]{
476-
Builder: query.Gt("amount[EUR]", float64(10.0)),
475+
Builder: query.Gt("amount[EUR]", big.NewInt(10)),
477476
PIT: pointer.For(libtime.New(now)),
478477
}))
479478
})

0 commit comments

Comments
 (0)