Fixing transaction history CSV download

here you can use `preconditions.checkState(res)`. res should never be false/null without an `err`.