From ef699b9abb39160ce18d8e01cd863d774dd95bc6 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sat, 7 Mar 2015 00:47:50 +0100 Subject: [PATCH] Fixed ugly bug: an old quickhack was causing wrong currency to be selected --- Basic/Types/Structure/BasicCountry.cs | 13 ------------- Logic/Structure/Country.cs | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/Basic/Types/Structure/BasicCountry.cs b/Basic/Types/Structure/BasicCountry.cs index 32500483..245dba12 100644 --- a/Basic/Types/Structure/BasicCountry.cs +++ b/Basic/Types/Structure/BasicCountry.cs @@ -46,19 +46,6 @@ namespace Swarmops.Basic.Types.Structure public int PostalCodeLength { get; protected set; } public string PostalCodeFormat { get; protected set; } - public int CurrencyId - { - get - { - if (this.Code == "SE") - { - return 1; - } - - throw new NotImplementedException ("BasicCountry.CurrencyId"); - } - } - #region IHasIdentity Members public int Identity diff --git a/Logic/Structure/Country.cs b/Logic/Structure/Country.cs index 2d0e5d20..74537171 100644 --- a/Logic/Structure/Country.cs +++ b/Logic/Structure/Country.cs @@ -27,7 +27,7 @@ namespace Swarmops.Logic.Structure public Currency Currency { - get { return Currency.FromIdentity (CurrencyId); } + get { return Currency.FromCode (CurrencyCode); } } public static Country FromBasic (BasicCountry basic)