From 4627715cddaadd4d6ceb9ab47ff89ada39b11823 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sun, 28 Dec 2014 15:43:25 +0100 Subject: [PATCH] Adjust for operating in microbitcoin --- Logic/Financial/ExchangeRateSnapshot.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Logic/Financial/ExchangeRateSnapshot.cs b/Logic/Financial/ExchangeRateSnapshot.cs index 1ed67b3d..36c48ba3 100644 --- a/Logic/Financial/ExchangeRateSnapshot.cs +++ b/Logic/Financial/ExchangeRateSnapshot.cs @@ -70,6 +70,8 @@ namespace Swarmops.Logic.Financial double btcRate = Double.Parse (match.Groups[3].Value, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture); + btcRate /= 1000000.0; // We're operating in microbitcoin, so adjust the stored exchange rate accordingly (right-shift six decimal places) + int currencyId = GetOrCreateCurrency (currencyCode, currencyName); SwarmDb.GetDatabaseForWriting()