Does it make sense to decode the raw transaction in the wallet-rpc `gettransaction` call (or add an optional parameter to do so)?

See discussion in https://github.com/bitcoin/bitcoin/pull/15159#issuecomment-499051813
pwallet->BlockUntilSyncedToCurrentChain();
    auto locked_chain = pwallet->chain().lock();
    LOCK(pwallet->cs_wallet);
    
    int nMinDepth = 1;
    if (!request.params[1].isNull())
        nMinDepth = request.params[1].get_int();
    
    std::string label = LabelFromValue(request.params[0]);
    std::set<CTxDestination> setAddress = pwallet->GetLabelAddresses(label);
    
    CAmount nAmount = 0;
    for (const std::pair<const uint256, CWalletTx>& pairWtx : pwallet->mapWallet) {
        const CWalletTx& wtx = pairWtx.second;
        if (wtx.IsCoinBase() || !locked_chain->checkFinalTx(*wtx.tx)) {
            continue;
        }
        for (const CTxOut& txout : wtx.tx->vout)
        {
            CTxDestination address;
            if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*pwallet, address) && setAddress.count(address)) {
                if (wtx.GetDepthInMainChain(*locked_chain) >= nMinDepth)
                    nAmount += txout.nValue;
            }
        }
    }
    return ValueFromAmount(nAmount);
}
static UniValue getbalance(const JSONRPCRequest& request)