sendTransaction called → transaction created on blockchain → confirm transaction in MetaMask notification popup → if confirmed transaction gets validated or somethinng
or
sendTransaction called → confirm transaction in MetaMask notification popup → transaction is created
Im curios of how and where MetaMask or any other wallet listens if eth_sendTransaction got called and how do they know if they need to open the confirm transaction view? Is there any place you can listen for those events with the wallet holder address?
But where is the transaction before it gets confirmed in the MetaMask notification popup, how or where can i intercept it?
To be clear on what I’m trying to achieve:
My goal is to programmatically analyze an address (“to” address) in my extension, before confirming the transaction. So what i need is, to intercept or listen to rpc requests, especially eth_sendTransaction, from the browser and catch the “to” address so i can analyze it.