Renamed method name, returning collection of fee estimation pairs
MODIFY
WalletWasabi/Services/WalletService.cs
WalletWasabi/Services/WalletService.cs
@@ -614,7 +614,9 @@ namespace WalletWasabi.Services
// 4. Get and calculate fee
Logger.LogInfo<WalletService>("Calculating dynamic transaction fee...");
WasabiClient wasabiClient = new WasabiClient(baseUri, torSocks5EndPoint);
- Money feePerBytes = await wasabiClient.GetAndCalculateFeesAsync(feeTarget, baseUri, torSocks5EndPoint);
+
+ var fees = await wasabiClient.GetFeesAsync(feeTarget, baseUri, torSocks5EndPoint);
+ Money feePerBytes = new Money(fees.Single().Value.Conservative);
bool spendAll = spendAllCount == 1;
int inNum;

MODIFY
WalletWasabi/WebClients/ChaumianCoinJoin/WasabiClient.cs
WalletWasabi/WebClients/ChaumianCoinJoin/WasabiClient.cs
@@ -21,10 +21,9 @@ namespace WalletWasabi.WebClients.ChaumianCoinJoin
{
}
- public async Task<Money> GetAndCalculateFeesAsync(int feeTarget, Uri baseUri, IPEndPoint torSocks5EndPoint = null)
+ public async Task<IDictionary<int, FeeEstimationPair>> GetFeesAsync(int feeTarget, Uri baseUri, IPEndPoint torSocks5EndPoint = null)
{
WasabiClient client = new WasabiClient(baseUri, torSocks5EndPoint);
- Money feePerBytes = null;
using (var response = await client.TorClient.SendAndRetryAsync(HttpMethod.Get, HttpStatusCode.OK, $"/api/v1/btc/blockchain/fees/{feeTarget}"))
{
@@ -34,9 +33,7 @@ namespace WalletWasabi.WebClients.ChaumianCoinJoin
using (var content = response.Content)
{
var json = await content.ReadAsJsonAsync<SortedDictionary<int, FeeEstimationPair>>();
- feePerBytes = new Money(json.Single().Value.Conservative);
-
- return feePerBytes;
+ return json;
}
}
}

Renamed method name, returning collection of fee estimation pairs