Skip to content

Commit

Permalink
fix(nfts): use transferFrom instead of safeTransferFrom for selling e…
Browse files Browse the repository at this point in the history
…rc721
  • Loading branch information
plondon committed Nov 29, 2021
1 parent e10eb3a commit ec7370e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/blockchain-wallet-v4/src/redux/payment/nfts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,10 @@ export const encodeSell = (schema, asset, address) => {
])
} else if (schema.name === 'ERC721') {
const tokenInterface = new ethers.utils.Interface(ERC721_ABI)
calldata = tokenInterface.encodeFunctionData('safeTransferFrom', [
calldata = tokenInterface.encodeFunctionData('transferFrom', [
address.toLowerCase(),
NULL_ADDRESS,
asset.token_id,
[]
asset.token_id
])
} else {
throw new Error(`Unsupported Asset Standard: ${schema.name}`)
Expand Down Expand Up @@ -1363,7 +1362,7 @@ async function approveSemiOrNonFungibleToken({
`Transaction receipt : https://www.etherscan.io/tx/${receipt.logs[1].transactionHash}\n`
)
const approvalCheck = await approvalAllCheck()
if (approvalCheck !== 1) {
if (!approvalCheck) {
return null
}
}
Expand Down

0 comments on commit ec7370e

Please sign in to comment.