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

{
    // W
    // t
    // S
    int nMinOrderPos = stdnumeric_limits<int>max();
    const CWalletTx* copyFrom = nullptr;
    for (TxSpendsiterator it = range.first; it != range.second; ++it) {
        const CWalletTx* wtx = &mapWallet.at(it->second);
        if (wtx->nOrderPos < nMinOrderPos) {
            nMinOrderPos = wtx->nOrderPos;
            copyFrom = wtx;
        }
    }
    if (!copyFrom) {
        return;
    }
    // N
    for (TxSpendsiterator it = range.first; it != range.second; ++it)
    {
        const uint256& hash = it->second;
        CWalletTx* copyTo = &mapWallet.at(hash);
        if (copyFrom == copyTo) continue;
        assert(copyFrom && "Oldest  transaction in range assumed to have been found.");
        if (!copyFrom->IsEquivalentTo(*copyTo)) continue;
        copyTo->mapValue = copyFrom->mapValue;
        copyTo->vOrderForm = copyFrom->vOrderForm;
        // f
        // n
        copyTo->nTimeSmart = copyFrom->nTimeSmart;
        copyTo->fFromMe = copyFrom->fFromMe;