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
{
    QByteArray transaction_array; 
    {
        LOCK2(cs_main, wallet->cs_wallet);
        std::vector<std::pair<std::string, std::string>> vOrderForm;
        for (const SendCoinsRecipient &rcp : transaction.getRecipients())
        {
            if (rcp.paymentRequest.IsInitialized())
            {
                
                if (PaymentServer::verifyExpired(rcp.paymentRequest.getDetails())) {
                    return PaymentRequestExpired;
                }
                
                std::string value;
                rcp.paymentRequest.SerializeToString(&value);
                vOrderForm.emplace_back("PaymentRequest", std::move(value));
            }
            else if (!rcp.message.isEmpty()) 
                vOrderForm.emplace_back("Message", rcp.message.toStdString());
        }
        CTransactionRef& newTx = transaction.getTransaction();
        CReserveKey *keyChange = transaction.getPossibleKeyChange();
        CValidationState state;
        if (!wallet->CommitTransaction(newTx, {} , std::move(vOrderForm), {} , *keyChange, g_connman.get(), state))
            return SendCoinsReturn(TransactionCommitFailed, QString::fromStdString(state.GetRejectReason()));
        CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
        ssTx << newTx;
        transaction_array.append(&(ssTx[0]), ssTx.size());
    }