From d9d6199f1db07e44e75fc5a5e10920c756b9cc05 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Wed, 10 Feb 2016 03:27:38 +0100 Subject: [PATCH] some history changes --- history.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/history.lua b/history.lua index a1986d8..4c8d67c 100644 --- a/history.lua +++ b/history.lua @@ -4,7 +4,7 @@ Aux.history = public private.PUSH_INTERVAL = 57600 function private.new_record() - return { next_push = time() + private.PUSH_INTERVAL, market_values = {}, max_bids = {} } + return { next_push = time() + private.PUSH_INTERVAL, market_values = {} } end function private.load_data() @@ -98,9 +98,7 @@ function private.market_value(item_record) estimate = item_record.daily_max_bid end - if item_record.daily_max_price and item_record.daily_max_price > estimate then - estimate = min(ceil(estimate * 1.15), item_record.daily_max_price) - end + estimate = min(ceil(estimate * 1.15), item_record.daily_max_price) return estimate end @@ -121,6 +119,7 @@ function private.median(list) end function private.push_record(item_record) + local market_value = private.market_value(item_record) if market_value then tinsert(item_record.market_values, market_value)