Added check for hotwallet forex profit/loss

This commit is contained in:
Rick Falkvinge
2018-05-15 17:15:41 +02:00
parent c60ee5309e
commit afea96aced
7 changed files with 134 additions and 33 deletions
+14
View File
@@ -841,6 +841,20 @@ namespace Swarmops.Backend
account.CheckForexProfitLoss();
}
}
// Also check the bitcoin hotwallets for forex profit/loss as a special case of the above.
Organizations allOrganizations = Organizations.GetAll();
foreach (Organization organization in allOrganizations)
{
FinancialAccount hotWalletAccount = organization.FinancialAccounts.AssetsBitcoinHot;
if (hotWalletAccount != null)
{
BitcoinUtility.CheckHotwalletForexProfitLoss(hotWalletAccount);
}
}
}
catch (Exception e)
{