Postnuptial Agreement

Hello everyone , I recently found out my wife had an affair while I was at work , we currently have 2 young children , and I reside in North Dakota. I was looking at considering and postnuptial agreement to protect our assets if it turns into a divorce at some point , is there any recommendations before I go through with it ? Will it hold up in court after writing up a agreement after I found out she wasn’t faithful