Skip to content

Commit

Permalink
zero balance bug when accountRS fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
altsheets committed Jun 30, 2015
1 parent ef77996 commit e9434d6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions classes/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,18 @@ public function getAccountForgedBlocks($id, $nofee = false, $countonly = false,$

public function calculateBalance($id, $transactions = null)
{
// added by altsheets
// not sure if this is the correct fix
// but it repairs the problem
// explained in https://bitcointalk.org/index.php?topic=823785.msg11751822#msg11751822
//
if(!is_numeric($id))
{
$id = $this->fromBlockchain(array('requestType'=>'rsConvert','account'=>$id))->account;
}
// end of altsheets change
//

$account = $this->sqlEscape($id);
$received = $this->find(
'transactions',
Expand Down

0 comments on commit e9434d6

Please sign in to comment.