Update getTransactions() to return all transactions if no pageIndex is given