opensea-js icon indicating copy to clipboard operation
opensea-js copied to clipboard

Approving transactions on `createSellOrder` after transactions have been approved

Open Schwartz10 opened this issue 5 years ago • 2 comments

Hey @alexanderatallah - here's another one for you:

I'm testing some stuff on rinkeby, and on the OpenSea UI, I've already approved this token for trading via the OpenSea proxy. But when i ran my script which lists ~100 1155 tokens at once, it appears as though opensea.js invokes another transaction:

{ code: -32000, message: 'already known' }
(node:51192) UnhandledPromiseRejectionWarning: Error: Error: Couldn't get permission to approve these tokens for trading. Their contract might not be implemented correctly. Please contact the developer!
    at _callee5$ (/Users/jonathanschwartz/Documents/Collectible/scripts.js:324:43)
    at tryCatch (/Users/jonathanschwartz/Documents/Collectible/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/Users/jonathanschwartz/Documents/Collectible/node_modules/regenerator-runtime/runtime.js:293:22)
    at Generator.throw (/Users/jonathanschwartz/Documents/Collectible/node_modules/regenerator-runtime/runtime.js:118:21)
    at asyncGeneratorStep (/Users/jonathanschwartz/Documents/Collectible/scripts/list.js:3:103)
    at _throw (/Users/jonathanschwartz/Documents/Collectible/scripts/list.js:5:291)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:51192) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:51192) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
{ code: -32000, message: 'already known' }
Transaction started: Approving all tokens of this type for trading
{ code: -32000, message: 'already known' }
{ code: -32000, message: 'already known' }
{ code: -32000, message: 'already known' }
{ code: -32000, message: 'already known' }
{ code: -32000, message: 'already known' }
{ code: -32000, message: 'already known' }
Transaction succeeded: Approving all tokens of this type for trading
Order hashes match
Transaction succeeded: Approving all tokens of this type for trading
Order hashes match

When i ran the script again, it worked fine and all tokens were listed. Any idea why I'd have to approve another transaction?

Schwartz10 avatar Feb 09 '21 18:02 Schwartz10

maybe you should adjust the gas limit

swr1bm86 avatar Aug 27 '21 04:08 swr1bm86

@Schwartz10, are you still having this issue of having to approve another transaction?

esteban-OpenSea avatar Mar 07 '22 17:03 esteban-OpenSea