Skip to content

Commit

Permalink
following the breadcrumbs for update
Browse files Browse the repository at this point in the history
  • Loading branch information
bh2smith committed Jul 21, 2024
1 parent 48392e6 commit 2af7371
Show file tree
Hide file tree
Showing 3 changed files with 174 additions and 129 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"fmt": "prettier --check '**/*.ts'",
"fmt:write": "prettier --write '**/*.ts'",
"prepare": "husky install",
"generate-types": "typechain --target=ethers-v5 --out-dir src/contracts './node_modules/@openzeppelin/contracts/build/contracts/ERC20.json' './customabis/ERC721.json' './node_modules/@openzeppelin/contracts/build/contracts/ERC1155.json' './node_modules/@openzeppelin/contracts/build/contracts/ERC165.json'",
"generate-types": "npx typechain --target=ethers-v5 --out-dir src/contracts './node_modules/@openzeppelin/contracts/build/contracts/ERC20.json' './customabis/ERC721.json' './node_modules/@openzeppelin/contracts/build/contracts/ERC1155.json' './node_modules/@openzeppelin/contracts/build/contracts/ERC165.json'",
"postinstall": "yarn generate-types",
"serve": "npx -y serve build -p 3001",
"update-safe-apps-sdk": "yarn add @safe-global/safe-apps-provider@latest @safe-global/safe-apps-react-sdk@latest @safe-global/safe-apps-sdk"
Expand All @@ -40,13 +40,13 @@
"ethers": "^5.7.2",
"honeyswap-default-token-list": "^3.1.1",
"lodash.debounce": "^4.0.8",
"react": "^17.0.2",
"react-ace": "^10.1.0",
"react": "^18.0.0",
"react-ace": "^12.0.0",
"react-csv-reader": "^4.0.0",
"react-dom": "^17.0.2",
"react-dom": "^18.0.0",
"react-dropzone": "^14.2.3",
"react-papaparse": "^4.4.0",
"react-redux": "^8.0.1",
"react-redux": "^9.0.0",
"react-svg": "^16.1.34",
"react-virtualized-auto-sizer": "^1.0.6",
"react-window": "^1.8.9",
Expand All @@ -55,19 +55,19 @@
"typescript": "~5.5.2"
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@craco/craco": "^7.0.0",
"@simbathesailor/use-what-changed": "^2.0.0",
"@svgr/webpack": "^8.0.1",
"@testing-library/react": "^12.1.3",
"@testing-library/react-hooks": "^8.0.1",
"@typechain/ethers-v5": "^7.1.2",
"@typechain/ethers-v5": "^11.1.2",
"@types/lodash.debounce": "^4.0.7",
"@types/node": "^20.5.7",
"@types/react": "^17.0.39",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.3",
"@types/react-virtualized-auto-sizer": "^1.0.1",
"@types/react-window": "^1.8.5",
"babel-eslint": "^10.1.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-react-app": "^7.0.0",
Expand All @@ -82,7 +82,7 @@
"prettier": "^2.8.8",
"pretty-quick": "^3.3.1",
"react-scripts": "^5.0.1",
"typechain": "^5.2.0"
"typechain": "^8.3.2"
},
"browserslist": {
"production": [
Expand Down
10 changes: 7 additions & 3 deletions src/components/MessageSnackbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export const MessageSnackbar = () => {
);

useEffect(() => {
let timer: NodeJS.Timer | undefined = undefined;
let timer: number | undefined = undefined;
if (messages.messages.length > 0) {
setOpen(true);
setTimeLeft(HIDE_TIME);
timer = setInterval(() => {
timer = window.setInterval(() => {
setTimeLeft((previousTime) => {
if (previousTime === 100) {
return 0;
Expand All @@ -46,7 +46,11 @@ export const MessageSnackbar = () => {
});
}, 100);
}
return () => clearInterval(timer);
return () => {
if (timer) {
clearInterval(timer);
}
};
}, [messages.messages]);

const onClose = () => {
Expand Down
Loading

0 comments on commit 2af7371

Please sign in to comment.