Skip to content

Fix: price column sorting in offers table - #2455

Open
kanishka0411 wants to merge 6 commits into
RoboSats:mainfrom
kanishka0411:fix/price-column-sorting
Open

Fix: price column sorting in offers table#2455
kanishka0411 wants to merge 6 commits into
RoboSats:mainfrom
kanishka0411:fix/price-column-sorting

Conversation

@kanishka0411

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes #2454

This PR introduces/refactors/...
Fixes price column sorting in the offers table. The displayed price was calculated on the fly but sorting used the raw field which was always null, so added a sort comparator that uses the actual calculated price.

Screen.Recording.2026-03-22.at.8.15.30.PM.mov

Checklist before merging

  • Install pre-commit and initialize it: pip install pre-commit, then pre-commit install. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.

@juanfradb juanfradb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK bd0e1e3\n\nReviewed the one-file diff. The comparator now derives the sortable value from the same calculated price path used for rendering, instead of the raw field that is absent/null in row data.\n\nValidation run locally:\n- npx eslint src/components/BookTable/index.tsx\n- npm run build\n\nBuild completed with existing bundle-size warnings only. I did not run an end-to-end browser repro.

@juanfradb

Copy link
Copy Markdown

Small correction to my review text above: the missing raw field name is price.

@kanishka0411
kanishka0411 force-pushed the fix/price-column-sorting branch from bd0e1e3 to 88c1b91 Compare August 7, 2026 09:47
@kanishka0411
kanishka0411 requested a review from a team as a code owner August 7, 2026 09:47
@KoalaSat

Copy link
Copy Markdown
Member

Hi @kanishka0411 sorry for taking this long. Can you please fix the linterns? with that we should be good to go

@kanishka0411

kanishka0411 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Hi @kanishka0411 sorry for taking this long. Can you please fix the linterns? with that we should be good to go

No worries! Fixed the linter check .Please have a look :-)

KoalaSat
KoalaSat previously approved these changes Aug 21, 2026
@KoalaSat

Copy link
Copy Markdown
Member

Ey @kanishka0411 sorry we just added some extra Ts type linterns and now they are poping out

@kanishka0411

Copy link
Copy Markdown
Contributor Author

All good! TypeScript linter errors are fixed now :)

@kanishka0411

Copy link
Copy Markdown
Contributor Author

Also, was going through my wallet and remembered- the tip from #2405 , maybe you already sent it and I missed it? Could you confirm 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: toggle for sorting by price doesn't work

3 participants