0 balance being returned by v2/blockchain/wallet/balance
Summary
Many users are reporting that their tokens have disappeared from the Minds site, but are still present on Metamask.
- https://www.minds.com/newsfeed/1039979537764175872?referrer=nemofin
- https://www.minds.com/newsfeed/1040514369536634880?referrer=nemofin
- https://www.minds.com/newsfeed/1040389763391864832?referrer=nemofin
Steps to reproduce
- Check /wallet
Platform information
Cross-platform web.
What is the current bug behavior?
Balance returned is 0
What is the expected correct behavior?
Balance returned should be 0 only if the address holds no MINDS.
Relevant logs and/or screenshots
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
/label ~"T - Bug" ~"S - Triage:new"
added scoped labels
- Owner
This should be labeled regression
- Developer
Cause unknown at this moment, last time this kind of thing happened it was down to MetaMask defaulting their privacy settings to private mode.
I'm using Windows 7 with Brave Browser Version 0.70.123 Chromium: 78.0.3904.97 (Official Build) (32-bit). I do not have MetaMask installed on this computer. My Receiver Address on Minds is:
0x5FCBd7De4fBc2045100c4E958b2F67dbDbab18CA
I sent ETH to that address. If you look at the blockchain explorer you can see that I have sent ETH to that address: https://etherscan.io/address/0x5FCBd7De4fBc2045100c4E958b2F67dbDbab18CA
But, if you look at my wallet it shows the balance as "0".
I have a feeling this could also somehow be a misunderstanding between the expected behavior of end users and the assumptions from the developers / staff of Minds. I have never taken any of my Minds token on-chain. I have 300 Minds tokens that are offchain right now. I have never purchased Minds Tokens or ETH via the Minds website. I have never set up Crypto Wallets in Brave Browser nor have I installed MetaMask. I have never purchased ETH via SendWyre or MetaMask. I purchased my ETH on Uphold.com and sent them to my receiver address on Minds: 0x5FCBd7De4fBc2045100c4E958b2F67dbDbab18CA
Please let me know if you need more info from this system to help troubleshoot.
Edited by Fire Chiefchanged title from to
changed the description
added scoped label and automatically removed label
changed the description
assigned to @benhayward.ben
added scoped labels
- Developer
So, what seems to be happening is that v2/blockchain/wallet/balance is returning a 0 when it cannot get the balance. An error should be returned instead, indicating the failure.
It's my understanding that in the event there is a failure the token balance should be loaded by MetaMask, as it does locally. On production this is not the case. So that's a separate issue.
mentioned in merge request !396
- Developer
Proposed a solution based on Mark pointing out that we are caching the wallet balance when values are null, this is going to require some testing and likely a revision.
changed time estimate to 5h
added 3h of time spent at 2019-11-12
added scoped label and automatically removed label
@benhayward.ben wrote:
It's my understanding that in the event there is a failure the token balance should be loaded by MetaMask, as it does locally.
What if you don't use MetaMask? I sent my ETH directly to my receiver address. Shouldn't my wallet be showing the ETH balance of any ETH sent to that address?
Receiver Address = 0x5FCBd7De4fBc2045100c4E958b2F67dbDbab18CA
- Developer
Hi @onecrazychief, yes that should also be showing up, it's our blockchain API endpoint failing.