Fix eldorado alert float print is incorrect
Was converting the value to int and the threshold with floatval only
This commit is contained in:
@@ -13,11 +13,12 @@ class EldoradoRobuxPriceNotification extends Notification {
|
|||||||
private float $threshold;
|
private float $threshold;
|
||||||
private string $link;
|
private string $link;
|
||||||
|
|
||||||
public function __construct(int $jobId, int $price, string $link) {
|
public function __construct(int $jobId, float $price, float $threshold, string $link) {
|
||||||
parent::__construct($jobId);
|
parent::__construct($jobId);
|
||||||
|
|
||||||
$this->price = $price;
|
$this->price = $price;
|
||||||
$this->threshold = floatval(Job::find($jobId)->jobInfosTable()->get('eldorado_robux_price_threshold'));
|
$this->threshold = $threshold;
|
||||||
|
dump($this->threshold);
|
||||||
$this->link = $link;
|
$this->link = $link;
|
||||||
|
|
||||||
$this->setBody($this->generateBody());
|
$this->setBody($this->generateBody());
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ class EldoradoRobuxPriceSentryJob extends BrowserJob implements ShouldBeUniqueUn
|
|||||||
new EldoradoRobuxPriceNotification(
|
new EldoradoRobuxPriceNotification(
|
||||||
$this->jobId,
|
$this->jobId,
|
||||||
$lowestPrice,
|
$lowestPrice,
|
||||||
|
$threshold,
|
||||||
self::LINK
|
self::LINK
|
||||||
),
|
),
|
||||||
$options
|
$options
|
||||||
|
|||||||
Reference in New Issue
Block a user