Skip to content

Commit

Permalink
fix: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmahidalgo committed Oct 29, 2024
1 parent bd63223 commit 0313bd1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
17 changes: 13 additions & 4 deletions webapp/src/components/SettingsPage/Authorization/Authorization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -88,7 +97,7 @@ const Authorization = (props: Props) => {
values={{
contract_link: (
<TransactionLink address={authorizedAddress} txHash="" chainId={authorization.chainId}>
{contract.label || contract.name}
{name}
</TransactionLink>
),
symbol: token.name,
Expand Down
7 changes: 2 additions & 5 deletions webapp/src/modules/order/sagas.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -47,7 +47,6 @@ import {
fetchOrdersFailure,
cancelOrderSuccessTx
} from './actions'
import { getCurrentOrder } from './selectors'
import { LegacyOrderFragment } from './types'
import * as orderUtils from './utils'

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0313bd1

Please sign in to comment.