jfm-so / piWallet

piWallet is an open source program developed by Johnathan Martin that allows almost anyone to setup an online web wallet for a cryptocurrency.
258 stars 310 forks source link

Accounts and double sending issue #68

Open ghost opened 6 years ago

ghost commented 6 years ago

First i want to mention that i have this line popup in transaction list: Notice: Undefined index: fee in /view/wallet.php on line 126 Most important is that i received coins in balance, confirmed fully, then i sent half of the amount to external address. What happend is that 2 transactions was executed in the same time, one correctly went to provided address CYcqnPo9i2DhPWWWZ5sJvW2Jp7R4kJAHvY, , the 2nd one went to wallet daemon address, CcFY4raVU9DVgQucbQ3edoDWp8BJ1dZMYk that is not associated with any account. Current balance went to: 0.00000000 coins. Then i associated address with my account, anyway, balance is still 0.

wallet

I'll appreciate any help, i am missing something here.

In addition, when i changed the password, i noticed also my balance went to '0'. So i was locked out of my coins.

ghost commented 6 years ago

I reproduced the issue of creating 2 transactions in the same, which is strange. I am sending just 1 transaction, and automatically, in the same second another tx has been made, which goes to first generic daemon address. Anyone can help here? What i am missing? Why PI wallet behave like that?

wallet-pi

and again..

pi

ghost commented 6 years ago

It seems that daemon wallet after sending tx, generates another tx which is called "change" and change is sent to newly created address which piWallet cannot add to existing account or recognize. So how to solve this? Is there maybe conf file rule to stop daemon to generate new addresses for every change that tx creates? Something that tells daemon to send change back to sending address. That could be workaround, but final solution should be that piwallet should "see" , "display" and "add to same account" the new generated address for change. So change could be spendable. If someone have solution to this, piWallet could be widely accepted.

Hser2bio commented 5 years ago

same problem here, did you fix?

regtable commented 4 years ago

you cannot disable change addresses in bitcoin or any clone of due to address reuse and anonimity change addresses belong to the parent (sender) so will always belong to the acountee. one of the reasons you cant stake on a pos coin is because of this same issue except it doubles the accounts balance as no output is made but input recieved.

look for the code scriptChange.SetDestination(vchPubKey.GetID()); and change that to something like scriptChange.SetDestination(vIn.PubKey.GetID()); by rights done correctly will return change to the senders address but is not advisable above code is axample untested and probably will not work however knowledgable people can make it work. why they would want to is beyond me

krewshul commented 4 years ago

i know in some qt wallets.. you can set a default change address. setting that in piwallet DB should alleviate the issue. so you will have a new user basically known as change.

regtable commented 4 years ago

That would work for single use application but I was going to use it for multiple users making that not really easy to work with. Still testing it out to find a way I can work with it but I may just end up making a custom thing.

On Fri, 12 Jun 2020, 01:18 krewshul, notifications@github.com wrote:

i know in some qt wallets.. you can set a default change address. setting that in piwallet DB should alleviate the issue. so you will have a new user basically known as change.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/johnathanmartin/piWallet/issues/68#issuecomment-642993387, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2BKFYO7Q6WOOF3ITWZUB3RWFX7BANCNFSM4E7SJHEQ .