Skip to content

Commit

Permalink
chore: Address code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gambinish committed Oct 22, 2024
1 parent 990067f commit ba30af9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions app/components/UI/Tokens/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,7 @@ const Tokens: React.FC<TokensI> = ({ tokens }) => {
}
};

const showSortControls = () => {
if (sortControlsActionSheet.current) {
sortControlsActionSheet.current.show();
}
};
const showSortControls = () => sortControlsActionSheet?.current?.show();

const onRefresh = async () => {
requestAnimationFrame(async () => {
Expand Down
2 changes: 1 addition & 1 deletion app/components/UI/Tokens/util/sortAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface SortingCallbacksT {
const sortingCallbacks: SortingCallbacksT = {
numeric: (a: number, b: number) => a - b,
stringNumeric: (a: string, b: string) =>
parseFloat(parseFloat(a).toFixed(5)) - parseFloat(parseFloat(b).toFixed(5)),
parseFloat((parseFloat(a) - parseFloat(b)).toFixed(5)),
alphaNumeric: (a: string, b: string) => a.localeCompare(b),
date: (a: Date, b: Date) => a.getTime() - b.getTime(),
};
Expand Down

0 comments on commit ba30af9

Please sign in to comment.