diff --git a/Site/Master-v5.master b/Site/Master-v5.master
index 2c45594f..350fbe5e 100644
--- a/Site/Master-v5.master
+++ b/Site/Master-v5.master
@@ -24,7 +24,8 @@
-
+
+
@@ -45,6 +46,7 @@
+
diff --git a/Site/Pages/v5/Financial/Donate.aspx b/Site/Pages/v5/Financial/Donate.aspx
index a1d2ab02..cd5f8952 100644
--- a/Site/Pages/v5/Financial/Donate.aspx
+++ b/Site/Pages/v5/Financial/Donate.aspx
@@ -5,80 +5,55 @@
+
+
+
+
0.001
Annual Profit To Date (Testing new code)
+
+
+
+
+
@@ -92,6 +67,7 @@
Contact the administrator for <%=this.CurrentOrganization.Name %> and ask them to enable the bitcoin hotwallet.
+
diff --git a/Site/Pages/v5/Financial/Donate.aspx.cs b/Site/Pages/v5/Financial/Donate.aspx.cs
index c5cdfc23..b5efd6a3 100644
--- a/Site/Pages/v5/Financial/Donate.aspx.cs
+++ b/Site/Pages/v5/Financial/Donate.aspx.cs
@@ -21,6 +21,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
protected void Page_Load (object sender, EventArgs e)
{
this.PageAccessRequired = new Access (this.CurrentOrganization, AccessAspect.Participant);
+ this.IsDashboard = true; // prevents encaps and enables odometer
/* TEMP TEMP TEMP - REMOVE THIS CODE */
/*
@@ -38,13 +39,11 @@ namespace Swarmops.Frontend.Pages.v5.Financial
this.PageTitle = Resources.Pages.Financial.Donate_PageTitle;
this.InfoBoxLiteral = Resources.Pages.Financial.Donate_Info;
this.LabelStatus.Text = Resources.Pages.Financial.Donate_StatusInitial;
- this.LiteralTxDetected.Text = JavascriptEscape (Resources.Pages.Financial.Donate_TransactionDetected);
if (this.CurrentOrganization.FinancialAccounts.AssetsBitcoinHot == null)
{
this.PanelDisabled.Visible = true;
this.PanelEnabled.Visible = false;
- this.LiteralEnable.Text = @"false";
}
HotBitcoinAddress address = HotBitcoinAddress.Create (this.CurrentOrganization,
@@ -88,7 +87,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
}
[WebMethod]
- static public AjaxCallResult CheckTransactionReceived (string guid, string txHash)
+ static public AjaxCallResult ProcessTransactionReceived (string guid, string txHash)
{
AuthenticationData authData = GetAuthenticationDataAndCulture(); // just to make sure we're called properly
diff --git a/Site/Pages/v5/Financial/Donate.aspx.designer.cs b/Site/Pages/v5/Financial/Donate.aspx.designer.cs
index f6a64b91..4a4050b7 100644
--- a/Site/Pages/v5/Financial/Donate.aspx.designer.cs
+++ b/Site/Pages/v5/Financial/Donate.aspx.designer.cs
@@ -12,15 +12,6 @@ namespace Swarmops.Frontend.Pages.v5.Financial {
public partial class Donate {
- ///
- /// LiteralTxDetected control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Literal LiteralTxDetected;
-
///
/// LiteralBitcoinAddress control.
///
@@ -39,15 +30,6 @@ namespace Swarmops.Frontend.Pages.v5.Financial {
///
protected global::System.Web.UI.WebControls.Literal LiteralGuid;
- ///
- /// LiteralEnable control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Literal LiteralEnable;
-
///
/// PanelEnabled control.
///
diff --git a/Site/Scripts/Swarmops-v5.js b/Site/Scripts/Swarmops-v5.js
index b28f6445..d22160e2 100644
--- a/Site/Scripts/Swarmops-v5.js
+++ b/Site/Scripts/Swarmops-v5.js
@@ -31,15 +31,26 @@ function _masterInitializeSocket(authenticationTicket) {
var message = $.parseJSON(data.data);
- if (message.messageType == "Heartbeat") {
+ if (message.MessageType == "Heartbeat") {
alertify.log("Master socket heartbeat: " + message.Timestamp);
- }
- else if (message.messageType == "SandboxUpdate") {
+ }
+ else if (message.MessageType == "BitcoinReceived") {
+ var handled = false;
+
+ if (pageBitcoinReceived != undefined) {
+ handled = pageBitcoinReceived(message.Address, message.Hash, message.Satoshis, message.Cents, message.Currency);
+ }
+
+ if (!handled) {
+ alertify.log("Bitcoin received: " + message.Currecy + " " + message.CentsFormatted);
+ }
+ }
+ else if (message.MessageType == "SandboxUpdate") {
if (odoLocalParticipation != undefined) { // Real ugly accessing specific page elements here, but it's temporary
- odoLocalParticipation.innerHTML = message.local;
- odoGlobalParticipation.innerHTML = 12345678 + message.local * 5;
- odoActiveParticipation.innerHTML = 123412 + message.local * 5;
- odoProfitLossToDate.innerHTML = (message.profit / 100.0) + 0.001;
+ odoLocalParticipation.innerHTML = message.Local;
+ odoGlobalParticipation.innerHTML = 12345678 + message.Local * 5;
+ odoActiveParticipation.innerHTML = 123412 + message.Local * 5;
+ odoProfitLossToDate.innerHTML = (message.Profit / 100.0) + 0.001;
}
}
};