ofek / bit

Bitcoin made easy.
https://ofek.dev/bit/
MIT License
1.22k stars 210 forks source link

key.get_balance() and key.balance discrepancy #50

Open hasanatkazmi opened 5 years ago

hasanatkazmi commented 5 years ago

key.get_balance() returns string type while key.balance returns int.

ghost commented 5 years ago

I can't even recall what get_balance() returns, off the top of my head. Generally though it best to do get_balance() and then refer to .balance.

But yes, sounds like this can be improved.

Hmm, maybe I'm thinking of get_unspents(). Fix for this should be trivial if get_balance() calls that, then returns the balance.