better handle wallet state and server syncronization