[Cashtab] Patch agora token switch issue
Summary:
See T3721 for detailed description
If a user browses agora by manually switching the tokenId in the nav bar, the OrderBook component does not refresh offers with the updated tokenId. Patch.
Test Plan:
npm test
https://cashtab-local-dev.netlify.app/
I'm not sure how to directly test this, because react testing library does not support the user manually entering a new route (we would have to do it by clickling links in the app UI, and if we do this we force a refresh of the component and could not recreate the bug)
I've put this up on the test site. You can repeat the bug at cashtab.com now by
- Navigate to https://cashtab.com/#/token/000484d5fea853d36dc6fe53dcbc4ac1449a807ad15e7284599a8a94d6bd3ead (load shibe orders)
- In the url bar, change 000484d5fea853d36dc6fe53dcbc4ac1449a807ad15e7284599a8a94d6bd3ead to c67bf5c2b6d91cfb46a5c1772582eff80d88686887be10aa63b0945479cf4ed4 and push enter
- you will see the XECX orders at prices below 1 xec, bc these are the shibe orders
if you do the same thing on the test site (with this diff), you will not experience the issue. Hard refresh on load to ensure the latest version.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D17512