Skip to content

Commit

Permalink
SOV-3345: Codebase cleanup (#660)
Browse files Browse the repository at this point in the history
* Configure ts-prune package

* Cleanuo

* Create yellow-elephants-dress.md
  • Loading branch information
tiltom authored Oct 27, 2023
1 parent a44a3f9 commit 23feead
Show file tree
Hide file tree
Showing 54 changed files with 73 additions and 1,405 deletions.
5 changes: 5 additions & 0 deletions .changeset/yellow-elephants-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"frontend": patch
---

SOV-3345: Codebase cleanup
6 changes: 4 additions & 2 deletions apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
"stream-browserify": "^3.0.0",
"ts-loader": "^9.3.1",
"typescript": "^4.7.4",
"webpack": "^5.74.0"
"webpack": "^5.74.0",
"ts-prune": "0.10.3"
},
"scripts": {
"predev": "yarn generate:graphql",
Expand All @@ -94,7 +95,8 @@
"lint": "eslint -c .eslintrc.js ./",
"generate:graphql": "graphql-codegen",
"generate:graphql:fetch:testnet": "env-cmd -f .env.development.local graphql-codegen -c codegen.fetch.yml",
"generate:graphql:fetch:mainnet": "env-cmd -f .env.staging graphql-codegen -c codegen.fetch.yml"
"generate:graphql:fetch:mainnet": "env-cmd -f .env.staging graphql-codegen -c codegen.fetch.yml",
"find-deadcode": "ts-prune -s .generated.tsx | grep -v '(used in module)'"
},
"browserslist": [
"last 5 chrome version",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { useNotificationContext } from '../../../contexts/NotificationContext';
import { translations } from '../../../locales/i18n';
import { sharedState } from '../../../store/rxjs/shared-state';

export type ConnectWalletButtonProps = {
type ConnectWalletButtonProps = {
onConnect: () => void;
onDisconnect: () => void;
address: string | undefined;
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { GITHUB_LINKS, SOCIAL_LINKS } from '../../../constants/links';
import { translations } from '../../../locales/i18n';
import styles from './SocialLinks.module.css';

export type SocialLinksProps = {
type SocialLinksProps = {
className?: string;
innerClassName?: string;
dataAttribute?: string;
Expand Down

This file was deleted.

103 changes: 0 additions & 103 deletions apps/frontend/src/app/2_molecules/WalletBalance/WalletBalance.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions apps/frontend/src/app/2_molecules/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export * from './ConnectWalletButton/ConnectWalletButton';
export * from './LanguageSelector/LanguageSelector';
export * from './SocialLinks/SocialLinks';
export * from './SovrynLogo/SovrynLogo';
export * from './WalletBalance/WalletBalance';

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions apps/frontend/src/app/3_organisms/LOCChart/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,3 @@ export enum ChartSortingType {
id = 'id',
collateralRatio = 'collateralRatio',
}

export enum TrovesFilterType {
above = 'above',
below = 'below',
}
8 changes: 0 additions & 8 deletions apps/frontend/src/app/3_organisms/LOCChart/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import { decimalic } from '../../../utils/math';
import { TroveData } from './types';

export const chartConfig = {
defaultFont: 'Roboto',
fontColor: '#F5F5F5',
Expand All @@ -23,11 +20,6 @@ export const chartConfig = {
maxValue: 21,
};

export const sortData = (data: TroveData[]) =>
data.sort((a, b) =>
decimalic(a.collateralRatio).sub(b.collateralRatio).toNumber(),
);

export const calculateRedemptionBuffer = (
debt: number,
collateral: number,
Expand Down
Loading

0 comments on commit 23feead

Please sign in to comment.