rename onState to wait to match nightmare

cc @reinpk so you know for next time