From 9fbb1b435b23f7517546e172b33d8928348c378a Mon Sep 17 00:00:00 2001 From: RunOnFlux Date: Tue, 26 Nov 2024 14:56:29 +0000 Subject: [PATCH] Update from https://github.com/RunOnFlux/flux/commit/6aa9577c2a7520e1f5c183dbc4a2625d9f485737 --- services/appsService.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/appsService.js b/services/appsService.js index f3299a45..fe7bffe9 100644 --- a/services/appsService.js +++ b/services/appsService.js @@ -10217,14 +10217,14 @@ async function getAppFluxOnChainPrice(appSpecification) { const priceSpecifications = intervals[intervals.length - 1]; // filter does not change order const appInfo = await dbHelper.findOneInDatabase(database, globalAppsInformation, query, projection); const defaultExpire = config.fluxapps.blocksLasting; // if expire is not set in specs, use this default value - let actualPriceToPay = await appPricePerMonth(appSpecFormatted, daemonHeight, appPrices, true); + let actualPriceToPay = await appPricePerMonth(appSpecFormatted, daemonHeight, appPrices); const expireIn = appSpecFormatted.expire || defaultExpire; // app prices are ceiled to highest 0.01 const multiplier = expireIn / defaultExpire; actualPriceToPay *= multiplier; actualPriceToPay = Math.ceil(actualPriceToPay * 100) / 100; if (appInfo) { - let previousSpecsPrice = await appPricePerMonth(appInfo, daemonHeight, appPrices, true); // calculate previous based on CURRENT height, with current interval of prices! + let previousSpecsPrice = await appPricePerMonth(appInfo, daemonHeight, appPrices); // calculate previous based on CURRENT height, with current interval of prices! let previousExpireIn = previousSpecsPrice.expire || defaultExpire; // bad typo bug line. Leave it like it is, this bug is a feature now. if (daemonHeight > 1315000) { previousExpireIn = appInfo.expire || defaultExpire; @@ -10376,7 +10376,7 @@ async function getAppFiatAndFluxPrice(req, res) { } let actualPriceToPay = 0; const defaultExpire = config.fluxapps.blocksLasting; // if expire is not set in specs, use this default value - actualPriceToPay = await appPricePerMonth(appSpecFormatted, daemonHeight, appPrices, true); + actualPriceToPay = await appPricePerMonth(appSpecFormatted, daemonHeight, appPrices); const expireIn = appSpecFormatted.expire || defaultExpire; // app prices are ceiled to highest 0.01 const multiplier = expireIn / defaultExpire; @@ -10384,7 +10384,7 @@ async function getAppFiatAndFluxPrice(req, res) { actualPriceToPay = Number(actualPriceToPay).toFixed(2); const appInfo = await dbHelper.findOneInDatabase(database, globalAppsInformation, query, projection); if (appInfo) { - let previousSpecsPrice = await appPricePerMonth(appInfo, daemonHeight, appPrices, true); // calculate previous based on CURRENT height, with current interval of prices! + let previousSpecsPrice = await appPricePerMonth(appInfo, daemonHeight, appPrices); // calculate previous based on CURRENT height, with current interval of prices! let previousExpireIn = previousSpecsPrice.expire || defaultExpire; // bad typo bug line. Leave it like it is, this bug is a feature now. if (daemonHeight > 1315000) { previousExpireIn = appInfo.expire || defaultExpire;