relayed here and copied below: https://github.com/bitcoin/bitcoin/pull/12610#issuecomment-376278677

this logic here means that anytime we do a wallet match on rpc debug console, it will not find the wallet unless it has no `.dat` extension: 3dba3c3#diff-8c9d79ba40bf702f01685008550ac100R491

This also means you can load two wallets(eg `wallet.dat` and `wallet`), and they will look the same in the drop down selector.

imo if we're supporting arbitrary filename extensions we should just display the entire name
if(recipients.empty())
    {
        return OK;
    }
    QSet<QString> setAddress; 
    int nAddresses = 0;
    
    for (const SendCoinsRecipient &rcp : recipients)
    {
        if (rcp.fSubtractFeeFromAmount)
            fSubtractFeeFromAmount = true;
        if (rcp.paymentRequest.IsInitialized())
        {   
            CAmount subtotal = 0;
            const payments::PaymentDetails& details = rcp.paymentRequest.getDetails();
            for (int i = 0; i < details.outputs_size(); i++)
            {
                const payments::Output& out = details.outputs(i);
                if (out.amount() <= 0) continue;
                subtotal += out.amount();
                const unsigned char* scriptStr = (const unsigned char*)out.script().data();
                CScript scriptPubKey(scriptStr, scriptStr+out.script().size());
                CAmount nAmount = out.amount();
                CRecipient recipient = {scriptPubKey, nAmount, rcp.fSubtractFeeFromAmount};
                vecSend.push_back(recipient);
            }
            if (subtotal <= 0)
            {
                return InvalidAmount;
            }