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
{
    return wallet->GetPubKey(address, vchPubKeyOut);
}
bool WalletModel::IsSpendable(const CTxDestination& dest) const
{
    return IsMine(*wallet, dest) & ISMINE_SPENDABLE;
}
bool WalletModel::getPrivKey(const CKeyID &address, CKey& vchPrivKeyOut) const
{
    return wallet->GetKey(address, vchPrivKeyOut);
}
void WalletModel::getOutputs(const std::vector<COutPoint>& vOutpoints, std::vector<COutput>& vOutputs)
{
    LOCK2(cs_main, wallet->cs_wallet);
    for (const COutPoint& outpoint : vOutpoints)
    {
        auto it = wallet->mapWallet.find(outpoint.hash);
        if (it == wallet->mapWallet.end()) continue;
        int nDepth = it->second.GetDepthInMainChain();
        if (nDepth < 0) continue;
        COutput out(&it->second, outpoint.n, nDepth, true , true , true );
        vOutputs.push_back(out);
    }
}
bool WalletModel::isSpent(const COutPoint& outpoint) const