Skip to content

Commit

Permalink
nicehash: disable last api calls if not wanted
Browse files Browse the repository at this point in the history
  • Loading branch information
tpruvot committed Nov 18, 2017
1 parent b7a5625 commit 9dabe06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions web/yaamp/modules/nicehash/index_results.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
$apikey = NICEHASH_API_KEY;
$apiid = NICEHASH_API_ID;

if (!YAAMP_USE_NICEHASH_API) die();

$res = fetch_url("https://api.nicehash.com/api?method=balance&id=$apiid&key=$apikey");
$a = json_decode($res);
$balance = $a->result->balance_confirmed;
Expand Down
2 changes: 1 addition & 1 deletion web/yaamp/modules/trading/mining_results.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function WriteBoxHeader($title)
);

$res = false;
if (isset($table[$algo]))
if (isset($table[$algo]) && YAAMP_USE_NICEHASH_API)
$res = fetch_url("https://api.nicehash.com/api?method=orders.get&algo={$table[$algo]}");

if(!$res) return;
Expand Down

0 comments on commit 9dabe06

Please sign in to comment.