[Beem] [Version: 0.20.19] Showing wrong steem and sbd balances for some accounts

in #utopian-io5 years ago (edited)

Project Information

Expected behavior

from beem.account import Account

acc=Account("ayasha")
inf=acc.get_balances()
steem=inf['available'][0]
sbd=inf['available'][1]

print("steem {} and sbd {}".format(steem, sbd))

This piece of code should return ayashas actual steem and sbd balance . Not for her but for all steemit account in case other username being inputed.

Actual behavior

When i tried checking her balance, it showed me a wrong balance. Then i tried another two account,one of them was my own account and another one wasfreedom where my balance was showing wrong and freedom's one was accurate. Firstly i though it's a node issue, so i tried changing node, but nothing changed, where a js script/bot's result was accurate for all three account.

How to reproduce

from beem.account import Account

acc=Account("ayasha")
inf=acc.get_balances()
steem=inf['available'][0]
sbd=inf['available'][1]

print("steem {} and sbd {}".format(steem, sbd))
  • Install latest version of beem and run this code.

  • It will return you the steem and sbd balance of the account.

  • You will find the balance wrong for some account

  • It would be better trying with the mentioned account as i don't know for which which account it will show wrong balance.

Recording Of The Bug

  • Python 3.6

  • Beem version 0.20.19

  • Operating system: Ubuntu 18.06

Github Account

https://github.com/sectionshankar

Github issue

https://github.com/holgern/beem/issues/170

Sort:  

Thanks for your contribution @sourovafrin

Great to see you added this to the repo and there has been some discussion between yourself and the project owner, as you're aware the project owner has investigated this issue and come to the conclusion the reported issue is not a bug.

One thing to remember in the future is that you can wait until the PO has acknowledged the issue prior to contributing, this will help you avoid situations like this in the future :)

Thanks again for your contribution and I'm sure I will see more contributions in the near future :)


Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @tobias-g! Keep up the good work!

I can confirm, that the output of beem is different from the output of steemit.com

ayasha mit beem:

steem 0.045 STEEM and sbd 1.714 SBD

https://steemit.com/@ayasha.json:

"sbd_balance": "1.225 SBD",

I will investigate what could cause this. Thanks a lot for reporting!

Sorry for spamming,
after investigating, I'm confident that this is not a bug. The observation was, that beem shows 1.714 SBD, whereas steemtit.com shows 1.225 SBD.

After visting https://steemd.com/@ayasha, I saw that there was a claim of 0.489 SBD, which exlains the difference 1.225 + 0.489 = 1.714

So the only "bug" of beem is that it is faster than the rest :).

Nothing spam here. Now, I got the issue.
But i wonder why it wouldn't let me transfer 0.82 steem. If you have seen the full video, u must have seen i tried to transfer 0.82 steem which beem was showing. But it said i dunt have enough balance, but when i tried 0.819 the transaction had gone through.

I checked the beem code, beem just passes the values from the API node. When there is an issue, it is a steem RPC node issue.

@holger80,
I checked again and found beem calculating balance along with the unclaimed reward. Was it built on that way to show actual balance+unclaimed reward? If yes, then beem is working fine. But i don't think it's a good feature.

Try this out:

curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_accounts", "params":[["eftikhan"]], "id":1}' https://api.steemit.com

"sbd_balance":"0.412 SBD"

Where my beem bot is showing

There is some unclaimed reward in that account. But a discord js bot shows the correct one.

Let me know if you want to test, after my claim. I will keep it unclaimed.
What happened yesterday is actually, account ayasha's claimed her reward the time between ur test and my test which made us think that it was a node issue

Loading...

Most welcome. Great to see you action on the report.

I did a test without using beem, by calling the API through curl:

curl -s --data '{"jsonrpc":"2.0", "method":"database_api.find_accounts", "params": {"accounts":["ayasha"]}, "id":1}' https://api.steemit.com

results are

"sbd_balance":{"amount":"1714","precision":3,"nai":"@@000000013"}

Which is exaclty the same output which beem returns. This it is not a beem related problem

condenser returns

curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_accounts", "params":[["ayasha"]], "id":1}' https://api.steemit.com
"sbd_balance":"1.714 SBD"

Hi, @sourovafrin!

You just got a 0.44% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

You got a 96.91% upvote from @bdvoter courtesy of @sourovafrin!

Delegate your SP to us at @bdvoter and earn daily 100% profit share for your delegation & rewards will be distributed automatically daily.

500 SP, 1000 SP, 2500 SP, 5000 SP, 10000 SP.

If you are from Bangladesh and looking for community support, Join BDCommunity Discord Server & If you want to support our service, please set your witness proxy to BDCommunity.

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.034
BTC 64136.70
ETH 3128.20
USDT 1.00
SBD 3.94