Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update accountingTransfer limit to 20 #3115

Merged
merged 2 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ describe('Ledger Transfer', (): void => {
const accountTransfers = await getAccountTransfers(
serviceDeps,
account.id,
100_000,
20,
knex
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export type CreateLedgerTransferArgs = Pick<
export async function getAccountTransfers(
deps: ServiceDependencies,
id: string | number,
limit?: number,
limit: number = 20,
trx?: TransactionOrKnex
): Promise<GetLedgerTransfersResult> {
const builder = LedgerTransfer.query(trx || deps.knex)
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/accounting/tigerbeetle/transfers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ export async function createTransfers(
export async function getAccountTransfers(
deps: ServiceDependencies,
id: string | number,
limit: number = 100_000
limit: number = 20
): Promise<GetLedgerTransfersResult> {
const account_id = toTigerBeetleId(id)
const filter: AccountFilter = {
account_id,
timestamp_min: 0n,
timestamp_max: 0n,
limit, //100_000 is the default limit for TB.
limit,
flags: AccountFilterFlags.credits | AccountFilterFlags.debits
}
const tbAccountTransfers: TbTransfer[] =
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/graphql/generated/graphql.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('Accounting Transfer', (): void => {
// Top up debit account first:
const transferAmount = 123
const ledger = 1
const queryLimit = 100_000
const queryLimit = 20

const insertedTransfer = await createLedgerTransfer(
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('TigerBeetle: Accounting Transfer', (): void => {

// Top up debit account first:
const transferAmount = 123
const queryLimit = 100_000
const queryLimit = 20
const depositId = uuid()
const insertedTransfer = await accountingService.createDeposit({
id: depositId,
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ type Query {
accountingTransfers(
"Unique identifier of the account."
id: String!
"Limit the number of results returned. If no limit is provided, the default limit of 100,000 is set for TigerBeetle."
"Limit the number of results returned. If no limit is provided, the default limit is 20."
limit: Int
): AccountingTransferConnection!

Expand Down
Loading