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

is the onOutputreceived callback supposed to be called for a viewonly wallet? #105

Open
spirobel opened this issue Sep 28, 2022 · 5 comments

Comments

@spirobel
Copy link

is the onOutputreceived callback supposed to be called for a viewonly wallet?
I am only seeing calls to onBalancesChanged, but the onOutputReceived callback does not get called when I receive money.
Is this expected behavior, or should the onOutputReceived callback also be called?
OnNewBlock also works fine.

@woodser
Copy link
Owner

woodser commented Sep 28, 2022

Yes I'm seeing onOutputReceived() is called correctly for view-only wallets (when receiving funds from a different source account).

@spirobel
Copy link
Author

hm... for me it does not call onOutputReceived() while the other callbacks work fine. Do you look at the wasm wallet or the rpc wallet? I also copy and pasted the code directly from a known working webapp that I wrote earlier.
I also see the transactions show up when I do a call to getTxs(). I spent a while trying all kinds of random things to get it to work, but maybe a different approach is better. I could also use the onNewBlock() callback to do a getTx() for the last 10 blocks and supply the clients with this information instead. (I am writing a small tool similar to the wallet-rpc using expressjs and the monero-javascript library)

@woodser
Copy link
Owner

woodser commented Sep 29, 2022

I tested with the wasm wallet. Are you using the wasm wallet or rpc?

@spirobel
Copy link
Author

I use the wasm wallet with the latest 0.7.4 version of monero-javascript. I will go the getTxs() route for now, it has the added advantage that the clients receive updates on the numbers of confirmations as they happen and it seems more robust.

@woodser
Copy link
Owner

woodser commented Sep 30, 2022

It's very odd it doesn't work. I tested specifically that it's triggered at 0 confirmations and 1 confirmation. If you're able to isolate the issue or post something reproducible, I'm happy to take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants