Custody after parents death?

Okay I have temporary custody of a toddler who is a family member of mine. One parent died last year of cancer which is when I sought out custody and have had temporary custody for 7 months now the other parent has been given a couple months to live do to cancer. This is tragic for the child. The parent had an addiction problem and was not stable which was why we pursued custody. So now my question is does anyone on here have any idea or similar scenarios? Will I need to or be able to adopt this child? Or will I just end up with custody?