Added clear transaction function