diff --git a/webapp/src/components/Modals/FavoritesModal/FavoritesModal.tsx b/webapp/src/components/Modals/FavoritesModal/FavoritesModal.tsx index b1c8e9b5bf..ab29c951ff 100644 --- a/webapp/src/components/Modals/FavoritesModal/FavoritesModal.tsx +++ b/webapp/src/components/Modals/FavoritesModal/FavoritesModal.tsx @@ -6,7 +6,8 @@ import { Modal } from 'decentraland-dapps/dist/containers' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { ModalNavigation, Message, useMobileMediaQuery, Empty, Loader } from 'decentraland-ui' import { isErrorWithMessage } from '../../../lib/error' -import { FavoritesAPI, MARKETPLACE_FAVORITES_SERVER_URL } from '../../../modules/vendor/decentraland/favorites' +import { MARKETPLACE_SERVER_URL } from '../../../modules/vendor/decentraland' +import { FavoritesAPI } from '../../../modules/vendor/decentraland/favorites' import { retryParams } from '../../../modules/vendor/decentraland/utils' import { LinkedProfile } from '../../LinkedProfile' import { Props } from './FavoritesModal.types' @@ -27,7 +28,7 @@ const FavoritesModal = ({ metadata: { itemId }, identity, onClose }: Props) => { const isMobile = useMobileMediaQuery() const favoritesAPI = useMemo(() => { - return new FavoritesAPI(MARKETPLACE_FAVORITES_SERVER_URL, { + return new FavoritesAPI(MARKETPLACE_SERVER_URL, { retries: retryParams.attempts, retryDelay: retryParams.delay, identity diff --git a/webapp/src/components/Modals/SaveToListModal/SaveToListModal.tsx b/webapp/src/components/Modals/SaveToListModal/SaveToListModal.tsx index ce0155d561..676255b8d4 100644 --- a/webapp/src/components/Modals/SaveToListModal/SaveToListModal.tsx +++ b/webapp/src/components/Modals/SaveToListModal/SaveToListModal.tsx @@ -8,7 +8,8 @@ import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { Button, Checkbox, Icon, Loader, Message, ModalNavigation } from 'decentraland-ui' import { isErrorWithMessage } from '../../../lib/error' import { CreateListParameters } from '../../../modules/favorites/types' -import { FavoritesAPI, MARKETPLACE_FAVORITES_SERVER_URL, ListOfLists } from '../../../modules/vendor/decentraland/favorites' +import { MARKETPLACE_SERVER_URL } from '../../../modules/vendor/decentraland' +import { FavoritesAPI, ListOfLists } from '../../../modules/vendor/decentraland/favorites' import { retryParams } from '../../../modules/vendor/decentraland/utils' import * as events from '../../../utils/events' import { PrivateTag } from '../../PrivateTag' @@ -112,7 +113,7 @@ const SaveToListModal = (props: Props) => { ) const favoritesAPI = useMemo(() => { - return new FavoritesAPI(MARKETPLACE_FAVORITES_SERVER_URL, { + return new FavoritesAPI(MARKETPLACE_SERVER_URL, { retries: retryParams.attempts, retryDelay: retryParams.delay, identity diff --git a/webapp/src/config/env/dev.json b/webapp/src/config/env/dev.json index e1936ad7d4..bf29e31c10 100644 --- a/webapp/src/config/env/dev.json +++ b/webapp/src/config/env/dev.json @@ -7,7 +7,6 @@ "ATLAS_SERVER_URL": "https://api.decentraland.zone", "PEER_URL": "https://peer-ue-2.decentraland.zone", "SIGNATURES_SERVER_URL": "https://signatures-api.decentraland.zone/v1", - "MARKETPLACE_FAVORITES_SERVER_URL": "https://marketplace-favorites-api.decentraland.zone/v1", "DEFAULT_FAVORITES_LIST_ID": "70ab6873-4a03-4eb2-b331-4b8be0e0b8af", "DECENTRALAND_BLOG": "https://decentraland.org/blog", "REFRESH_SIGNATURES_DELAY": "10000", diff --git a/webapp/src/config/env/prod.json b/webapp/src/config/env/prod.json index d4170df30a..1ab19313f8 100644 --- a/webapp/src/config/env/prod.json +++ b/webapp/src/config/env/prod.json @@ -7,7 +7,6 @@ "ATLAS_SERVER_URL": "https://api.decentraland.org", "PEER_URL": "https://peer.decentraland.org", "SIGNATURES_SERVER_URL": "https://signatures-api.decentraland.org/v1", - "MARKETPLACE_FAVORITES_SERVER_URL": "https://marketplace-favorites-api.decentraland.org/v1", "DEFAULT_FAVORITES_LIST_ID": "70ab6873-4a03-4eb2-b331-4b8be0e0b8af", "DECENTRALAND_BLOG": "https://decentraland.org/blog", "REFRESH_SIGNATURES_DELAY": "10000", diff --git a/webapp/src/config/env/stg.json b/webapp/src/config/env/stg.json index 467b068a3d..a70faae180 100644 --- a/webapp/src/config/env/stg.json +++ b/webapp/src/config/env/stg.json @@ -7,7 +7,6 @@ "ATLAS_SERVER_URL": "https://api.decentraland.today", "PEER_URL": "https://peer.decentraland.org", "SIGNATURES_SERVER_URL": "https://signatures-api.decentraland.today/v1", - "MARKETPLACE_FAVORITES_SERVER_URL": "https://marketplace-favorites-api.decentraland.today/v1", "DEFAULT_FAVORITES_LIST_ID": "70ab6873-4a03-4eb2-b331-4b8be0e0b8af", "DECENTRALAND_BLOG": "https://decentraland.org/blog", "REFRESH_SIGNATURES_DELAY": "10000", diff --git a/webapp/src/modules/favorites/sagas.ts b/webapp/src/modules/favorites/sagas.ts index 2e9bd97a85..997adb511d 100644 --- a/webapp/src/modules/favorites/sagas.ts +++ b/webapp/src/modules/favorites/sagas.ts @@ -13,7 +13,7 @@ import { locations } from '../routing/locations' import { SortDirection } from '../routing/types' import { MARKETPLACE_SERVER_URL, NFT_SERVER_URL } from '../vendor/decentraland' import { CatalogAPI } from '../vendor/decentraland/catalog/api' -import { FavoritesAPI, MARKETPLACE_FAVORITES_SERVER_URL } from '../vendor/decentraland/favorites/api' +import { FavoritesAPI } from '../vendor/decentraland/favorites/api' import { ListsSortBy } from '../vendor/decentraland/favorites/types' import { retryParams } from '../vendor/decentraland/utils' import { getAddress } from '../wallet/selectors' @@ -74,7 +74,7 @@ export function* favoritesSaga(getIdentity: () => AuthIdentity | undefined) { retryDelay: retryParams.delay, identity: getIdentity } - const favoritesAPI = new FavoritesAPI(MARKETPLACE_FAVORITES_SERVER_URL, API_OPTS) + const favoritesAPI = new FavoritesAPI(MARKETPLACE_SERVER_URL, API_OPTS) const catalogAPI = new CatalogAPI(NFT_SERVER_URL, API_OPTS) const marketplaceServerCatalogAPI = new CatalogAPI(MARKETPLACE_SERVER_URL, API_OPTS) diff --git a/webapp/src/modules/vendor/decentraland/favorites/api.spec.ts b/webapp/src/modules/vendor/decentraland/favorites/api.spec.ts index 12ca2a66ee..e8d6d5b195 100644 --- a/webapp/src/modules/vendor/decentraland/favorites/api.spec.ts +++ b/webapp/src/modules/vendor/decentraland/favorites/api.spec.ts @@ -1,7 +1,8 @@ import { AuthIdentity } from 'decentraland-crypto-fetch' import { FavoritedItems, List } from '../../../favorites/types' import { ItemFilters } from '../item/types' -import { FavoritesAPI, MARKETPLACE_FAVORITES_SERVER_URL } from './api' +import { MARKETPLACE_SERVER_URL } from '../nft' +import { FavoritesAPI } from './api' import { ListDetails, ListOfLists, Permission, UpdateOrCreateList } from './types' let itemId: string @@ -12,7 +13,7 @@ let fetchMock: jest.SpyInstance beforeEach(() => { itemId = 'an-item-id' identity = {} as AuthIdentity - favoritesAPI = new FavoritesAPI(MARKETPLACE_FAVORITES_SERVER_URL, { + favoritesAPI = new FavoritesAPI(MARKETPLACE_SERVER_URL, { identity }) fetchMock = jest.spyOn(favoritesAPI as any, 'fetch') diff --git a/webapp/src/modules/vendor/decentraland/favorites/api.ts b/webapp/src/modules/vendor/decentraland/favorites/api.ts index c7e2d84e6b..90529f8bf2 100644 --- a/webapp/src/modules/vendor/decentraland/favorites/api.ts +++ b/webapp/src/modules/vendor/decentraland/favorites/api.ts @@ -5,8 +5,6 @@ import { BulkPickUnpickResponse, ListDetails, ListOfLists, ListsOptions, PicksOp export const DEFAULT_FAVORITES_LIST_ID = config.get('DEFAULT_FAVORITES_LIST_ID') -export const MARKETPLACE_FAVORITES_SERVER_URL = config.get('MARKETPLACE_FAVORITES_SERVER_URL') - export class FavoritesAPI extends BaseClient { private buildPaginationParameters({ first, skip }: { first?: number; skip?: number }): URLSearchParams { const queryParams = new URLSearchParams()