blockchain / thunder

Off-Chain Bitcoin payments using smart contracts
https://blockchain.com/thunder
GNU Affero General Public License v3.0
554 stars 175 forks source link

Bug or feature: repeated Send subtracted from balance but not shown in Payments. #31

Open ghost opened 8 years ago

ghost commented 8 years ago

Open 2 wallets.

All in "thunder Network tab" after opening channels.

In one wallet click Receive and Close.

In the other wallet send the payment: The balance is correctly updated in both wallets The transaction is shown in Payments

Now send payment again (without opening and closing Receive in the other wallet) The balance is correctly updated in both wallets The transaction is NOT shown in Payments

Not sure if it's meant to be like that or not. (if my issue posts are annoying because the wallet is not that important let me know, no offence)

matsjj commented 8 years ago

Ah good catch! Yes that should indeed not be the case.

I think it might be because the way payments are referenced currently (only by payment hash). There will be some refactoring soonish that will allow referencing payments by some internal id, as there are some edge cases where referencing by payment hash does not work. (Normally the wallet should disallow sending a payment again, because any hub could steal the money if they know the preimage of the payment hash already).

Don't worry, the UI is just a wrapper around a lot of library methods. If it misbehaves, theres a good chance the underlying library misbehaves as well.

I will leave this issue open until I am done with the refactoring.

superac22 commented 6 years ago

thanks