UI workflow while waiting for the wallet user to scan the QR code
I'm working on something like an NFT marketplace. Say a user with Xumm wallet is on an NFT buy page. They click Buy Now and my backend shoots a request to Xumm API and get the below.
qr_uri_quality_opts: [ 'm', 'q', 'h' ],
So, my site will pop-up the QR code at https://xumm.app/sign/77f7cde5-8464693b_q.png and wait for the user to sign using their wallet.
But how should I listen to know when the user has signed the request? Should my frontend listen to the websocket at wss://xumm.app/sign/77f7cde5-5464693b?
Or is there a better way?