Rename Coinstamp -> Bitstamp
MODIFY
WalletWasabi.Tests/IntegrationTests/ExternalApiTests.cs
WalletWasabi.Tests/IntegrationTests/ExternalApiTests.cs
@@ -5,7 +5,7 @@ using WalletWasabi.Backend.Models;
using WalletWasabi.WebClients.BlockchainInfo;
using WalletWasabi.WebClients.Coinbase;
using WalletWasabi.WebClients.CoinGecko;
-using WalletWasabi.WebClients.Coinstamp;
+using WalletWasabi.WebClients.Bitstamp;
using WalletWasabi.WebClients.Gemini;
using WalletWasabi.WebClients.ItBit;
using WalletWasabi.WebClients.SmartBit;
@@ -60,9 +60,9 @@ namespace WalletWasabi.Tests.IntegrationTests
}
[Fact]
- public async Task CoinstampExchangeRateProviderTestsAsync()
+ public async Task BitstampExchangeRateProviderTestsAsync()
{
- var client = new CoinstampExchangeRateProvider();
+ var client = new BitstampExchangeRateProvider();
IEnumerable<ExchangeRate> rates = await client.GetExchangeRateAsync();
var usdRate = Assert.Single(rates, x => x.Ticker == "USD");

MODIFY
WalletWasabi/WebClients/CoinGecko/CoinGeckoExchangeRate.cs
WalletWasabi/WebClients/CoinGecko/CoinGeckoExchangeRate.cs
using Newtonsoft.Json;
namespace WalletWasabi.WebClients.CoinGecko
-{
- public partial class CoinGeckoExchangeRateProvider
{
public class CoinGeckoExchangeRate
{
@@ -12,4 +10,3 @@ namespace WalletWasabi.WebClients.CoinGecko
public decimal Rate { get; set; }
}
}
-}

MODIFY
WalletWasabi/WebClients/CoinGecko/CoinGeckoExchangeRateProvider.cs
WalletWasabi/WebClients/CoinGecko/CoinGeckoExchangeRateProvider.cs
@@ -9,7 +9,7 @@ using WalletWasabi.Interfaces;
namespace WalletWasabi.WebClients.CoinGecko
{
- public partial class CoinGeckoExchangeRateProvider : IExchangeRateProvider
+ public class CoinGeckoExchangeRateProvider : IExchangeRateProvider
{
public async Task<List<ExchangeRate>> GetExchangeRateAsync()
{

RENAME
WalletWasabi/WebClients/Coinstamp/CoinstampExchangeRateProvider.cs
WalletWasabi/WebClients/Coinstamp/BitstampExchangeRateProvider.cs
@@ -7,9 +7,9 @@ using System.Threading.Tasks;
using WalletWasabi.Backend.Models;
using WalletWasabi.Interfaces;
-namespace WalletWasabi.WebClients.Coinstamp
+namespace WalletWasabi.WebClients.Bitstamp
{
- public partial class CoinstampExchangeRateProvider : IExchangeRateProvider
+ public class BitstampExchangeRateProvider : IExchangeRateProvider
{
public async Task<List<ExchangeRate>> GetExchangeRateAsync()
{
@@ -17,7 +17,7 @@ namespace WalletWasabi.WebClients.Coinstamp
httpClient.BaseAddress = new Uri("https://www.bitstamp.net");
using var response = await httpClient.GetAsync("/api/v2/ticker/btcusd");
using var content = response.Content;
- var rate = await content.ReadAsJsonAsync<CoinstampExchangeRate>();
+ var rate = await content.ReadAsJsonAsync<BitstampExchangeRate>();
var exchangeRates = new List<ExchangeRate>
{

DELETE
WalletWasabi/WebClients/Coinstamp/CoinstampExchangeRate.cs
-#nullable enable
-
-using Newtonsoft.Json;
-
-namespace WalletWasabi.WebClients.Coinstamp
-{
- public partial class CoinstampExchangeRateProvider
- {
- public class CoinstampExchangeRate
- {
- [JsonProperty(PropertyName = "bid")]
- public decimal Rate { get; set; }
- }
- }
-}

MODIFY
WalletWasabi/WebClients/ExchangeRateProviders.cs
WalletWasabi/WebClients/ExchangeRateProviders.cs
@@ -9,7 +9,7 @@ using WalletWasabi.Interfaces;
using WalletWasabi.Logging;
using WalletWasabi.WebClients.BlockchainInfo;
using WalletWasabi.WebClients.Coinbase;
-using WalletWasabi.WebClients.Coinstamp;
+using WalletWasabi.WebClients.Bitstamp;
using WalletWasabi.WebClients.CoinGecko;
using WalletWasabi.WebClients.Gemini;
using WalletWasabi.WebClients.ItBit;
@@ -23,7 +23,7 @@ namespace WalletWasabi.WebClients
private readonly IExchangeRateProvider[] ExchangeRateProviders =
{
new BlockchainInfoExchangeRateProvider(),
- new CoinstampExchangeRateProvider(),
+ new BitstampExchangeRateProvider(),
new CoinGeckoExchangeRateProvider(),
new CoinbaseExchangeRateProvider(),
new GeminiExchangeRateProvider(),

Rename Coinstamp -> Bitstamp