From e497cafa2a52820e609d9dbdc03524ba4b7c6adc Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Thu, 23 Nov 2017 15:23:29 +0100 Subject: [PATCH] Cosmetics --- Site/App_GlobalResources/Pages.Admin.designer.cs | 8 ++++---- Site/App_GlobalResources/Pages.Admin.resx | 11 +++++------ Site/Pages/v5/Admin/BitcoinEchoTest.aspx | 6 ++++-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Site/App_GlobalResources/Pages.Admin.designer.cs b/Site/App_GlobalResources/Pages.Admin.designer.cs index c3191935..b1f24582 100644 --- a/Site/App_GlobalResources/Pages.Admin.designer.cs +++ b/Site/App_GlobalResources/Pages.Admin.designer.cs @@ -61,7 +61,7 @@ namespace Resources.Pages { } /// - /// Looks up a localized string similar to This is a QR code for bitcoin echo testing for {0}. Read it from your phone's bitcoin wallet to perform the echo test, or donate from your computer directly to [{1}] (that's a Bitcoin Cash address). The amount (less miner fees) will be sent back to you in the next auto-payment cycle which runs every five minutes.. + /// Looks up a localized string similar to This is a QR code for bitcoin echo testing for this entire Swarmops installation, not just for {0}. Read it from your phone's bitcoin wallet to perform the echo test, or donate from your computer directly to [{1}] (that's a Bitcoin Cash address). The amount (less miner fees) will be sent back to you in the next few seconds.. /// internal static string BitcoinEchoTest_Explain { get { @@ -70,7 +70,7 @@ namespace Resources.Pages { } /// - /// Looks up a localized string similar to Received {0} {1:N2} ({2:N0} microcoins or "bits"). They will be sent back shortly (less miner fee).. + /// Looks up a localized string similar to Received {2:N2} microcoins ({0} {1:N2}). Returning.. /// internal static string BitcoinEchoTest_FundsReceived { get { @@ -79,7 +79,7 @@ namespace Resources.Pages { } /// - /// Looks up a localized string similar to Received {0} microcoins ("bits"). They will be sent back shortly (less miner fee).. + /// Looks up a localized string similar to Received {0} microcoins ("bits"). Returning.. /// internal static string BitcoinEchoTest_FundsReceivedNative { get { @@ -124,7 +124,7 @@ namespace Resources.Pages { } /// - /// Looks up a localized string similar to Bitcoin Echo Test for {0}. + /// Looks up a localized string similar to Swarmops Bitcoin Echo Test. /// internal static string BitcoinEchoTest_TxLabel { get { diff --git a/Site/App_GlobalResources/Pages.Admin.resx b/Site/App_GlobalResources/Pages.Admin.resx index d7c047eb..335c8cb8 100644 --- a/Site/App_GlobalResources/Pages.Admin.resx +++ b/Site/App_GlobalResources/Pages.Admin.resx @@ -118,16 +118,16 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - This is a QR code for bitcoin echo testing for {0}. Read it from your phone's bitcoin wallet to perform the echo test, or donate from your computer directly to [{1}] (that's a Bitcoin Cash address). The amount (less miner fees) will be sent back to you in the next auto-payment cycle which runs every five minutes. + This is a QR code for bitcoin echo testing for this entire Swarmops installation, not just for {0}. Read it from your phone's bitcoin wallet to perform the echo test, or donate from your computer directly to [{1}] (that's a Bitcoin Cash address). The amount (less miner fees) will be sent back to you in the next few seconds. The {0} is the organization name. {1} is the bitcoin address for donations. - Received {0} {1:N2} ({2:N0} microcoins or "bits"). They will be sent back shortly (less miner fee). + Received {2:N2} microcoins ({0} {1:N2}). Returning. {0} is native currency, {1} is amount in native currency - Received {0} microcoins ("bits"). They will be sent back shortly (less miner fee). - Used if BTC is the org native currency. + Received {0} microcoins ("bits"). Returning. + Used if Bitcoin Cash is the org native currency. This is a bitcoin echo test. It tests the hotwallet. If you send a small amount here, it will be sent back to you, minus the sendback transaction fee. @@ -142,8 +142,7 @@ Transaction detected, verifying... - Bitcoin Echo Test for {0} - The {0} is the organization name + Swarmops Bitcoin Echo Test Activists will be called diff --git a/Site/Pages/v5/Admin/BitcoinEchoTest.aspx b/Site/Pages/v5/Admin/BitcoinEchoTest.aspx index 7af955b6..ad20f462 100644 --- a/Site/Pages/v5/Admin/BitcoinEchoTest.aspx +++ b/Site/Pages/v5/Admin/BitcoinEchoTest.aspx @@ -45,8 +45,10 @@ json, function (data) { if (data.Success) { - minerFees += (-Math.floor(minerFeeSatoshis * conversionRateSatoshisToCents) / 100.0); - console.log(minerFees); + var minerFeeCents = (Math.floor(minerFeeSatoshis * conversionRateSatoshisToCents) / 100.0); + minerFees -= minerFeeCents; + console.log(donatedSatoshis); + console.log("Miner fee is " + minerFeeSatoshis + " satoshis, translating to " + minerFeeCents + " cents"); returnedFunds += (Math.floor(((donatedSatoshis - minerFeeSatoshis) * conversionRateSatoshisToCents) / 100.0)); odoMinerFeeCents.innerHTML = minerFees;