symbol / symbol-sdk-typescript-javascript

This SDK has been deprecated as of January 2022.
https://www.npmjs.com/package/symbol-sdk
Apache License 2.0
103 stars 62 forks source link

No response when I register unconfirmedAdded to Listener. #779

Open xembook opened 3 years ago

xembook commented 3 years ago
  1. Expected behavior and actual behavior.

I want to get Unconfirmed transaction when someone send XYM to my account. but I can't get it by using listener.unconfirmedAdded

  1. Steps to reproduce the problem.
await listener.open();
alice = nem.Address.createFromRawAddress("NCESRRSDSXQW7LTYWMHZOCXAESNNBNNVXHPB6WY");
listener.unconfirmedAdded(alice)
.subscribe(x=>console.log(x));

subscribe was successful. image

and I send XYM by using Desktop Symbol Wallet (ver 1.0.2) but , there is no reaction.

btw,listener.confirmed works well

listener.confirmed(alice)
.subscribe(x=>console.log(x));
  1. Specifications like the version of the project, operating system, or hardware.

I use symbol-sdk-ts-js 1.0.0 which is browserified by nem2-browserify

rg911 commented 3 years ago

Do you have this issue all the time or just happened once?

xembook commented 3 years ago

this issue is all time happened. I've never been successful.

xembook commented 3 years ago

I'm sorry ,I was able to get it by setting the announcing node and the listening node to be the same. Is this a specification?

xembook commented 3 years ago

sorry again, this issue is no longer reproduced. Please keep it pending for a while.

xembook commented 3 years ago

It turns out.

If the node that announces transaction and the node that sets Listener are the same, it works fine. If I set up listener on different nodes, it may or may not succeed.

xembook commented 3 years ago

Is this phenomenon similar to this issue? https://github.com/nemtech/symbol-sdk-typescript-javascript/issues/776

xembook commented 3 years ago

I've found a strange phenomenon. After adding the following listeners, I was able to receive unconfirmedAdded notifications stably.

listener.status(alice).subscribe(x=>console.log(x));