This is a very difficult question to answer. Euthanasia of a pet is a personal decision. Your vet may be the best person to ask. Another option may be to get a second opinion from a different vet.
I have known some dogs with severe liver failure live for weeks and even several months. There are several types of liver failure and not all necessarily have a grim prognosis. It may be insightful determining what exactly is going on.
If finances permit, sometimes pursuing advanced diagnostics can help make a decision. Sometimes this may require advanced imaging such as an ultrasound and/or referral to a specialty practice with 24-hour critical care available.
If things look grim, there are little chances for recovery, and quality of life is poor, then euthanasia is the ultimate gift of love a dog owner can make. Hope this helps. So sorry your dog is going through this.