File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,9 +11,6 @@ export const ALLOWLISTED_HOSTS = [
1111 'virtual.mainnet.rpc.tenderly.co' ,
1212 'testnet-rpc.monad.xyz' ,
1313 'virtual.linea.rpc.tenderly.co' ,
14- 'nft.dev-api.cx.metamask.io' ,
15- 'nft.uat-api.cx.metamask.io' ,
16- 'nft.api.cx.metamask.io' ,
1714 'gamma-api.polymarket.com' ,
1815 '*.polymarket.com' ,
1916 'metamask.github.io' , // Test-snaps and test-dapp pages loaded in browser
@@ -24,8 +21,5 @@ export const ALLOWLISTED_URLS = [
2421 'https://api.avax.network/ext/bc/C/rpc' ,
2522 'https://mainnet.era.zksync.io/' ,
2623 'https://rpc.atlantischain.network/' ,
27- 'https://nft.api.cx.metamask.io/collections?chainId=0x539&contract=0xb2552e4f4bc23e1572041677234d192774558bf0' ,
2824 'https://metamask.github.io/test-dapp/metamask-fox.svg' ,
29- 'https://nft.api.cx.metamask.io/collections?contract=0xb66a603f4cfe17e3d27b87a8bfcad319856518b8&chainId=1' ,
30- 'https://nft.api.cx.metamask.io/users/0x76cf1cdd1fcc252442b50d6e97207228aa4aefc3/tokens?chainIds=1&limit=50&includeTopBid=true&continuation=' ,
3125] ;
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ import { DIGEST_API_MOCKS } from './digest-api.ts';
3333import { MONEY_ACCOUNT_MOCKS } from './money-account.ts' ;
3434import { STATIC_ASSETS_MOCKS } from './static-assets.ts' ;
3535import { SIGNATURE_INSIGHTS_MOCKS } from './signature-insights.ts' ;
36+ import { NFT_API_MOCKS } from './nft-api.ts' ;
3637
3738// Get auth mocks
3839const authMocks = getAuthMocks ( ) ;
@@ -62,6 +63,7 @@ export const DEFAULT_MOCKS = {
6263 ...( DIGEST_API_MOCKS . GET || [ ] ) ,
6364 ...( MONEY_ACCOUNT_MOCKS . GET || [ ] ) ,
6465 ...( STATIC_ASSETS_MOCKS . GET || [ ] ) ,
66+ ...( NFT_API_MOCKS . GET || [ ] ) ,
6567 // Chains Network Mock - Provides blockchain network data
6668 {
6769 urlEndpoint : 'https://chainid.network/chains.json' ,
Original file line number Diff line number Diff line change 1+ import { MockEventsObject } from '../../../framework' ;
2+
3+ export const NFT_API_MOCKS : MockEventsObject = {
4+ GET : [
5+ {
6+ urlEndpoint :
7+ / ^ h t t p s : \/ \/ n f t \. a p i \. c x \. m e t a m a s k \. i o \/ u s e r s \/ 0 x [ 0 - 9 a - f A - F ] + \/ t o k e n s \? .* $ / ,
8+ responseCode : 200 ,
9+ response : {
10+ tokens : [ ] ,
11+ continuation : null ,
12+ } ,
13+ } ,
14+ {
15+ urlEndpoint : / ^ h t t p s : \/ \/ n f t \. a p i \. c x \. m e t a m a s k \. i o \/ c o l l e c t i o n s \? .* $ / ,
16+ responseCode : 200 ,
17+ response : {
18+ collections : [ ] ,
19+ } ,
20+ } ,
21+ {
22+ urlEndpoint : / ^ h t t p s : \/ \/ n f t \. a p i \. c x \. m e t a m a s k \. i o \/ e x p l o r e \/ s i t e s \? .* $ / ,
23+ responseCode : 200 ,
24+ response : {
25+ dapps : [ ] ,
26+ } ,
27+ } ,
28+ ] ,
29+ } ;
You can’t perform that action at this time.
0 commit comments