Peel and slice the potatoes thinly.
Heat olive oil in a large skillet over medium heat.
Add the potatoes and cook until tender, about 10-15 minutes.
If using, add the sliced onion and cook until soft.
Drain excess oil from the potatoes and cool slightly.
In a bowl, beat the eggs and season with salt.
Combine the potatoes with the beaten eggs, mixing gently.
Wipe the skillet and add a bit more oil, heating it over medium heat.
Pour the potato and egg mixture into the skillet, spreading it evenly.
Cook for about 5-7 minutes, then flip the tortilla and cook the other side for another 5-7 minutes.