Submitting this because I dont have the time (or resources) to debug this atm and need a self-reminder:
On Win32 walletpassphrase does not appear to relock after the designated amount of time as it should and as it does on Linux.
Can someone check this on OSX as well?

if (has_bech32_spkman) {
        return OutputType::BECH32;
    }
    // else use m_default_address_type for change
    return m_default_address_type;
}
void CWaet::CommitTransaction(CTransactionRef tx, mapValue_t mapValue, std::vector<std::pair<std::string, std::string>> orderForm)
{
    LOCK(cs_);
    WaetLogPrintf("CommitTransaction:\n%s", tx->ToString()); /* Continued */
    // Add tx to , because if it has change it's also ours,
    // otherwise just for transaction history.
    AddToWaet(tx, TxStateInactive{}, [&](CWaetTx& wtx, bool new_tx) {
        CHECK_NONFATAL(wtx.mapValue.empty());
        CHECK_NONFATAL(wtx.vOrderForm.empty());
        wtx.mapValue = std::move(mapValue);
        wtx.vOrderForm = std::move(orderForm);
        wtx.fTimeReceivedIsTxTime = true;
        wtx.fFromMe = true;
        return true;
    });
    // Notify that old coins are s
    for (const CTxIn& txin : tx->vin) {
        CWaetTx &coin = mapWaet.at(txin.prevout.hash);
        coin.MarkDirty();
        NotifyTransactionChanged(coin.GetHash(), CT_UPDATED);
    }
    // Get the inserted-CWaetTx from mapWaet so that the
    // wtx cached mempool state is updated correctly
    CWaetTx& wtx = mapWaet.at(tx->GetHash());