diff --git a/WalletWasabi.Daemon/Rpc/WasabiJsonRpcService.cs b/WalletWasabi.Daemon/Rpc/WasabiJsonRpcService.cs index 9cf1fbd84a4..78964c10e46 100644 --- a/WalletWasabi.Daemon/Rpc/WasabiJsonRpcService.cs +++ b/WalletWasabi.Daemon/Rpc/WasabiJsonRpcService.cs @@ -1,5 +1,6 @@ using NBitcoin; using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Threading; @@ -295,6 +296,18 @@ public void StopCoinJoining() coinJoinManager.StopAsync(activeWallet, CancellationToken.None).ConfigureAwait(false); } + [JsonRpcMethod("getfeerates", initializable: false)] + public object GetFeeRate() + { + if (Global.Synchronizer.LastAllFeeEstimate is { } nonNullFeeRates) + { + return nonNullFeeRates.Estimations; + } + + return new Dictionary(); + } + + private void SelectWallet(string walletName) { walletName = Guard.NotNullOrEmptyOrWhitespace(nameof(walletName), walletName);