Skip to content

Commit

Permalink
trading: wrong balance fields for Cryptopia (#323)
Browse files Browse the repository at this point in the history
Fixing a typo in balance update:
$market->balance was updated by $balance->HeldForTrades but should be $balance-.Available
This caused properly updated balance in previous loop to be overwritten by wrong value.
  • Loading branch information
mantlik authored and tpruvot committed Oct 9, 2018
1 parent ca3da8a commit 46d40cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/yaamp/core/trading/cryptopia_trading.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ function doCryptopiaTrading($quick=false)

$market = getdbosql('db_markets', "coinid=:coinid AND name='cryptopia'", array(':coinid'=>$coin->id));
if(!$market) continue;
$market->balance = $balance->HeldForTrades;
$market->balance = $balance->Available;
$market->ontrade = $balance->HeldForTrades;
$market->message = $balance->StatusMessage;

$orders = NULL;
Expand Down

0 comments on commit 46d40cd

Please sign in to comment.