Move logic from view to helper

Write specs for TransactionsHelper