To the extent that public funds are deposited as provided in this chapter, the legal custodian thereof, and the sureties on the legal custodian’s bond, are exempt from all liability by reason of loss of any such funds from failure or other act of any such depository.