refactor unspent tx handling to show safe to spend and pending