-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENG-3193] refactor: Refactor away from selectedOrdinal #791
Merged
teebszet
merged 8 commits into
develop
from
terence/eng-3193-refactor-away-from-selectedordinal-and-selectedraresat
Feb 26, 2024
Merged
[ENG-3193] refactor: Refactor away from selectedOrdinal #791
teebszet
merged 8 commits into
develop
from
terence/eng-3193-refactor-away-from-selectedordinal-and-selectedraresat
Feb 26, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jordankzf
previously approved these changes
Feb 6, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well-done! Thank you.
terencehh
changed the title
[ENG-3193] refactor: Refactor away from selectedOrdinal and selectedRareSat
[ENG-3193] refactor: Refactor away from selectedOrdinal
Feb 6, 2024
teebszet
reviewed
Feb 6, 2024
teebszet
reviewed
Feb 6, 2024
teebszet
reviewed
Feb 6, 2024
teebszet
reviewed
Feb 6, 2024
teebszet
previously approved these changes
Feb 6, 2024
teebszet
previously approved these changes
Feb 6, 2024
jordankzf
previously approved these changes
Feb 6, 2024
15 tasks
terencehh
force-pushed
the
terence/eng-3193-refactor-away-from-selectedordinal-and-selectedraresat
branch
from
February 7, 2024 07:14
f3d9ae7
to
c8a5f6f
Compare
jordankzf
previously approved these changes
Feb 7, 2024
@terencehh there is a small conflict that needs to be resolved |
…tedordinal-and-selectedraresat
Test with build here: https://github.com/secretkeylabs/xverse-web-extension/actions/runs/8018139200 |
@terencehh tested, noice, lgtm 👏 |
teebszet
approved these changes
Feb 26, 2024
teebszet
deleted the
terence/eng-3193-refactor-away-from-selectedordinal-and-selectedraresat
branch
February 26, 2024 05:31
teebszet
added a commit
that referenced
this pull request
Mar 14, 2024
* feat: init structure for send rune flow with flag for testnet only * add hook * add runes api client * feat: handle rune token display on home and token dashboard (#81) * wip * chore: tweak token dashboard for runes and add tokens to home send bottomsheet * remove TODOs that are handled now * touchup * chore: update text to support runes in receive screen * chore: dry * chore: remove runes list from client store * chore: remvoe todos related to texts * chore: remove useGetRuneFungibleTokens config todo --------- Co-authored-by: fede erbes <[email protected]> * Manage tokens screen for runes support (#84) * refactor key variables to improve readability * updates * major refactor stx coinslist & support runes in manage token page for testnet * remove conditonals and improve performance * add figma for mainnet coming soon * chore: add protocol icons for stacks, brc20 and runes tokens (#83) * chore: add protocol icons for stacks, brc20 and runes tokens * fix: token image loader and clean render logic * chore: use our runes logo and remove square styles * chore: use a default size const * fix: font size and add missing protocol to brc20 tokens * updates * fix stx icon issue --------- Co-authored-by: Terence Ng <[email protected]> * standardize currency typing and improve variable namings * revert logic + touchup * touchup * add rune icon * add typing * rename variable * progress * progress * fix button disabled * fix amount validations and display error msg * chore: use core pr version with runes support * Tim/eng 3814 receive runes screen design check (#91) * fix: receive bottom sheet icons and blur * Update en.json Co-authored-by: Terence Ng <[email protected]> --------- Co-authored-by: Terence Ng <[email protected]> * nits * Terence/fix edge case renderings (#95) * fix (#94) * fix * Update src/app/ui-library/input.tsx Co-authored-by: Tim Man <[email protected]> * fix * use variant * use brc * fix expression readability * fix sip coins which are hidden by manage token list should not be sendable in send coins list (#96) * update key * fix: remove unused route * fix: coin dashboard should show names and no protocol if none * standardize ticker icon for no image tickers * remove deprecated usage * Update src/locales/en.json * Update src/locales/en.json * Update src/locales/en.json * Update src/locales/en.json * Update src/locales/en.json * fix up logic * refactor: manage tokens for runes (#98) * refactor: manage tokens for runes * fix: be more strict on toggle handler * chore: minor cleanup * chore: minor diff clean up * update remaining FT to sip-10 * testing (#93) * touchup currencyTypes logic to go back to using FT, fixes, prepare improved receive screen for STX, BTC, ORD * update receive coin screen to handle STX & BTC * fix type issue * revert console log * revert changes * logic fix * remove unused component * Tim/refactor manage tokens (#99) * refactor: brc20 and sip10 tokens should use react-query hooks and no longer store balances in redux * fix: define a redux migration callback to keep user settings for manage tokens * fix: brc20 ft list merge * update remaining FT to sip-10 * testing (#93) * touchup currencyTypes logic to go back to using FT, fixes, prepare improved receive screen for STX, BTC, ORD * update receive coin screen to handle STX & BTC * fix type issue * refactor: brc20 and sip10 tokens should use react-query hooks and no longer store balances in redux * test * revert * fix: also remove coins from redux state in migration * chore: consistent naming --------- Co-authored-by: Terence Ng <[email protected]> Co-authored-by: Terence Ng <[email protected]> * fix: fix typing and null case for redux migration function * chore: bump to latest beta core * refactorings * typo * use bigint and fix amount precision * fix debounce * update core * remove script info * chore: bump core version * hack: update confirmTransaction to handle runes v1 * allow display input/output * revert runes icon to use square * chore: core version with undefined runes fix * additional check * update logo * Empty rune list message scenario and error message (#107) * feat: init structure for send rune flow with flag for testnet only * add hook * add runes api client * feat: handle rune token display on home and token dashboard (#81) * wip * chore: tweak token dashboard for runes and add tokens to home send bottomsheet * remove TODOs that are handled now * touchup * chore: update text to support runes in receive screen * chore: dry * chore: remove runes list from client store * chore: remvoe todos related to texts * chore: remove useGetRuneFungibleTokens config todo --------- Co-authored-by: fede erbes <[email protected]> * Manage tokens screen for runes support (#84) * refactor key variables to improve readability * updates * major refactor stx coinslist & support runes in manage token page for testnet * remove conditonals and improve performance * add figma for mainnet coming soon * chore: add protocol icons for stacks, brc20 and runes tokens (#83) * chore: add protocol icons for stacks, brc20 and runes tokens * fix: token image loader and clean render logic * chore: use our runes logo and remove square styles * chore: use a default size const * fix: font size and add missing protocol to brc20 tokens * updates * fix stx icon issue --------- Co-authored-by: Terence Ng <[email protected]> * standardize currency typing and improve variable namings * revert logic + touchup * touchup * add rune icon * add typing * rename variable * progress * progress * chore: use core pr version with runes support * fix button disabled * fix amount validations and display error msg * Tim/eng 3814 receive runes screen design check (#91) * fix: receive bottom sheet icons and blur * Update en.json Co-authored-by: Terence Ng <[email protected]> --------- Co-authored-by: Terence Ng <[email protected]> * nits * fix (#94) * Terence/fix edge case renderings (#95) * fix (#94) * fix * Update src/app/ui-library/input.tsx Co-authored-by: Tim Man <[email protected]> * fix * use variant * use brc * fix expression readability * fix sip coins which are hidden by manage token list should not be sendable in send coins list (#96) * update key * fix: remove unused route * fix: coin dashboard should show names and no protocol if none * standardize ticker icon for no image tickers * remove deprecated usage * Update src/locales/en.json * Update src/locales/en.json * Update src/locales/en.json * Update src/locales/en.json * Update src/locales/en.json * fix up logic * refactor: manage tokens for runes (#98) * refactor: manage tokens for runes * fix: be more strict on toggle handler * chore: minor cleanup * chore: minor diff clean up * update remaining FT to sip-10 * testing (#93) * touchup currencyTypes logic to go back to using FT, fixes, prepare improved receive screen for STX, BTC, ORD * update receive coin screen to handle STX & BTC * fix type issue * revert console log * revert changes * logic fix * remove unused component * Tim/refactor manage tokens (#99) * refactor: brc20 and sip10 tokens should use react-query hooks and no longer store balances in redux * fix: define a redux migration callback to keep user settings for manage tokens * fix: brc20 ft list merge * update remaining FT to sip-10 * testing (#93) * touchup currencyTypes logic to go back to using FT, fixes, prepare improved receive screen for STX, BTC, ORD * update receive coin screen to handle STX & BTC * fix type issue * refactor: brc20 and sip10 tokens should use react-query hooks and no longer store balances in redux * test * revert * fix: also remove coins from redux state in migration * chore: consistent naming --------- Co-authored-by: Terence Ng <[email protected]> Co-authored-by: Terence Ng <[email protected]> * fix: fix typing and null case for redux migration function * chore: bump to latest beta core * refactorings * typo * use bigint and fix amount precision * fix debounce * update core * remove script info * chore: bump core version * hack: update confirmTransaction to handle runes v1 * allow display input/output * revert runes icon to use square * chore: core version with undefined runes fix * additional check * update logo * push * push --------- Co-authored-by: Tim Man <[email protected]> Co-authored-by: fede erbes <[email protected]> Co-authored-by: Victor Kirov <[email protected]> * update label * fix: overflow on send rune amound input, when long balance (#105) * fix: overflow on send rune amound input, when long balance * refactor: move the complications to the input component file * fix: set allowNegative=false to fix warnings for number format (#106) * fix: set allowNegative=false to fix warnings for number format * fix: styling of stx tx transaction history * fix balance becoming exponential string for large digits * fix large amount / decimal formatting * touchup * adjust gap to cater max scenario * update display ellipsis for high digit/decimal values * small fix * fix: css balance token tile * fix: cleaner css --------- Co-authored-by: Terence Ng <[email protected]> * fix (#109) * [ENG-3193] refactor: Refactor away from selectedOrdinal (#791) * commit changes * remove selectedOrdinal for raresat screen * update recover screens * fix translation text * revert non null assertion * fix bug * fix merge * fix (#109) * fixes (#110) * fixes * remove log * disable rbf * pull latest core to support rbf * Update core and fix map key for txn history --------- Co-authored-by: Victor Kirov <[email protected]> * [ENG-3193] refactor: Refactor away from selectedOrdinal (#791) * commit changes * remove selectedOrdinal for raresat screen * update recover screens * fix translation text * revert non null assertion * fix bug * fix merge * chore: bump core to v11.1.1 (#806) * chore: Bump core to 11.1.2 (#807) * chore: bump to latest beta core * update lock * use mobile values * fix render * Solve missing name * Fallback for SIP-10 FungibleTokens with missing name * chore: bump core to v11.3.0 --------- Co-authored-by: Terence Ng <[email protected]> Co-authored-by: Terence Ng <[email protected]> Co-authored-by: fede erbes <[email protected]> Co-authored-by: Victor Kirov <[email protected]> Co-authored-by: jordankzf <[email protected]>
teebszet
pushed a commit
that referenced
this pull request
May 31, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔘 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
bug.mov
Send/Confirm Ordinals Screen Fix video
fix.mov
Recover Funds/Ordinals Screen Bug video
recover.screen.bug.mov
Recover Funds/Ordinals Screen Fix video
recover.screen.fix.mov
✅ Review checklist
Please ensure the following are true before merging: