symbol-sdk-typescript-javascript icon indicating copy to clipboard operation
symbol-sdk-typescript-javascript copied to clipboard

No response when I register unconfirmedAdded to Listener.

Open xembook opened this issue 4 years ago • 7 comments

  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

xembook avatar Apr 20 '21 08:04 xembook

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

rg911 avatar Apr 20 '21 11:04 rg911

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

xembook avatar Apr 20 '21 13:04 xembook

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 avatar Apr 20 '21 14:04 xembook

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

xembook avatar Apr 20 '21 14:04 xembook

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 avatar Apr 21 '21 03:04 xembook

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

xembook avatar Apr 21 '21 07:04 xembook

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));

xembook avatar Apr 22 '21 05:04 xembook