ProjectOpenSea / opensea-js

TypeScript SDK for the OpenSea marketplace
https://docs.opensea.io/reference
MIT License
2.28k stars 958 forks source link

opensea-js updated to 2.0.1 api returns "You declined to authorize your offer" #394

Closed abdulkadiry closed 2 years ago

abdulkadiry commented 2 years ago

Hi, I have a node application which uses openseajs api and today I got errors saying contract address does not match. I updated opensea api to version 2.0.1 and then error changed to "You declined to authorize your offer". Is there any other library I need to update as well. It happens when I call createBuyOrder function. I tried node versions v10, v12, v17 and both gave the same error. Exception throwed at "authorizeOrder" function of opensea library. I can get balance on my wallet successfully. It feels me like problem is sth with signing the transaction.

JohnSweeney85 commented 2 years ago

Updated to 2.0.1 and getting the same message

gv1122 commented 2 years ago

also getting this

sunwrobert commented 2 years ago

Thanks for the report. Which providers are you using to sign the message?

abdulkadiry commented 2 years ago

Thanks for the report. Which providers are you using to sign the message?

I am using @truffle/hdwallet-provider with infura. I passed the provider to seaport contstructor as an argument. I tried different versions of the package but both of them gave same error. I could get balance of my account correctly.

roeeshohat commented 2 years ago

Hi, having the same issue but using wallet from, "@trufflesuite/web3-provider-engine". something noticed during debug is that the: seaport.createBuyOrder(...) it fetches a url with reference to opensea api v1. for example a bid on a pudgy penguine has the following url: 'https://api.opensea.io/api/v1/asset/0xbd3531da5cf5857e7cfaa92426877b022e612cf8/8887/?'

(just to make sure, I deleted all node_modules reinstalled all dependencies and using version 2.0.1)

JohnSweeney85 commented 2 years ago

Going from Infura to Alchemy solved this for me.

sunwrobert commented 2 years ago

Thanks for the report. Which providers are you using to sign the message?

I am using @truffle/hdwallet-provider with infura. I passed the provider to seaport contstructor as an argument. I tried different versions of the package but both of them gave same error. I could get balance of my account correctly.

What version of hdwallet-provider are you using. I was able to verify both 1.7.0 and 2.0.3 worked on my end

If you are having issues, a report of the specific versions of the wallet providers you are using would be very helpful

abdulkadiry commented 2 years ago

Thanks for the report. Which providers are you using to sign the message?

I am using @truffle/hdwallet-provider with infura. I passed the provider to seaport contstructor as an argument. I tried different versions of the package but both of them gave same error. I could get balance of my account correctly.

What version of hdwallet-provider are you using. I was able to verify both 1.7.0 and 2.0.3 worked on my end

If you are having issues, a report of the specific versions of the wallet providers you are using would be very helpful you can see my dependencies below. Which node version do you use? "dependencies": { "@0x/subproviders": "^6.6.2", "@truffle/hdwallet-provider": "^2.0.3", "dotenv": "^16.0.0", "opensea-js": "^2.0.1", "truffle-hdwallet-provider": "^1.0.17", "web3": "^1.2.2", "web3-provider-engine": "^16.0.3" }

abdulkadiry commented 2 years ago

Thanks for the report. Which providers are you using to sign the message?

I am using @truffle/hdwallet-provider with infura. I passed the provider to seaport contstructor as an argument. I tried different versions of the package but both of them gave same error. I could get balance of my account correctly.

What version of hdwallet-provider are you using. I was able to verify both 1.7.0 and 2.0.3 worked on my end If you are having issues, a report of the specific versions of the wallet providers you are using would be very helpful you can see my dependencies below. Which node version do you use? "dependencies": { "@0x/subproviders": "^6.6.2", "@truffle/hdwallet-provider": "^2.0.3", "dotenv": "^16.0.0", "opensea-js": "^2.0.1", "truffle-hdwallet-provider": "^1.0.17", "web3": "^1.2.2", "web3-provider-engine": "^16.0.3" }

Oh sorry it was my bad. I realised I used "truffle-hdwallet-provider" instead of @truffle/hdwallet-provider. When I changed problem solved