Finish queryEligibleOffer function
Fixed merge conflict