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 !gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET);
}
bool WalletModel::hdEnabled() const
{
    return wallet->IsHDEnabled();
}
OutputType WalletModel::getDefaultAddressType() const
{
    return wallet->m_default_address_type;
}
int WalletModel::getDefaultConfirmTarget() const
{
    return nTxConfirmTarget;
}
QString WalletModel::getWalletName() const
{
    LOCK(wallet->cs_wallet);
    QString walletName = QString::fromStdString(wallet->GetName());
    if (walletName.endsWith(".dat")) {
        walletName.truncate(walletName.size() - 4);
    }
    return walletName;
}
bool WalletModel::isMultiwallet()
{
    return gArgs.GetArgs("-wallet").size() > 1;
}