fixed state validation

transaction state is a string and its compared with a number. so, lets get the state as number on initialize