Mortgages

If anyone knows anything about mortgages that would be awesome. So my husband and I were preapproved for a mortgage but there’s conditions attached. That we pay off all of our credit cards. Does that mean we can’t get a mortgage until we pay them off or does that mean we promise to pay them off after getting a mortgage. I am so confused. And paying off our credit cards are something that will take years so I’m not sure what this means.