Fixed the default miner fee display

This commit is contained in:
Rick Falkvinge
2018-05-19 14:55:32 +02:00
parent 8f7cacff0b
commit c23d442410
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -78,7 +78,7 @@
});
var sentFunds = 0; // the 0.1 cents are necessary for an odometer workaround
var minerFees = 0; // negative, or the .1 cents will go wrong
var minerFees = <%=this.MinerFeeDefaultFee%>; // negative, or the .1 cents will go wrong
var returnedFunds = 0; // as above
var addressUsedLegacy = SwarmopsJS.unescape('<%=this.BitcoinCashAddressLegacy %>');
@@ -42,6 +42,7 @@ namespace Swarmops.Frontend.Pages.v5.Admin
}
DateTime utcNow = DateTime.UtcNow;
this._currency = CurrentOrganization.Currency;
HotBitcoinAddress address = HotBitcoinAddress.CreateUnique(this.CurrentOrganization, BitcoinChain.Cash,
BitcoinUtility.BitcoinEchoTestIndex, this.CurrentUser.Identity, utcNow.Year, utcNow.Month, utcNow.Day);
@@ -184,5 +185,17 @@ namespace Swarmops.Frontend.Pages.v5.Admin
}
}
private Currency _currency;
public double MinerFeeDefaultFee
{
get
{
Int64 satoshisFee = BitcoinUtility.EchoFeeSatoshis;
Logic.Financial.Money presentationCurrencyFee = new Logic.Financial.Money(satoshisFee, Currency.BitcoinCash).ToCurrency(_currency);
return presentationCurrencyFee.Cents / -100.0;
}
}
}
}