Skip to content

Commit

Permalink
feat: remove all favorite server references (#2244)
Browse files Browse the repository at this point in the history
* feat: remove all favorite server references

* feat: put back the marketplace server correct URL
  • Loading branch information
juanmahidalgo committed May 8, 2024
1 parent 654b3f5 commit 3f94f12
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion webapp/src/config/env/dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion webapp/src/config/env/prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion webapp/src/config/env/stg.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/modules/favorites/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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)

Expand Down
5 changes: 3 additions & 2 deletions webapp/src/modules/vendor/decentraland/favorites/api.spec.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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')
Expand Down
2 changes: 0 additions & 2 deletions webapp/src/modules/vendor/decentraland/favorites/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3f94f12

Please sign in to comment.