Math fix IV
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ namespace Resources.Pages {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <strong>DUST COLLECTED</strong><br/><br/>The amount sent is smaller than the expected fee for returning it to you, which is {0} satoshis ({1} {2:N2}). The money you sent is now so-called "dust" on the bitcoin network, and won't be moved again.<br/><br/>Send a higher amount to perform an echo test..
|
||||
/// Looks up a localized string similar to <strong>DUST COLLECTED</strong><br/><br/>The amount sent is smaller than the expected fee for returning it to you, which is {0:N2} microcoins. The money you sent is now so-called "dust" on the bitcoin network, and won't be moved again.<br/><br/>Send a higher amount to perform an echo test..
|
||||
/// </summary>
|
||||
internal static string BitcoinEchoTest_DustCollected {
|
||||
get {
|
||||
|
||||
@@ -371,6 +371,6 @@
|
||||
<value>Government</value>
|
||||
</data>
|
||||
<data name="BitcoinEchoTest_DustCollected" xml:space="preserve">
|
||||
<value><strong>DUST COLLECTED</strong><br/><br/>The amount sent is smaller than the expected fee for returning it to you, which is {0} satoshis ({1} {2:N2}). The money you sent is now so-called "dust" on the bitcoin network, and won't be moved again.<br/><br/>Send a higher amount to perform an echo test.</value>
|
||||
<value><strong>DUST COLLECTED</strong><br/><br/>The amount sent is smaller than the expected fee for returning it to you, which is {0:N2} microcoins. The money you sent is now so-called "dust" on the bitcoin network, and won't be moved again.<br/><br/>Send a higher amount to perform an echo test.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -31,35 +31,45 @@
|
||||
|
||||
if (outAddress == addressUsed) {
|
||||
|
||||
$('#paraStatus').text(verifyingText);
|
||||
var donatedSatoshis = data.vout[index][outAddress];
|
||||
console.log(donatedSatoshis);
|
||||
sentFunds += Math.floor(donatedSatoshis * conversionRateSatoshisToCents) / 100.0;
|
||||
odoSentCents.innerHTML = sentFunds; // looks weird but $('#id') not used with odo
|
||||
|
||||
var json = {};
|
||||
json.guid = guid;
|
||||
json.txHash = data.txid;
|
||||
if (donatedSatoshis > minerFeeSatoshis) {
|
||||
|
||||
SwarmopsJS.ajaxCall('/Pages/v5/Admin/BitcoinEchoTest.aspx/ProcessTransactionReceived',
|
||||
json,
|
||||
function (data) {
|
||||
if (data.Success) {
|
||||
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;
|
||||
$('#paraStatus').text(verifyingText);
|
||||
console.log(donatedSatoshis);
|
||||
sentFunds += Math.floor(donatedSatoshis * conversionRateSatoshisToCents) / 100.0;
|
||||
odoSentCents.innerHTML = sentFunds; // looks weird but $('#id') not used with odo
|
||||
|
||||
odoMinerFeeCents.innerHTML = minerFees;
|
||||
odoReturnedCents.innerHTML = returnedFunds;
|
||||
var json = {};
|
||||
json.guid = guid;
|
||||
json.txHash = data.txid;
|
||||
|
||||
|
||||
SwarmopsJS.ajaxCall('/Pages/v5/Admin/BitcoinEchoTest.aspx/ProcessTransactionReceived',
|
||||
json,
|
||||
function(data) {
|
||||
if (data.Success) {
|
||||
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;
|
||||
odoReturnedCents.innerHTML = returnedFunds;
|
||||
|
||||
$('#paraStatus').text(data.DisplayMessage);
|
||||
$('#paraIntro').fadeOut().slideUp();
|
||||
$('#divQr').fadeOut().slideUp();
|
||||
completed = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Dust collected
|
||||
|
||||
alertify.dialog(SwarmopsJS.unescape('<%=Localized_DustCollected%>'));
|
||||
}
|
||||
|
||||
$('#paraStatus').text(data.DisplayMessage);
|
||||
$('#paraIntro').fadeOut().slideUp();
|
||||
$('#divQr').fadeOut().slideUp();
|
||||
completed = true;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Swarmops.Frontend.Pages.v5.Admin
|
||||
// This page is copied from Donate, with the echo payout added to the end
|
||||
|
||||
this.PageTitle = Resources.Pages.Admin.BitcoinEchoTest_PageTitle;
|
||||
this.InfoBoxLiteral = Resources.Pages.Admin.BitcoinEchoTest_Info;
|
||||
this.InfoBoxLiteral = String.Format(Resources.Pages.Admin.BitcoinEchoTest_Info, BitcoinUtility.EchoFeeSatoshis / 100.0);
|
||||
this.LabelStatus.Text = Resources.Pages.Admin.BitcoinEchoTest_StatusInitial;
|
||||
this.SuppressStatisticHeaders = true;
|
||||
|
||||
@@ -184,5 +184,15 @@ namespace Swarmops.Frontend.Pages.v5.Admin
|
||||
get { return CommonV5.JavascriptEscape(Resources.Pages.Financial.Donate_TransactionDetected); }
|
||||
}
|
||||
|
||||
public string Localized_DustCollected
|
||||
{
|
||||
get
|
||||
{
|
||||
return
|
||||
CommonV5.JavascriptEscape(String.Format(Resources.Pages.Admin.BitcoinEchoTest_DustCollected,
|
||||
BitcoinUtility.EchoFeeSatoshis/100.0));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user