Committing sprint build
This commit is contained in:
@@ -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
|
||||
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user