What will happen if i have a warranty but jailbroke it but then unjailbroke it?

Will i have my warranty because i really need my sleep button fixed on my iphone.
is there a way to get my phone fixed.
also they said they will give me a new iphone but i'm worried about the jailbreak.

ps i unjailbroke it so will i have my warrenty back if not help

If you restore it, there will be no proof of a jailbreak, which means your warranty will be intact.