mirror of
https://git.astronand.dev/minecartchris/Stock-Game.git
synced 2026-06-21 14:30:57 -04:00
fixed my local git server
This commit is contained in:
@@ -202,7 +202,7 @@ async function buyAll() {
|
||||
const stockPrice = stocks[stockId - 1]['price'];
|
||||
|
||||
// Calculate maximum amount we can buy
|
||||
const maxAmount = Math.floor(balance / stockPrice);
|
||||
const maxAmount = Math.min(Math.floor(balance / stockPrice), 999999999999999999);
|
||||
|
||||
if (maxAmount <= 0) {
|
||||
showError('Insufficient funds to buy any shares of this stock');
|
||||
@@ -248,7 +248,7 @@ async function sellAll() {
|
||||
const gameStateData = await gameStateResponse.json();
|
||||
|
||||
const holdings = gameStateData.holdings;
|
||||
const amountToSell = holdings[stockId - 1]['amount'];
|
||||
const amountToSell = Math.min(holdings[stockId - 1]['amount'], 999999999999999999);
|
||||
|
||||
if (amountToSell <= 0) {
|
||||
showError('You do not own any shares of this stock');
|
||||
|
||||
Reference in New Issue
Block a user