hivewallet / hive-js

Hive digital currency wallet
http://www.hivewallet.com
GNU General Public License v2.0
81 stars 57 forks source link

Balance display is off #228

Closed ghost closed 9 years ago

ghost commented 9 years ago

Quote from a user email:

Once I'm in the wallet, it shows the wrong balance. Right now it shows 0 BTC. But on the history tab, I can see all of my transactions. They are (most recent first): -0.52278527 + -0.00304 + 0.00416 + -0.00304 + 0.00294 + -0.00312 + 0.00333 + -0.00100 + 0.00100 + 0.08566 + 0.06395 + 0.01407 + 0.07582 + 0.08852 + 0.08634 + 0.08836 + -0.00980 + -0.00780 + 0.03710 + -0.00990 + 0.00950 + -0.01000 + -0.01000 + 0.00100 + -0.01000 + -0.02150 + 0.04940 + 0.00200 If you add all that up, you get 0.00116473, but my balance is reported as 0.

When attempting to login, I see a couple of external resources that fail for various reasons: 403's like: https://hivewallet.cloudant.com/?_nonce=Rmq6llaua8D5gdPX 404's like: https://hivewallet.cloudant.com/hivec09ad2cb2ef31181f29c1eedc6df0c42f8592bdcf36aa9419ee58460cd438822/_local/s0jDOigwdKwGaFbdvyOgzw==?_nonce=f95OTiwypwxSV8In

weilu commented 9 years ago

Sounds like a bug. I'll take a look.

weilu commented 9 years ago

The 403 and 404 are normal

undefx commented 9 years ago

The affected wallet only has a small amount of BTC in it, and I'm happy to share the pass phrase to help you debug.

ghost commented 9 years ago

@undefx Removed the pass phrase because I don't trust that someone won't grab your BTC :)

mackuba commented 9 years ago

Um, that wasn't a good idea, that might have been sent in various email notifications and so on (e.g. it appeared on our Slack)... you should probably consider that wallet compromised and create a new one.

undefx commented 9 years ago

@jsuder Thanks for the word of caution, and I do understand that in general sharing a pass phrase is a really bad idea. In this specific instance though I intentionally posted that phrase in the hopes that it will be useful to the dev(s) who need to reproduce the issue. Of course I don't plan to ever recover the funds within, which are minimal anyway.

weilu commented 9 years ago

Funny story. The balance calculation is fine. The sent amount displayed is exclusive of fees. In the given example there are 12 outgoing transactions each with a fee of 0.0001BTC. 12 * 0.0001 = 0.0012, close to 0.00116473. 0.00116473 is a result of us only displaying up to 6 decimal places rather than 8.

weilu commented 9 years ago

Deployed 0.3.2 to staging: https://hive-js.herokuapp.com/. History page amounts are no longer truncated.

undefx commented 9 years ago

Thanks for no longer truncating, but I'm still having this issue (wrong balance) in another wallet. My balance should be ~0.52 BTC, but the page only shows 0.0013 BTC. As a result, I can't move the funds to another wallet because it thinks that I have insufficient funds for any transaction of more than 0.0013 BTC (minus fee). Since this wallet has a non-trivial balance, I'll just post a screenshot for now. Let me know how else I can help.

wrong_balance

weilu commented 9 years ago

@undefx does production have the same issue? https://web.hivewallet.com If not, please use prod to move your funds out and then share your passphrase with support@hivewallet.com. If the same issue presents on the current production version of hive wallet, I will have to ask you to share your passphrase at the support email address without moving the fund. Once we identify the issue, we will reimburse the amount.

undefx commented 9 years ago

Prod works! I will move the funds out and send the passphrase momentarily. New screenshot:

balance

Thanks for the help, you guys rock.

weilu commented 9 years ago

Thank you for finding a serious bug for us :)

jacob101fishy commented 9 years ago

I'm having the same problem as undefx, my account should be at around ~0.3 btc, I tried logging into https://web.hivewallet.com/ but it says my pin is invalid for that wallet, and my wallet is only accessible through https://hive-js.herokuapp.com/

http://imgur.com/t5Nvt2Q

ghost commented 9 years ago

@jacob101fishy Thanks for the report. We'll get the stuff on Heroku deployed to web.hivewallet.com soon.

weilu commented 9 years ago

@jacob101fishy use https://web.hivewallet.com/ and try with the same pin 5 times, it will ask you to enter your 12-word passphrase and reset your pin. Then you can move your funds.

jacob101fishy commented 9 years ago

@weilu tried entering my pin more than five times and nothing happened just kept telling me my pin was incorrect

jacob101fishy commented 9 years ago

@weilu Got it to work I had to reopen my browser in incognito mode but it finally let me change my pin and my btc balance is what it should be

weilu commented 9 years ago

Instead of incognito, you can also try clearing the browser cache & cookies for hivewallet.com. Regardless, I'm in the process of deploying a fix to our staging site https://hive-js.herokuapp.com/. @jacob101fishy if you haven't moved your funds, let me know if your balance issue is fixed on staging.

jacob101fishy commented 9 years ago

@weilu Yes Ive moved my funds and everything is good to go, thanks for the help it was much appreciated(: