The toric code based on Majorana fermions on mesoscopic superconducting islands is a promising candidate for quantum information processing. In the limit of vanishing Cooper-pair tunneling, it has been argued that the phase transition separating the topologically ordered phase of the toric code from the trivial one is in the universality class of the (2+1)D XY model. On the other hand, in the limit of infinitely large Cooper-pair tunneling, the phase transition is in the universality class of the (2+1)D Ising model. In this work, we treat the case of finite Cooper-pair tunneling and address the question of how the continuous XY symmetry breaking phase transition turns into a discrete Z2 symmetry breaking one when the Cooper-pair tunneling rate is increased. We show that this happens through a couple of tricritical points and first order phase transitions. Using a Jordan-Wigner transformation, we map the problem to that of spins coupled to quantum rotors and subsequently, propose a Landau field theory for this model that matches the known results in the respective limits. We calculate the effective field theories and provide the relevant critical exponents for the different phase transitions. Our results are relevant for predicting the stability of the topological phase in realistic experimental implementations.