Skip to content

Commit

Permalink
Correction to accounts page JS error, show fee adjusted odds in explo…
Browse files Browse the repository at this point in the history
…rer events view & added buy btn to wallet when user has no coins.
  • Loading branch information
joeyfrich committed Jun 15, 2019
1 parent 857b401 commit 5e58ffb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion accounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
else $selected_account_id = false;
?>
<script type="text/javascript">
var selected_account_id = <?php echo $selected_account_id; ?>;
var selected_account_id = <?php if ($selected_account_id) echo $selected_account_id; else echo 'false'; ?>;
</script>

<div class="panel panel-info" style="margin-top: 15px;">
Expand Down
5 changes: 4 additions & 1 deletion classes/Game.php
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ public function event_outcomes_html($from_event_index, $to_event_index, $thisuse
}

if ($winning_effective_coins > 0) {
$winner_odds = $event_effective_bets/$winning_effective_coins;
$winner_odds = $db_event['payout_rate']*$event_effective_bets/$winning_effective_coins;
$html .= "x".$this->blockchain->app->round_to($winner_odds, 2, 4, true)." &nbsp;&nbsp; ";
}

Expand Down Expand Up @@ -1604,6 +1604,9 @@ public function select_input_buttons($user_game) {
$html = "<p>";
if ($mature_ios->rowCount() == 0) {
$html .= "You need ".$this->db_game['coin_name_plural']." to bet. To deposit ".$this->db_game['coin_name_plural'].", visit <a href=\"/accounts/?account_id=".$user_game['account_id']."\">your accounts page</a> to see a list of your addresses.";
if ($this->db_game['buyin_policy'] != "none") {
$html .= '<br/><button class="btn btn-sm btn-success" style="margin-top: 8px;" onclick="manage_buyin(\'initiate\');"><i class="fas fa-shopping-cart"></i> &nbsp; Buy '.$this->db_game['coin_name_plural'].'</button>';
}
}
$html .= "</p>\n";
$input_buttons_html = "";
Expand Down

0 comments on commit 5e58ffb

Please sign in to comment.