refactor transaction confirm