Skip to content

Commit

Permalink
Re-adjusting query limits
Browse files Browse the repository at this point in the history
  • Loading branch information
arboleya committed Jul 8, 2024
1 parent 3fb86a9 commit ee49080
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions packages/account/src/account.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('Account', () => {
expect(assetC?.amount.gt(1)).toBeTruthy();
});

it('should throw if coins length is higher than 100', async () => {
it('should throw if coins length is higher than 512', async () => {
const dummyCoins: Coin[] = new Array(10000);

vi.spyOn(Provider.prototype, 'getCoins').mockImplementation(async () =>
Expand All @@ -96,7 +96,7 @@ describe('Account', () => {

expect(result).toBeUndefined();
expect((<Error>error).message).toEqual(
'Wallets containing more than 100 coins exceed the current supported limit.'
'Wallets containing more than 512 coins exceed the current supported limit.'
);
});

Expand Down Expand Up @@ -139,7 +139,7 @@ describe('Account', () => {
expect(messages.length).toEqual(1);
});

it('should throw if messages length is higher than 100', async () => {
it('should throw if messages length is higher than 512', async () => {
const dummyMessages: Message[] = new Array(10000);

vi.spyOn(Provider.prototype, 'getMessages').mockImplementation(async () =>
Expand All @@ -162,7 +162,7 @@ describe('Account', () => {

expect(result).toBeUndefined();
expect((<Error>error).message).toEqual(
'Wallets containing more than 100 messages exceed the current supported limit.'
'Wallets containing more than 512 messages exceed the current supported limit.'
);
});

Expand All @@ -186,7 +186,7 @@ describe('Account', () => {
expect(balances.length).toBeGreaterThanOrEqual(1);
});

it('should throw if balances length is higher than 100', async () => {
it('should throw if balances length is higher than 9999', async () => {
const dummyBalances: CoinQuantity[] = new Array(10000);

vi.spyOn(Provider.prototype, 'getBalances').mockImplementation(async () =>
Expand All @@ -208,7 +208,7 @@ describe('Account', () => {

expect(result).toBeUndefined();
expect((<Error>error).message).toEqual(
'Wallets containing more than 100 balances exceed the current supported limit.'
'Wallets containing more than 9999 balances exceed the current supported limit.'
);
});

Expand Down
6 changes: 3 additions & 3 deletions packages/account/src/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class Account extends AbstractAccount {
async getCoins(assetId?: BytesLike): Promise<Coin[]> {
const coins = [];

const pageSize = 100;
const pageSize = 512;
let cursor;
// eslint-disable-next-line no-unreachable-loop
for (;;) {
Expand Down Expand Up @@ -185,7 +185,7 @@ export class Account extends AbstractAccount {
async getMessages(): Promise<Message[]> {
const messages = [];

const pageSize = 100;
const pageSize = 512;
let cursor;
// eslint-disable-next-line no-unreachable-loop
for (;;) {
Expand Down Expand Up @@ -231,7 +231,7 @@ export class Account extends AbstractAccount {
async getBalances(): Promise<CoinQuantity[]> {
const balances = [];

const pageSize = 100;
const pageSize = 9999;
let cursor;
// eslint-disable-next-line no-unreachable-loop
for (;;) {
Expand Down

0 comments on commit ee49080

Please sign in to comment.