From 5445210de33a859d56734ee4e071eb2a83f825da Mon Sep 17 00:00:00 2001 From: sahar-fehri Date: Tue, 23 Apr 2024 16:39:31 +0200 Subject: [PATCH 1/2] fix: update limit param --- packages/assets-controllers/src/NftDetectionController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/assets-controllers/src/NftDetectionController.ts b/packages/assets-controllers/src/NftDetectionController.ts index 3627165b77..63a31f299b 100644 --- a/packages/assets-controllers/src/NftDetectionController.ts +++ b/packages/assets-controllers/src/NftDetectionController.ts @@ -363,7 +363,7 @@ export class NftDetectionController extends StaticIntervalPollingControllerV1< address: string; next?: string; }) { - return `${NFT_API_BASE_URL}/users/${address}/tokens?chainIds=1&limit=200&includeTopBid=true&continuation=${ + return `${NFT_API_BASE_URL}/users/${address}/tokens?chainIds=1&limit=50&includeTopBid=true&continuation=${ next ?? '' }`; } From 084e2109ecc608f8b4417bbfab7a0f60da9413b3 Mon Sep 17 00:00:00 2001 From: sahar-fehri Date: Tue, 23 Apr 2024 16:45:57 +0200 Subject: [PATCH 2/2] fix: update limit param --- .../src/NftDetectionController.test.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/assets-controllers/src/NftDetectionController.test.ts b/packages/assets-controllers/src/NftDetectionController.test.ts index 1c21005236..27a2fac71c 100644 --- a/packages/assets-controllers/src/NftDetectionController.test.ts +++ b/packages/assets-controllers/src/NftDetectionController.test.ts @@ -30,7 +30,7 @@ describe('NftDetectionController', () => { nock(NFT_API_BASE_URL) .persist() .get( - `/users/0x1/tokens?chainIds=1&limit=200&includeTopBid=true&continuation=`, + `/users/0x1/tokens?chainIds=1&limit=50&includeTopBid=true&continuation=`, ) .reply(200, { tokens: [ @@ -97,7 +97,7 @@ describe('NftDetectionController', () => { ], }) .get( - `/users/0x9/tokens?chainIds=1&limit=200&includeTopBid=true&continuation=`, + `/users/0x9/tokens?chainIds=1&limit=50&includeTopBid=true&continuation=`, ) .reply(200, { tokens: [ @@ -121,7 +121,7 @@ describe('NftDetectionController', () => { ], }) .get( - `/users/0x123/tokens?chainIds=1&limit=200&includeTopBid=true&continuation=`, + `/users/0x123/tokens?chainIds=1&limit=50&includeTopBid=true&continuation=`, ) .reply(200, { tokens: [ @@ -166,7 +166,7 @@ describe('NftDetectionController', () => { ], }) .get( - `/users/0x12345/tokens?chainIds=1&limit=200&includeTopBid=true&continuation=`, + `/users/0x12345/tokens?chainIds=1&limit=50&includeTopBid=true&continuation=`, ) .reply(200, { tokens: [ @@ -687,7 +687,7 @@ describe('NftDetectionController', () => { .get(`/users/${selectedAddress}/tokens`) .query({ continuation: '', - limit: '200', + limit: '50', chainIds: '1', includeTopBid: true, }) @@ -725,7 +725,7 @@ describe('NftDetectionController', () => { .get(`/users/${selectedAddress}/tokens`) .query({ continuation: '', - limit: '200', + limit: '50', chainIds: '1', includeTopBid: true, }) @@ -747,7 +747,7 @@ describe('NftDetectionController', () => { .get(`/users/${selectedAddress}/tokens`) .query({ continuation: '', - limit: '200', + limit: '50', chainIds: '1', includeTopBid: true, })