zenon-network / syrius

MIT License
17 stars 14 forks source link

Auto-received transaction before Node Management screen preferences are set #91

Closed coinselor closed 3 months ago

coinselor commented 3 months ago

Describe the bug A pending transaction was auto received during the initial flow when reinitializing a wallet.

To Reproduce Steps to reproduce the behavior:

  1. Disable auto-receive. Receive a pending transaction.
  2. Reset and reinitialize the wallet.
  3. At the Node Management screen, the transaction will be automatically received (check screenshot).

Expected behavior Transaction should remain unreceived until the user confirms his settings by clicking 'continue'. Alternatively, start with the wallet options to auto-receive disabled, and process then transaction when user checks the auto-receive setting checkbox.

Actual behavior As soon as the Node Management screen appears, a notification with 'Transaction received on Address 1' also appears.

Workaround None found.

Screenshots

image

Desktop (please complete the following information):

Additional context is a connection to synced znnd not needed to receive a transaction? I ask because this was processed when 'embedded node' was the default selection. Unless syrius has some sort of cache for the previously used node.zenonhub.io remote node, the transaction should have not been received.

Bounty program

KingGorrin commented 3 months ago

I think the initial connection is not properly disposed when resetting the wallet. Will investigate further...

coinselor commented 3 months ago

I think there is related issue when removing a node from community-nodes.json. If the node you removed was previously active before restarting syrius, it will still show up in the node management settings widget. I'm not gonna make a new issue for it, seems like a very similar thing, unless you think I should.

KingGorrin commented 3 months ago

I think there is related issue when removing a node from community-nodes.json. If the node you removed was previously active before restarting syrius, it will still show up in the node management settings widget. I'm not gonna make a new issue for it, seems like a very similar thing, unless you think I should.

This is by design. It will automatically add the previously connected node if it is not in the node list.

coinselor commented 3 months ago

It will automatically add the previously connected node if it is not in the node list.

However, It will not be added to the community-nodes.json list. Meaning, it will not persist in the future, once you change to a new one, it won't show up anymore. Just making sure that's intended, maybe we should add it to the file?