Processing BitcoinSpendReceipt

Over in our microservice manager, it is sitting quietly just waiting to see whether we dared spend any money during this session. By subscribing to the BitcoinSpendReceipt message, once it arrives, we will know whether someone attempted to, or was successful in, spending our money and, if so, how much they spent. Here's our code to handle all that:

bool ProcessBitcoinSpendReceiptMessage(BitcoinSpendReceipt msg)
{
Console.WriteLine("Received Bitcoin Spent Receipt");
RILogManager.Default?.SendInformation("Received Bitcoin Spent Receipt Message");
if (msg.success)
Console.WriteLine("Someone spent " + msg.amount + " of my bitcoins");
else
{
Console.WriteLine("Someone tried to spend " + msg.amount + " of my bitcoins");
}
return true;
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset