From 0313bd12c60c3596d5a8e7334507d3fea136881c Mon Sep 17 00:00:00 2001 From: Juanma Hidalgo Date: Tue, 29 Oct 2024 18:10:45 +0100 Subject: [PATCH] fix: fix build --- .../Authorization/Authorization.tsx | 17 +++++++++++++---- webapp/src/modules/order/sagas.ts | 7 ++----- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/webapp/src/components/SettingsPage/Authorization/Authorization.tsx b/webapp/src/components/SettingsPage/Authorization/Authorization.tsx index 0e8a437db5..13e046386e 100644 --- a/webapp/src/components/SettingsPage/Authorization/Authorization.tsx +++ b/webapp/src/components/SettingsPage/Authorization/Authorization.tsx @@ -49,9 +49,18 @@ const Authorization = (props: Props) => { const { contractAddress, authorizedAddress } = authorization - const contract = isOffchainPublicNFTOrdersEnabled - ? getDecentralandContract(ContractName.OffChainMarketplace, authorization.chainId) - : getContract({ address: authorizedAddress }) + let contract + let name: string = '' + if (isOffchainPublicNFTOrdersEnabled) { + contract = getDecentralandContract(ContractName.OffChainMarketplace, authorization.chainId) + name = contract.name + } else { + contract = getContract({ address: authorizedAddress }) + if (contract) { + name = contract.label || contract.name + } + } + const token = getContract({ address: contractAddress }) if (!contract || !token) { @@ -88,7 +97,7 @@ const Authorization = (props: Props) => { values={{ contract_link: ( - {contract.label || contract.name} + {name} ), symbol: token.name, diff --git a/webapp/src/modules/order/sagas.ts b/webapp/src/modules/order/sagas.ts index 39e0567bc6..6bb3f106ab 100644 --- a/webapp/src/modules/order/sagas.ts +++ b/webapp/src/modules/order/sagas.ts @@ -1,6 +1,6 @@ import { History } from 'history' import { put, call, takeEvery, select, race, take, getContext } from 'redux-saga/effects' -import { ListingStatus, Order, RentalStatus, Trade, TradeCreation } from '@dcl/schemas' +import { ListingStatus, RentalStatus, Trade, TradeCreation } from '@dcl/schemas' import { SetPurchaseAction, SET_PURCHASE } from 'decentraland-dapps/dist/modules/gateway/actions' import { PurchaseStatus } from 'decentraland-dapps/dist/modules/gateway/types' import { isNFTPurchase } from 'decentraland-dapps/dist/modules/gateway/utils' @@ -47,7 +47,6 @@ import { fetchOrdersFailure, cancelOrderSuccessTx } from './actions' -import { getCurrentOrder } from './selectors' import { LegacyOrderFragment } from './types' import * as orderUtils from './utils' @@ -175,9 +174,7 @@ export function* orderSaga(tradeService: TradeService) { } function* handleExecuteOrderWithCardRequest(action: ExecuteOrderWithCardRequestAction) { - const { nft } = action.payload - - const order: Order = yield select(getCurrentOrder) + const { nft, order } = action.payload try { yield call(buyAssetWithCard, nft, order)