diff --git a/src/domain/accounts/entities/__tests__/account.builder.ts b/src/domain/accounts/entities/__tests__/account.builder.ts index 29ff1dd6db..8f563c60ab 100644 --- a/src/domain/accounts/entities/__tests__/account.builder.ts +++ b/src/domain/accounts/entities/__tests__/account.builder.ts @@ -1,12 +1,13 @@ import { Builder, IBuilder } from '@/__tests__/builder'; import { Account } from '@/domain/accounts/entities/account.entity'; +import { DB_MAX_SAFE_INTEGER } from '@/domain/common/constants'; import { faker } from '@faker-js/faker'; import { getAddress } from 'viem'; export function accountBuilder(): IBuilder { return new Builder() - .with('id', faker.number.int({ max: 1_000_000 })) - .with('group_id', faker.number.int({ max: 1_000_000 })) + .with('id', faker.number.int({ max: DB_MAX_SAFE_INTEGER })) + .with('group_id', faker.number.int({ max: DB_MAX_SAFE_INTEGER })) .with('address', getAddress(faker.finance.ethereumAddress())) .with('created_at', faker.date.recent()) .with('updated_at', faker.date.recent()); diff --git a/src/domain/common/constants.ts b/src/domain/common/constants.ts new file mode 100644 index 0000000000..1207287f3a --- /dev/null +++ b/src/domain/common/constants.ts @@ -0,0 +1,5 @@ +/** + * The maximum safe integer for the database. + * This is an arbitrary value + */ +export const DB_MAX_SAFE_INTEGER = Math.pow(2, 31) - 1;