Ukraine didn't declare bankruptcy because Russia chose to assume 100% of the USSR external debt. Meanwhile, in 1998, Russia had a GDP PPP 80% higher than Ukraine.
However, a lot could have happened in two decades, and Ukraine had to go through many issues typical of post-Soviet countries at the time. The risk associated with warheads being sold by generals or oligarchs was seen as a real one, see for instance:
https://www.armscontrol.org/act/1997-09/press-releases/russi...