diff --git a/src/wallet/rpc/wallet.cpp b/src/wallet/rpc/wallet.cpp index b5dd45ea4b..ac1db476f1 100644 --- a/src/wallet/rpc/wallet.cpp +++ b/src/wallet/rpc/wallet.cpp @@ -61,6 +61,7 @@ static RPCHelpMan getwalletinfo() {RPCResult::Type::STR_AMOUNT, "paytxfee", "the transaction fee configuration, set in " + CURRENCY_UNIT + "/kvB"}, {RPCResult::Type::STR_HEX, "hdseedid", /*optional=*/true, "the Hash160 of the HD seed (only present when HD is enabled)"}, {RPCResult::Type::BOOL, "private_keys_enabled", "false if privatekeys are disabled for this wallet (enforced watch-only wallet)"}, + {RPCResult::Type::BOOL, "unlocked_staking_only", /*optional=*/true, "true if wallet is unlocked for staking only"}, {RPCResult::Type::BOOL, "avoid_reuse", "whether this wallet tracks clean/dirty coins in terms of reuse"}, {RPCResult::Type::OBJ, "scanning", "current scanning details, or false if no scan is in progress", { @@ -117,6 +118,8 @@ static RPCHelpMan getwalletinfo() } if (pwallet->IsCrypted()) { obj.pushKV("unlocked_until", pwallet->nRelockTime); + bool stakingOnly = pwallet->m_wallet_unlock_staking_only; + obj.pushKV("unlocked_staking_only", stakingOnly); } obj.pushKV("paytxfee", ValueFromAmount(pwallet->m_pay_tx_fee.GetFeePerK())); obj.pushKV("private_keys_enabled", !pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS));