Closed terencehh closed 4 months ago
nice! so much cleaner. love it when we can remove code like this
@terencehh there is a small conflict that needs to be resolved
Test with build here: https://github.com/secretkeylabs/xverse-web-extension/actions/runs/8018139200
@terencehh tested, noice, lgtm 👏
🔘 PR Type
What kind of change does this PR introduce?
📜 Background
There is a state bug where
selectedOrdinal
has improper state when on multiple tabs (it overwriting the currentselectedOrdinal
on the page). This PR introduces a fix by removing state management forselectedOrdinal
, and instead always opting to look up the ordinal using theordinalId
in URL params, and finding the selected ordinal via react-query hooks (with caching)Issue Link: ENG-3193 Context Link (if applicable):
🔄 Changes
selectedOrdinal
state actions, reducers, and settersselectedOrdinal
usage to call react-query hook which retrieves ordinal details via theordinalId
supplied in URL paramsImpact:
🖼 Screenshot / 📹 Video
Send/Confirm Ordinals Screen Bug video
https://github.com/secretkeylabs/xverse-web-extension/assets/30040178/4699cbe7-4718-4a61-84b0-cdaa313a1412
Send/Confirm Ordinals Screen Fix video
https://github.com/secretkeylabs/xverse-web-extension/assets/30040178/ca6f21dc-aecf-4a55-943a-679429a84938
Recover Funds/Ordinals Screen Bug video
https://github.com/secretkeylabs/xverse-web-extension/assets/30040178/d010e5d2-b53c-43b3-a35a-4594a583e6c9
Recover Funds/Ordinals Screen Fix video
https://github.com/secretkeylabs/xverse-web-extension/assets/30040178/96f1a5ec-4db0-48b2-9b91-77d452f00f4e
✅ Review checklist
Please ensure the following are true before merging: