Pick a definite date, in the very near future. If you have an offer letting in hand by that date, decide whether to switch jobs based on its terms, and if you are switching jobs give your current employer notice.
You can choose whether to tell the potential employer that you must have the offer letter by then. You also have the option of telling your current employer that you will have a definite decision on the visa extension on that day, and check whether that timing is acceptable to them.
If you do not have an offer letter by that day, inform your current employer that you definitely want to go ahead with the visa renewal, and forget about the other job.