Skip to content

Commit

Permalink
feat: Use marketplace basename
Browse files Browse the repository at this point in the history
  • Loading branch information
LautaroPetaccio committed Nov 20, 2023
1 parent c72f7aa commit 6e9cfd6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 25 deletions.
9 changes: 5 additions & 4 deletions webapp/src/config/env/dev.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"NETWORK": "sepolia",
"CHAIN_ID": "11155111",
"BASE_NAME": "/marketplace",
"NFT_SERVER_URL": "https://nft-api.decentraland.zone/v1",
"MARKETPLACE_SERVER_URL": "https://marketplace-api.decentraland.zone/v1",
"BUILDER_SERVER_URL": "https://builder-api.decentraland.zone/v1",
Expand All @@ -22,7 +23,7 @@
"MOON_PAY_API_KEY": "pk_test_WVS2xVSCnSnR7A7qIueWwCtcKnrGb55p",
"MOON_PAY_POLLING_DELAY": "6000",
"MOON_PAY_WIDGET_URL": "https://buy-staging.moonpay.io",
"BUILDER_URL": "https://builder.decentraland.zone",
"BUILDER_URL": "https://decentraland.zone/builder",
"COINGECKO_API_URL": "https://api.coingecko.com/api/v3",
"DOCS_URL": "https://docs.decentraland.org",
"MARKETPLACE_ADAPTER_FEE_PER_MILLION": "25000",
Expand All @@ -36,9 +37,9 @@
"ENVIRONMENT": "development",
"MIN_SALE_VALUE_IN_WEI": "1000000000000000000",
"EXPLORER_URL": "https://play.decentraland.zone",
"MARKETPLACE_URL": "https://market.decentraland.zone",
"PROFILE_URL": "https://profile.decentraland.zone",
"MARKETPLACE_URL": "https://decentraland.zone/marketplace",
"PROFILE_URL": "https://decentraland.zone/profile",
"SSO_URL": "https://id.decentraland.zone",
"SUBGRAPH_WORKER": "https://subgraph.decentraland.zone",
"SENTRY_DSN": "https://1dc401149e1c819b8477565c9cdd9b70@o4504361728212992.ingest.sentry.io/4505743351676928"
}
}
6 changes: 3 additions & 3 deletions webapp/src/config/env/prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"MOON_PAY_API_KEY": "pk_live_3PEJQj5NyvQBdit7phd48cCyzDSZFGsg",
"MOON_PAY_POLLING_DELAY": "6000",
"MOON_PAY_WIDGET_URL": "https://buy.moonpay.io",
"BUILDER_URL": "https://builder.decentraland.org",
"BUILDER_URL": "https://decentraland.org/builder",
"COINGECKO_API_URL": "https://api.coingecko.com/api/v3",
"DOCS_URL": "https://docs.decentraland.org",
"MARKETPLACE_ADAPTER_FEE_PER_MILLION": "25000",
Expand All @@ -36,8 +36,8 @@
"ENVIRONMENT": "production",
"MIN_SALE_VALUE_IN_WEI": "1000000000000000000",
"EXPLORER_URL": "https://play.decentraland.org",
"MARKETPLACE_URL": "https://market.decentraland.org",
"PROFILE_URL": "https://profile.decentraland.org",
"MARKETPLACE_URL": "https://decentraland.org/marketplace",
"PROFILE_URL": "https://decentraland.org/profile",
"SSO_URL": "https://id.decentraland.org",
"SUBGRAPH_WORKER": "https://subgraph.decentraland.org",
"SENTRY_DSN": "https://1dc401149e1c819b8477565c9cdd9b70@o4504361728212992.ingest.sentry.io/4505743351676928"
Expand Down
7 changes: 4 additions & 3 deletions webapp/src/config/env/stg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"NETWORK": "mainnet",
"CHAIN_ID": "1",
"BASE_NAME": "/marketplace",
"NFT_SERVER_URL": "https://nft-api.decentraland.today/v1",
"MARKETPLACE_SERVER_URL": "https://marketplace-api.decentraland.today/v1",
"BUILDER_SERVER_URL": "https://builder-api.decentraland.today/v1",
Expand All @@ -22,7 +23,7 @@
"MOON_PAY_API_KEY": "pk_test_WVS2xVSCnSnR7A7qIueWwCtcKnrGb55p",
"MOON_PAY_POLLING_DELAY": "6000",
"MOON_PAY_WIDGET_URL": "https://buy-staging.moonpay.io",
"BUILDER_URL": "https://builder.decentraland.today",
"BUILDER_URL": "https://decentraland.today/builder",
"COINGECKO_API_URL": "https://api.coingecko.com/api/v3",
"DOCS_URL": "https://docs.decentraland.org",
"MARKETPLACE_ADAPTER_FEE_PER_MILLION": "25000",
Expand All @@ -36,8 +37,8 @@
"ENVIRONMENT": "staging",
"MIN_SALE_VALUE_IN_WEI": "1000000000000000000",
"EXPLORER_URL": "https://play.decentraland.org",
"MARKETPLACE_URL": "https://market.decentraland.today",
"PROFILE_URL": "https://profile.decentraland.today",
"MARKETPLACE_URL": "https://decentraland.today/marketplace",
"PROFILE_URL": "https://decentraland.today/profile",
"SSO_URL": "https://id.decentraland.today",
"SUBGRAPH_WORKER": "https://subgraph.decentraland.today",
"SENTRY_DSN": "https://1dc401149e1c819b8477565c9cdd9b70@o4504361728212992.ingest.sentry.io/4505743351676928"
Expand Down
22 changes: 7 additions & 15 deletions webapp/src/modules/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import { SET_IS_TRYING_ON } from './ui/preview/actions'
import { getCurrentIdentity } from './identity/selectors'
import { AuthIdentity } from 'decentraland-crypto-fetch'

export const history = require('history').createBrowserHistory()
export const history = require('history').createBrowserHistory({
basename: config.get('BASE_NAME') ?? undefined
})

export function initStore() {
const anyWindow = window as any
Expand Down Expand Up @@ -47,14 +49,9 @@ export function initStore() {
storageKey: 'marketplace-v2', // this is the key used to save the state in localStorage (required)
paths: [
['ui', 'archivedBidIds'],
['ui', 'preview', 'isTryingOn'],
['ui', 'preview', 'isTryingOn']
], // array of paths from state to be persisted (optional)
actions: [
CLEAR_TRANSACTIONS,
ARCHIVE_BID,
UNARCHIVE_BID,
SET_IS_TRYING_ON
], // array of actions types that will trigger a SAVE (optional)
actions: [CLEAR_TRANSACTIONS, ARCHIVE_BID, UNARCHIVE_BID, SET_IS_TRYING_ON], // array of actions types that will trigger a SAVE (optional)
migrations: {} // migration object that will migrate your localstorage (optional)
})
const analyticsMiddleware = createAnalyticsMiddleware(
Expand Down Expand Up @@ -101,14 +98,9 @@ export function initTestStore(preloadedState = {}) {
storageKey: 'marketplace-v2', // this is the key used to save the state in localStorage (required)
paths: [
['ui', 'archivedBidIds'],
['ui', 'preview', 'isTryingOn'],
['ui', 'preview', 'isTryingOn']
], // array of paths from state to be persisted (optional)
actions: [
CLEAR_TRANSACTIONS,
ARCHIVE_BID,
UNARCHIVE_BID,
SET_IS_TRYING_ON
], // array of actions types that will trigger a SAVE (optional)
actions: [CLEAR_TRANSACTIONS, ARCHIVE_BID, UNARCHIVE_BID, SET_IS_TRYING_ON], // array of actions types that will trigger a SAVE (optional)
migrations: {} // migration object that will migrate your localstorage (optional)
})

Expand Down

0 comments on commit 6e9cfd6

Please sign in to comment.