A viable currency simply requires that people see it as such.
Salt was used or highly valued in a lot of places. Apparently, the word “salary” stems from the Latin word “salarium,” meaning “salt money.” The Romans paid soldiers, officers, and civil administrators an allowance of salt (or money to buy salt) and the term stuck around.
You can actually view salt in a similar fashion as modern cryptocurrency. Anyone can make it or collect it, but it takes time and energy, both things that are very limited per individual. The collected currency is a symbol for time spent. The salt miners/desalinators spend time collecting a certain amount of salt and people are willing to trade them other goods for their collected time. It would no longer be viable once someone figured out how to mass produce it and its value dropped so much that it would be impracticable to carry around so much salt.
Storing it would not be much of a problem, people have been keeping things dry for a long time. Damp salt can be easily dried before it's weighed in a transaction or the transaction can be based on volume (meaning damp salt would be less valuable).
It is far more likely that people would use a different currency for higher level transactions. You wouldn't want to be stuck trading with a coastal city all the time in salt because they're infinitely more wealthy than you. Coins might be used as a fiat currency or as a representative money backed by salt. In that case, salt is simply used as a slightly more formal barter system when coins can not be manufactured in large enough quantities.
The primary thing to keep salt as a viable currency is for mass production to not be possible. For our own history, the invention of ceramics was most likely crucial in allowing the mass harvesting of sea salt. For your world, if salt deposits (and therefore mines) are not discovered then the suppression of ceramics is the easiest way to maintain scarcity.