question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

addListener on openseaSDK not firing

See original GitHub issue

I’m using the openseaSDK and using the addListener to listen to these events:

  1. transaction gets created
  2. transaction fails
  3. transaction gets denied

I can’t get the listeners to fire, any ideas why this might be happening?

const provider = new HDWalletProvider(
        walletPrivateKey,
        envConfig.alchemyProvider
);

const openseaSDK = new OpenSeaSDK(provider, {
  networkName: envConfig.openseaNetworkName,
  apiKey: envConfig.openseaApiKey
});

openseaSDK.addListener(EventType.TransactionCreated,async ({ transactionHash, event }) => {
    console.log(transactionHash); 
});

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

2reactions
kakuggcommented, Jun 24, 2022

This just return events from your accounts.

0reactions
trivonhancommented, Nov 11, 2022

@neocho Here is my createSellOrder function image This is how I use addListener: image What is the correct way to use the listener?

Read more comments on GitHub >

github_iconTop Results From Across the Web

addEventListener drop not firing - Stack Overflow
I am trying to attach a drop event to an HTML div: document.getElementById('sub-main').addEventListener("drop", ...
Read more >
Opensea-js-darwin NPM
No more needing to worry about the exchange rate: ... Events are fired whenever transactions or orders are being created, ... addListener(EventType.
Read more >
niehongbo/opensea-js - Gitee
Events are fired whenever transactions or orders are being created, and when transactions return receipts from recently mined blocks on the Ethereum blockchain....
Read more >
Why is my .addEventListener not working for all elements of ...
addEventListener not working for all elements of the same class? (Basic Question). I want to create and register a JavaScript event handler ...
Read more >
Unable to create sell order with OpenSea SDK, but no errors ...
I'm learning how to use the OpenSea SDK in Node.js (found here) by referring to its example OpenSea Creatures. The SDK links to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found