break even
This commit is contained in:
@@ -414,16 +414,7 @@ final class AnalyticsService
|
||||
'cash'
|
||||
)
|
||||
: null;
|
||||
$reinvestedCapital = $latestCurrency !== ''
|
||||
? $this->totalInvestmentBasis(
|
||||
is_array($settings['cost_plans'] ?? null) ? $settings['cost_plans'] : [],
|
||||
$purchasedMiners,
|
||||
$latestMeasuredTs,
|
||||
$latestCurrency,
|
||||
$latest,
|
||||
'reinvest'
|
||||
)
|
||||
: null;
|
||||
$reinvestedCapital = null;
|
||||
$walletBalances = $this->walletBalances($payouts, $walletWithdrawals, $purchasedMiners, 0);
|
||||
$latestWalletSnapshot = $this->latestWalletSnapshot(is_array($options['wallet_snapshots'] ?? null) ? $options['wallet_snapshots'] : []);
|
||||
$latestWalletSnapshotTs = is_array($latestWalletSnapshot)
|
||||
@@ -467,6 +458,9 @@ final class AnalyticsService
|
||||
$settledCryptoSpendValue = $latestCurrency !== ''
|
||||
? $this->settledCryptoSpendValue($purchasedMiners, $latestCurrency, $latest)
|
||||
: null;
|
||||
// Reinvestments are spent coins, not a current crypto holding. Their historical
|
||||
// settlement value is therefore the only valid break-even display basis.
|
||||
$reinvestedCapital = $settledCryptoSpendValue;
|
||||
$settledCryptoSpendCurrentAsset = $latestAsset !== ''
|
||||
? $this->settledCryptoSpendValue($purchasedMiners, $latestAsset, $latest)
|
||||
: null;
|
||||
|
||||
Reference in New Issue
Block a user