Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove auth for actions that only require paying for authorization #2382

Merged
merged 1 commit into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions webapp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dcl-catalyst-commons": "^9.0.1",
"decentraland-connect": "^9.1.0",
"decentraland-crypto-fetch": "^1.0.3",
"decentraland-dapps": "^24.7.0",
"decentraland-dapps": "^24.8.0",
"decentraland-transactions": "^2.18.3",
"decentraland-ui": "^6.13.0",
"decentraland-ui2": "^0.11.5",
Expand Down
6 changes: 2 additions & 4 deletions webapp/src/components/BidPage/BidModal/BidModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useCallback, useMemo } from 'react'
import { ethers } from 'ethers'
import { ChainId, Contract, Network, NFTCategory } from '@dcl/schemas'
import { ChainId, Contract, NFTCategory } from '@dcl/schemas'
import { withAuthorizedAction, ChainButton } from 'decentraland-dapps/dist/containers'
import { AuthorizedAction } from 'decentraland-dapps/dist/containers/withAuthorizedAction/AuthorizationModal'
import { toFixedMANAValue } from 'decentraland-dapps/dist/lib/mana'
Expand Down Expand Up @@ -76,11 +76,9 @@ const BidModal = (props: Props) => {

const handleConfirmBid = () => {
const { onAuthorizedAction, onClearBidError } = props
const isAuthorizationCostingGas =
asset.network === Network.ETHEREUM || (asset.network as Network.ETHEREUM | Network.MATIC) === wallet?.network

onClearBidError()
onAuthorizedAction({
manual: isAuthorizationCostingGas,
targetContractName: ContractName.MANAToken,
authorizedAddress: isBidsOffchainEnabled && !!offchainBidsContract ? offchainBidsContract.address : bids.address,
targetContract: mana as Contract,
Expand Down
3 changes: 0 additions & 3 deletions webapp/src/components/SellPage/SellModal/SellModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,7 @@ const SellModal = (props: Props) => {

const handleSubmit = () => {
onClearOrderErrors()
const isAuthorizationCostingGas =
nft.network === Network.ETHEREUM || (nft.network as Network.ETHEREUM | Network.MATIC) === wallet.network
onAuthorizedAction({
manual: isAuthorizationCostingGas,
authorizationType: AuthorizationType.APPROVAL,
authorizedAddress:
!!offchainOrdersContract && isOffchainPublicNFTOrdersEnabled ? offchainOrdersContract.address : marketplace.address,
Expand Down
Loading