The help tells me I should unlock my encrypted wallet:

```
> help migratewallet

...
Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.
```

But when I do so and attempt to migrate the wallet I'm told that I've entered my password for needlessly:

```
> migratewallet

Error: migratewallet on encrypted wallets is currently unsupported.
```

<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

v24.0.1

}
        },
        RPCExamples{
            HelpExampleCli("migratewallet", "")
            + HelpExampleRpc("migratewallet", "")
        },
        [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
        {
            std::shared_ptr<CWallet> wallet = GetWalletForJSONRPCRequest(request);
            if (!wallet) return NullUniValue;
            if (wallet->IsCrypted()) {
                throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: migratewallet on encrypted wallets is currently unsupported.");
            }
            WalletContext& context = EnsureWalletContext(request.context);
            util::Result<MigrationResult> res = MigrateLegacyToDescriptor(std::move(wallet), context);
            if (!res) {
                throw JSONRPCError(RPC_WALLET_ERROR, util::ErrorString(res).original);
            }
            UniValue r{UniValue::VOBJ};
            r.pushKV("wallet_name", res->wallet_name);
            if (res->watchonly_wallet) {
                r.pushKV("watchonly_name", res->watchonly_wallet->GetName());
            }
            if (res->solvables_wallet) {
                r.pushKV("solvables_name", res->solvables_wallet->GetName());
            }
            r.pushKV("backup_path", res->backup_path.u8string());
            return r;
        },
    };