At the beginning of either swap, current credit risk is at the lowest (because you wouldn’t enter into a swap with a counterparty with questionable creditworthiness) and the value = 0. However, potential credit risk is at the highest.
As someone said, credit risk peaks in the middle for interest rate swaps because there are many payments left. It peaks at the end for currency swaps because notional principal needs to be swapped.