Committing sprint build

This commit is contained in:
Rick Falkvinge
2016-01-04 11:30:06 +01:00
parent a18ff0c559
commit 97660b4217
2 changed files with 16 additions and 9 deletions
+13 -3
View File
@@ -223,17 +223,27 @@ namespace Swarmops.Logic.Financial
new WebClient().DownloadString("https://blockchain.info/address/" + address + "?format=json&api_key=" +
SystemSettings.BlockchainSwarmopsApiKey)); // warn: will 500 if no unspent outpoints
// TODO: PARSE (awaiting functions for native currency to be added to FinancialTransactionRows)
int transactionCount = (int)(addressData["n_tx"]);
foreach (var tx in addressData["txs"])
{
string blockchainTransactionId = (string) tx["hash"];
FinancialTransaction ourTx = FinancialTransaction.FromBlockchainHash (parent.Organization, blockchainTransactionId);
try
{
FinancialTransaction ourTx = FinancialTransaction.FromBlockchainHash(parent.Organization, blockchainTransactionId);
// If the transaction was fetched fine, we have already seen this transaction, and all is fine
}
catch (ArgumentException)
{
// We didn't have this transaction, so we need to create it
// Did we lose or gain money?
// Find all in- and outpoints, determine which are ours (hot and cold wallet) and which aren't
}
}
// TODO: PARSE (awaiting functions for native currency to be added to FinancialTransactionRows)
// TODO: CONTINUE HERE
}
+3 -6
View File
@@ -579,23 +579,20 @@ namespace Swarmops.Logic.Financial
}
else if (payout.RecipientPerson != null && payout.RecipientPerson.BitcoinPayoutAddress.Length < 3 && payout.Account.Length < 4)
{
// There is a payout for this person, but they don't have a bitcoin payout address set. Send notification to this effect twice a day.
// There is a payout for this person, but they don't have a bitcoin payout address set. Send notification to this effect once a day.
// DISABLE THIS FOR TIME BEING
/*
if (utcNow.Minute != 0)
{
continue;
}
if (utcNow.Hour % 12 != 0)
if (utcNow.Hour != 12)
{
continue;
}
NotificationStrings primaryStrings = new NotificationStrings();
primaryStrings[NotificationString.OrganizationName] = organization.Name;
OutboundComm.CreateNotification(organization, NotificationResource.BitcoinPayoutAddress_PleaseSet, primaryStrings, People.FromSingle(payout.RecipientPerson));*/
OutboundComm.CreateNotification(organization, NotificationResource.BitcoinPayoutAddress_PleaseSet, primaryStrings, People.FromSingle(payout.RecipientPerson));
}
}