diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -859,7 +859,7 @@
  * @param result  Reference to UniValue object the wallet names and balances are
  *                pushed to.
  */
-[[maybe_unused]] static void GetWalletBalances(UniValue &result) {
+static void GetWalletBalances(UniValue &result) {
     std::unique_ptr<BaseRequestHandler> rh{
         std::make_unique<DefaultRequestHandler>()};
     const UniValue listwallets =