Let $G$ be a split $p$-adic reductive group. In the Iwahori invariants of a unramified principal series representation of $G$, there are two bases. One of them is the Casselman basis, which played an important role in the proof of the Casselman–Shalika formula. In this talk, I will prove a conjecture of Bump, Nakasuji and Naruse about the transition matrix between these two bases. The idea is to transform the problem into the Langlands dual side, and use motivic Chern classes introduced by Brasselet–Schurmann–Yokura and the K-theoretic stable envelope of Maulik–Okounkov. This is based on joint work with Aluffi, Mihalcea and Schurmann.