Skip to content
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

BIT-120 - Fix PDF render #83

Merged
merged 5 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 31 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,41 @@
"translations": "i18next"
},
"dependencies": {
"@ant-design/icons": "^5.2.6",
"@bloock/sdk": "^2.8.5",
"antd": "^5.11.0",
"date-fns": "^2.30.0",
"i18next": "^23.7.7",
"i18next-browser-languagedetector": "^7.2.0",
"iconoir-react": "^7.1.0",
"@ant-design/icons": "^5.4.0",
"@bloock/sdk": "^2.9.3",
"antd": "^5.20.0",
"date-fns": "^3.6.0",
"i18next": "^23.12.2",
"i18next-browser-languagedetector": "^8.0.0",
"iconoir-react": "^7.8.0",
"isomorphic-fetch": "^3.0.0",
"magic-bytes.js": "^1.5.0",
"moment": "^2.29.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"magic-bytes.js": "^1.10.0",
"moment": "^2.30.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-dropzone": "^14.2.3",
"react-extension-icons": "^1.1.6",
"react-i18next": "^13.5.0",
"react-pdf": "^8.0.2",
"react-router-dom": "^6.23.0",
"tar": "7.1.0"
"react-i18next": "^15.0.0",
"react-pdf": "^9.1.0",
"react-router-dom": "^6.26.0",
"react-extension-icons": "^1.1.6"

},
"devDependencies": {
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react-swc": "^3.3.2",
"autoprefixer": "^10.4.16",
"eslint": "^8.45.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"i18next-parser": "^8.9.0",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.5",
"typescript": "^5.0.2",
"vite": "^5.2.11",
"vite-plugin-top-level-await": "^1.4.1",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"autoprefixer": "^10.4.20",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.9",
"i18next-parser": "^9.0.1",
"postcss": "^8.4.40",
"tailwindcss": "^3.4.7",
"typescript": "^5.5.4",
"vite": "^5.3.5",
"vite-plugin-top-level-await": "^1.4.2",
"vite-plugin-wasm": "^3.3.0"
},
"resolutions": {
"pdfjs-dist": "^4.2.67"
}
}
4 changes: 2 additions & 2 deletions src/i18n/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import en from "./en.json";
import es from "./es.json";

// no need to import english here, since it's date-fns default language
import { default as dca } from "date-fns/locale/ca";
import { default as des } from "date-fns/locale/es";
import { ca as dca } from "date-fns/locale/ca";
import { es as des } from "date-fns/locale/es";

export const translations: { [key: string]: any } = {
ca,
Expand Down
14 changes: 5 additions & 9 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ export function getNetworkTranslation(network: IntegrityNetwork): string {
case "polygon_chain":
// t('results.integrity.networks.polygon_chain')
return `${base}.polygon_chain`;
case "bloock_chain":
// t('results.integrity.networks.bloock_chain')
return `${base}.bloock_chain`;
case "ethereum_goerli":

case "ethereum_sepolia":
// t('results.integrity.networks.ethereum_goerli')
return `${base}.ethereum_goerli`;
return `${base}.ethereum_sepolia`;
default:
// t('results.integrity.networks.unknown')
return `${base}.unknown`;
Expand All @@ -35,14 +33,12 @@ export function convertAnchorNetworkToNetwork(network: AnchorNetwork): Network {
switch (network.name) {
case "ethereum_mainnet":
return Network.ETHEREUM_MAINNET;
case "ethereum_goerli":
return Network.ETHEREUM_GOERLI;
case "ethereum_sepolia":
return Network.ETHEREUM_SEPOLIA;
case "gnosis_chain":
return Network.GNOSIS_CHAIN;
case "polygon_chain":
return Network.POLYGON_CHAIN;
case "bloock_chain":
return Network.BLOOCK_CHAIN;
default:
return Network.ETHEREUM_MAINNET;
}
Expand Down
Loading
Loading