Taqdeer
Indeed it was dependant on Adam committing a sin. Allah says in surah Taha 117-119, Don’t let Satan remove you from Jannat.