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

}
        
        std::map<COutPoint, Coin> coins;
        for (const CTxIn& txin : mtx.vin) {
            coins[txin.prevout]; 
        }
        wallet.chain().findCoins(coins);
        
        
        for (const auto& txin : mtx.vin) {
            const auto& outpoint = txin.prevout;
            if (spent.count(outpoint)) {
                throw JSONRPCError(RPC_INVALID_PARAMETER, "Transaction(s) are spending the same output more than once");
            }
            if (new_utxos.count(outpoint)) {
                changes -= new_utxos.at(outpoint);
                new_utxos.erase(outpoint);
            } else {
                if (coins.at(outpoint).IsSpent()) {
                    throw JSONRPCError(RPC_INVALID_PARAMETER, "One or more transaction inputs are missing or have been spent already");
                }
                changes -= wallet.GetDebit(txin, filter);
            }
            spent.insert(outpoint);
        }
        
        
        
        
        const auto& hash = mtx.GetHash();