diff --git a/.gitignore b/.gitignore index 36e0c100e..5e91e7087 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,7 @@ yarn-error.log* .prettierrc -.vscode \ No newline at end of file +.vscode + +# commit hash used for update detection +public/commit_hash \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index df2cbf495..043ddc9f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,13 +24,13 @@ "@terra-money/terra-utils": "^1.0.9", "@terra-money/terra.js": "^3.1.9", "@terra-money/terra.proto": "^2.0.0", - "@terra-money/wallet-kit": "^1.0.12", + "@terra-money/wallet-kit": "^1.0.15", "@tippyjs/react": "^4.2.6", "axios": "^0.27.2", "bech32": "^2.0.0", "bignumber.js": "^9.0.2", "buffer": "^6.0.3", - "classnames": "^2.3.1", + "classnames": "^2.3.2", "crypto-js": "^4.1.1", "date-fns": "^2.28.0", "i18next": "^21.8.14", @@ -41,17 +41,17 @@ "lottie-react": "^2.3.1", "numeral": "^2.0.6", "prettier": "^2.6.2", - "qrcode.react": "^3.0.2", + "qrcode.react": "^3.1.0", "qs": "^6.11.0", "ramda": "^0.28.0", - "react": "^17.0.2", + "react": "^18.2.0", "react-copy-to-clipboard": "^5.1.0", - "react-dom": "^17.0.2", - "react-hook-form": "7.22.5", + "react-dom": "^18.2.0", + "react-hook-form": "^7.29.0", "react-i18next": "^11.18.1", "react-modal": "^3.15.1", - "react-query": "^3.39.0", - "react-router-dom": "^6.3.0", + "react-query": "^3.39.3", + "react-router-dom": "^6.15.0", "recharts": "^2.1.16", "recoil": "^0.7.2", "sass": "^1.52.1", @@ -61,8 +61,6 @@ "xss": "1.0.11" }, "devDependencies": { - "@emotion/react": "^11.9.0", - "@emotion/styled": "^11.8.1", "@types/crypto-js": "^4.1.1", "@types/jest": "^27.5.1", "@types/node": "^17.0.35", @@ -70,9 +68,9 @@ "@types/qrcode.react": "^1.0.2", "@types/qs": "^6.9.7", "@types/ramda": "^0.28.13", - "@types/react": "^18.0.9", + "@types/react": "^18.2.21", "@types/react-copy-to-clipboard": "^5.0.2", - "@types/react-dom": "^18.0.5", + "@types/react-dom": "^18.2.7", "@types/react-modal": "^3.13.1", "@types/react-router-dom": "^5.3.3", "@types/secp256k1": "^4.0.3", @@ -2001,11 +1999,11 @@ } }, "node_modules/@babel/runtime": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.3.tgz", - "integrity": "sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.11.tgz", + "integrity": "sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA==", "dependencies": { - "regenerator-runtime": "^0.13.4" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" @@ -2024,6 +2022,11 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/runtime/node_modules/regenerator-runtime": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" + }, "node_modules/@babel/template": { "version": "7.16.7", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", @@ -2195,7 +2198,8 @@ "version": "11.9.2", "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.9.2.tgz", "integrity": "sha512-Pr/7HGH6H6yKgnVFNEj2MVlreu3ADqftqjqwUvDy/OJzKFgxKeTQ+eeUf20FOTuHVkDON2iNa25rAXVYtWJCjw==", - "devOptional": true, + "optional": true, + "peer": true, "dependencies": { "@babel/helper-module-imports": "^7.12.13", "@babel/plugin-syntax-jsx": "^7.12.13", @@ -2240,7 +2244,8 @@ "version": "0.8.0", "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==", - "devOptional": true + "optional": true, + "peer": true }, "node_modules/@emotion/is-prop-valid": { "version": "1.2.0", @@ -2259,13 +2264,15 @@ "version": "0.7.5", "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz", "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==", - "devOptional": true + "optional": true, + "peer": true }, "node_modules/@emotion/react": { "version": "11.9.0", "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.9.0.tgz", "integrity": "sha512-lBVSF5d0ceKtfKCDQJveNAtkC7ayxpVlgOohLgXqRwqWr9bOf4TZAFFyIcNngnV6xK6X4x2ZeXq7vliHkoVkxQ==", - "devOptional": true, + "optional": true, + "peer": true, "dependencies": { "@babel/runtime": "^7.13.10", "@emotion/babel-plugin": "^11.7.1", @@ -2292,7 +2299,8 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.0.3.tgz", "integrity": "sha512-2mSSvgLfyV3q+iVh3YWgNlUc2a9ZlDU7DjuP5MjK3AXRR0dYigCrP99aeFtaB2L/hjfEZdSThn5dsZ0ufqbvsA==", - "devOptional": true, + "optional": true, + "peer": true, "dependencies": { "@emotion/hash": "^0.8.0", "@emotion/memoize": "^0.7.4", @@ -2310,7 +2318,8 @@ "version": "11.8.1", "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.8.1.tgz", "integrity": "sha512-OghEVAYBZMpEquHZwuelXcRjRJQOVayvbmNR0zr174NHdmMgrNkLC6TljKC5h9lZLkN5WGrdUcrKlOJ4phhoTQ==", - "devOptional": true, + "optional": true, + "peer": true, "dependencies": { "@babel/runtime": "^7.13.10", "@emotion/babel-plugin": "^11.7.1", @@ -2336,7 +2345,8 @@ "version": "0.7.5", "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==", - "devOptional": true + "optional": true, + "peer": true }, "node_modules/@emotion/utils": { "version": "1.2.0", @@ -2347,7 +2357,8 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz", "integrity": "sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==", - "devOptional": true + "optional": true, + "peer": true }, "node_modules/@eslint/eslintrc": { "version": "0.4.3", @@ -4107,6 +4118,43 @@ "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.0.tgz", "integrity": "sha512-lLseUPEhSFUXYTKj6q7s2O3s2vW2ebgA11vMAlKodXGf5AFw4zUoEbTz9CoFOC9jS6xY4Qr8BmRnxP/odT4Uuw==" }, + "node_modules/@mui/base": { + "version": "5.0.0-alpha.90", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.90.tgz", + "integrity": "sha512-hNKwzr+RkiuGsGrakz8Q2i5ezr4Dz4b4Qsdipt9SiMrhuFAra/i501VSaEIzwec9LC4G+vtW4fE7yJBB0XaAYw==", + "dependencies": { + "@babel/runtime": "^7.17.2", + "@emotion/is-prop-valid": "^1.1.3", + "@mui/types": "^7.1.4", + "@mui/utils": "^5.9.1", + "@popperjs/core": "^2.11.5", + "clsx": "^1.2.1", + "prop-types": "^15.8.1", + "react-is": "^18.2.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/base/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + }, "node_modules/@mui/icons-material": { "version": "5.8.2", "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.8.2.tgz", @@ -4175,38 +4223,6 @@ } } }, - "node_modules/@mui/material/node_modules/@mui/base": { - "version": "5.0.0-alpha.90", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.90.tgz", - "integrity": "sha512-hNKwzr+RkiuGsGrakz8Q2i5ezr4Dz4b4Qsdipt9SiMrhuFAra/i501VSaEIzwec9LC4G+vtW4fE7yJBB0XaAYw==", - "dependencies": { - "@babel/runtime": "^7.17.2", - "@emotion/is-prop-valid": "^1.1.3", - "@mui/types": "^7.1.4", - "@mui/utils": "^5.9.1", - "@popperjs/core": "^2.11.5", - "clsx": "^1.2.1", - "prop-types": "^15.8.1", - "react-is": "^18.2.0" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui" - }, - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@mui/material/node_modules/@mui/system": { "version": "5.10.0", "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.0.tgz", @@ -4303,14 +4319,32 @@ } } }, - "node_modules/@mui/material/node_modules/@mui/utils": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.9.3.tgz", - "integrity": "sha512-l0N5bcrenE9hnwZ/jPecpIRqsDFHkPXoFUcmkgysaJwVZzJ3yQkGXB47eqmXX5yyGrSc6HksbbqXEaUya+siew==", + "node_modules/@mui/material/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + }, + "node_modules/@mui/types": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.1.5.tgz", + "integrity": "sha512-HnRXrxgHJYJcT8ZDdDCQIlqk0s0skOKD7eWs9mJgBUu70hyW4iA6Kiv3yspJR474RFH8hysKR65VVSzUSzkuwA==", + "peerDependencies": { + "@types/react": "*" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils": { + "version": "5.14.7", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.14.7.tgz", + "integrity": "sha512-RtheP/aBoPogVdi8vj8Vo2IFnRa4mZVmnD0RGlVZ49yF60rZs+xP4/KbpIrTr83xVs34QmHQ2aQ+IX7I0a0dDw==", "dependencies": { - "@babel/runtime": "^7.17.2", + "@babel/runtime": "^7.22.10", "@types/prop-types": "^15.7.5", - "@types/react-is": "^16.7.1 || ^17.0.0", + "@types/react-is": "^18.2.1", "prop-types": "^15.8.1", "react-is": "^18.2.0" }, @@ -4325,24 +4359,11 @@ "react": "^17.0.0 || ^18.0.0" } }, - "node_modules/@mui/material/node_modules/react-is": { + "node_modules/@mui/utils/node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" }, - "node_modules/@mui/types": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.1.5.tgz", - "integrity": "sha512-HnRXrxgHJYJcT8ZDdDCQIlqk0s0skOKD7eWs9mJgBUu70hyW4iA6Kiv3yspJR474RFH8hysKR65VVSzUSzkuwA==", - "peerDependencies": { - "@types/react": "*" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@noble/hashes": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", @@ -4488,6 +4509,14 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, + "node_modules/@remix-run/router": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.8.0.tgz", + "integrity": "sha512-mrfKqIHnSZRyIzBcanNJmVQELTnX+qagEDlcKO90RgRBVOZGSGvZKeDihTRfWcqoDn5N/NkUcwWTccnpN18Tfg==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@rollup/plugin-node-resolve": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz", @@ -5093,9 +5122,9 @@ } }, "node_modules/@terra-money/station-connector": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@terra-money/station-connector/-/station-connector-1.0.12.tgz", - "integrity": "sha512-SJZHqn4EvhAHqBSFJrTE9rvgti+CQ7sGr7MESbAErg7PMrenvfGxLRq/RmPvudAoB0cpGAwXK2CinDfvIbVnhQ==", + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@terra-money/station-connector/-/station-connector-1.0.15.tgz", + "integrity": "sha512-iCLXPPmQXyP8egOi7FA3U5MuEeMMrVnUaRiCUrBLuh4QNPCmJar082ilKDEavgkczKXNIqEGCAAT0LVrky/TPA==", "dependencies": { "bech32": "^2.0.0" }, @@ -5109,12 +5138,12 @@ } }, "node_modules/@terra-money/station-wallet": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@terra-money/station-wallet/-/station-wallet-1.0.12.tgz", - "integrity": "sha512-phZM4iC7J0pqXMjJsEW2twYgIz/RXiyUAromLZZFTdUhSQV/a8ADR4gP94PpXw0DW++22O9McYTjzEPgU8TFEg==", + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@terra-money/station-wallet/-/station-wallet-1.0.15.tgz", + "integrity": "sha512-izfM7rfWru5KAb4iWytYOWAJTwARWNxEixYO21KRQ9mfPwN0qrpHCyinItmQmzMdReCNPtbxHP1CUfMJnxGKWA==", "dependencies": { - "@terra-money/station-connector": "^1.0.12", - "@terra-money/wallet-interface": "^1.0.12" + "@terra-money/station-connector": "^1.0.15", + "@terra-money/wallet-interface": "^1.0.15" }, "engines": { "node": ">=16" @@ -5211,9 +5240,9 @@ } }, "node_modules/@terra-money/wallet-interface": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@terra-money/wallet-interface/-/wallet-interface-1.0.12.tgz", - "integrity": "sha512-WOcD39oTiCOagv9C/Y3Qff+rElsqn3fRSe8vGyhbG0Y7R+3ZzShMnpqKoch3diuD/EdaesYpKoRNv3KPrvq3Yw==", + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@terra-money/wallet-interface/-/wallet-interface-1.0.15.tgz", + "integrity": "sha512-PBlqxxojL1ufxNoL/jpNMa0LHvQDQ+4r3fmaOPv1smQAaMIxFraw46DQg8XTp7GpMQfCazbM0Kx5+xhmC4gl7Q==", "engines": { "node": ">=16" }, @@ -5222,12 +5251,12 @@ } }, "node_modules/@terra-money/wallet-kit": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@terra-money/wallet-kit/-/wallet-kit-1.0.12.tgz", - "integrity": "sha512-jEhgn2ojFJKNxeJf8Uq6nUDwQghDKl1Z8OERtf4eg/aOC5OMeBH/HUxHEVxomelMNFRoZbFBep5Q/NLE8GKmdQ==", + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@terra-money/wallet-kit/-/wallet-kit-1.0.15.tgz", + "integrity": "sha512-zYUcLJUEyOypKOYmRnBKkYFKZL2eRpsujo00vMXLpusH9Abw0KIZk2l0HaT2DgJOfWRwtiCpA/g7sZJyhfKBTA==", "dependencies": { - "@terra-money/station-wallet": "^1.0.12", - "@terra-money/wallet-interface": "^1.0.12" + "@terra-money/station-wallet": "^1.0.15", + "@terra-money/wallet-interface": "^1.0.15" }, "engines": { "node": ">=16" @@ -5235,7 +5264,7 @@ "peerDependencies": { "@terra-money/feather.js": "^1.0.8", "axios": "^0.27.2", - "react": "^17.0.2" + "react": "^18.2.0" } }, "node_modules/@tippyjs/react": { @@ -5513,9 +5542,9 @@ } }, "node_modules/@types/react": { - "version": "18.0.10", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.10.tgz", - "integrity": "sha512-dIugadZuIPrRzvIEevIu7A1smqOAjkSMv8qOfwPt9Ve6i6JT/FQcCHyk2qIAxwsQNKZt5/oGR0T4z9h2dXRAkg==", + "version": "18.2.21", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.21.tgz", + "integrity": "sha512-neFKG/sBAwGxHgXiIxnbm3/AAVQ/cMRS93hvBpg8xYRbeQSPVABp9U2bRnPf0iI4+Ucdv3plSxKK+3CW2ENJxA==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -5532,18 +5561,18 @@ } }, "node_modules/@types/react-dom": { - "version": "18.0.5", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.5.tgz", - "integrity": "sha512-OWPWTUrY/NIrjsAPkAk1wW9LZeIjSvkXRhclsFO8CZcZGCOg2G0YZy4ft+rOyYxy8B7ui5iZzi9OkDebZ7/QSA==", + "version": "18.2.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.7.tgz", + "integrity": "sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA==", "dev": true, "dependencies": { "@types/react": "*" } }, "node_modules/@types/react-is": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@types/react-is/-/react-is-17.0.3.tgz", - "integrity": "sha512-aBTIWg1emtu95bLTLx0cpkxwGW3ueZv71nE2YFBpL8k/z5czEW8yYpOo8Dp+UUAFAtKwNaOsh/ioSeQnWlZcfw==", + "version": "18.2.1", + "resolved": "https://registry.npmjs.org/@types/react-is/-/react-is-18.2.1.tgz", + "integrity": "sha512-wyUkmaaSZEzFZivD8F2ftSyAfk6L+DfFliVj/mYdOXbVjRcS87fQJLTnhk6dRZPuJjI+9g6RZJO4PNCngUrmyw==", "dependencies": { "@types/react": "*" } @@ -7072,7 +7101,8 @@ "version": "2.8.0", "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz", "integrity": "sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==", - "devOptional": true, + "optional": true, + "peer": true, "dependencies": { "@babel/runtime": "^7.7.2", "cosmiconfig": "^6.0.0", @@ -8262,9 +8292,9 @@ } }, "node_modules/classnames": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", - "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" }, "node_modules/clean-css": { "version": "4.2.4", @@ -8845,7 +8875,8 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", - "devOptional": true, + "optional": true, + "peer": true, "dependencies": { "@types/parse-json": "^4.0.0", "import-fresh": "^3.1.0", @@ -12074,9 +12105,12 @@ "dev": true }, "node_modules/fast-equals": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-2.0.4.tgz", - "integrity": "sha512-caj/ZmjHljPrZtbzJ3kfH5ia/k4mTJe/qSiXAGzxZWRZgsgDV0cvNaQULqUX8t0/JVlzzEdYOwCN5DmzTxoD4w==" + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.0.1.tgz", + "integrity": "sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==", + "engines": { + "node": ">=6.0.0" + } }, "node_modules/fast-glob": { "version": "3.2.11", @@ -12298,7 +12332,8 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", - "devOptional": true + "optional": true, + "peer": true }, "node_modules/find-up": { "version": "4.1.0", @@ -13251,14 +13286,6 @@ "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==", "dev": true }, - "node_modules/history": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/history/-/history-5.3.0.tgz", - "integrity": "sha512-ZqaKwjjrAYUYfLG+htGaIIZ4nioX2L70ZUMIFysS3xvBsSG4x/n1V6TXV3N8ZYNuFGlDirFg32T7B6WOUPDYcQ==", - "dependencies": { - "@babel/runtime": "^7.7.6" - } - }, "node_modules/hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -21287,9 +21314,9 @@ } }, "node_modules/qrcode.react": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/qrcode.react/-/qrcode.react-3.0.2.tgz", - "integrity": "sha512-8F3SGxSkNb3fMIHdlseqjFjLbsPrF3WvF/1MOboSUUHytT537W8f/FtbdA3XFIHDrc+TrRBjTI/QLmwhAIGWWw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/qrcode.react/-/qrcode.react-3.1.0.tgz", + "integrity": "sha512-oyF+Urr3oAMUG/OiOuONL3HXM+53wvuH3mtIWQrYmsXoAq0DkvZp2RYUWFSMFtbdOpuS++9v+WAkzNVkMlNW6Q==", "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } @@ -21452,12 +21479,11 @@ } }, "node_modules/react": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", - "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" }, "engines": { "node": ">=0.10.0" @@ -21633,16 +21659,15 @@ } }, "node_modules/react-dom": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", - "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", "dependencies": { "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "scheduler": "^0.20.2" + "scheduler": "^0.23.0" }, "peerDependencies": { - "react": "17.0.2" + "react": "^18.2.0" } }, "node_modules/react-error-overlay": { @@ -21652,9 +21677,9 @@ "dev": true }, "node_modules/react-hook-form": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.22.5.tgz", - "integrity": "sha512-Q2zaeQFXdVQ8l3hcywhltH+Nzj4vo50wMVujHDVN/1Xy9IOaSZJwYBXA2CYTpK6rq41fnXviw3jTLb04c7Gu9Q==", + "version": "7.46.1", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.46.1.tgz", + "integrity": "sha512-0GfI31LRTBd5tqbXMGXT1Rdsv3rnvy0FjEk8Gn9/4tp6+s77T7DPZuGEpBRXOauL+NhyGT5iaXzdIM2R6F/E+w==", "engines": { "node": ">=12.22.0" }, @@ -21663,7 +21688,7 @@ "url": "https://opencollective.com/react-hook-form" }, "peerDependencies": { - "react": "^16.8.0 || ^17" + "react": "^16.8.0 || ^17 || ^18" } }, "node_modules/react-i18next": { @@ -21717,9 +21742,9 @@ } }, "node_modules/react-query": { - "version": "3.39.1", - "resolved": "https://registry.npmjs.org/react-query/-/react-query-3.39.1.tgz", - "integrity": "sha512-qYKT1bavdDiQZbngWZyPotlBVzcBjDYEJg5RQLBa++5Ix5jjfbEYJmHSZRZD+USVHUSvl/ey9Hu+QfF1QAK80A==", + "version": "3.39.3", + "resolved": "https://registry.npmjs.org/react-query/-/react-query-3.39.3.tgz", + "integrity": "sha512-nLfLz7GiohKTJDuT4us4X3h/8unOh+00MLb2yJoGTPjxKs2bc1iDhkNx2bd5MKklXnOD3NrVZ+J2UXujA5In4g==", "dependencies": { "@babel/runtime": "^7.5.5", "broadcast-channel": "^3.4.1", @@ -21763,23 +21788,29 @@ } }, "node_modules/react-router": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.3.0.tgz", - "integrity": "sha512-7Wh1DzVQ+tlFjkeo+ujvjSqSJmkt1+8JO+T5xklPlgrh70y7ogx75ODRW0ThWhY7S+6yEDks8TYrtQe/aoboBQ==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.15.0.tgz", + "integrity": "sha512-NIytlzvzLwJkCQj2HLefmeakxxWHWAP+02EGqWEZy+DgfHHKQMUoBBjUQLOtFInBMhWtb3hiUy6MfFgwLjXhqg==", "dependencies": { - "history": "^5.2.0" + "@remix-run/router": "1.8.0" + }, + "engines": { + "node": ">=14.0.0" }, "peerDependencies": { "react": ">=16.8" } }, "node_modules/react-router-dom": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.3.0.tgz", - "integrity": "sha512-uaJj7LKytRxZNQV8+RbzJWnJ8K2nPsOOEuX7aQstlMZKQT0164C+X2w6bnkqU3sjtLvpd5ojrezAyfZ1+0sStw==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.15.0.tgz", + "integrity": "sha512-aR42t0fs7brintwBGAv2+mGlCtgtFQeOzK0BM1/OiqEzRejOZtpMZepvgkscpMUnKb8YO84G7s3LsHnnDNonbQ==", "dependencies": { - "history": "^5.2.0", - "react-router": "6.3.0" + "@remix-run/router": "1.8.0", + "react-router": "6.15.0" + }, + "engines": { + "node": ">=14.0.0" }, "peerDependencies": { "react": ">=16.8", @@ -22006,11 +22037,11 @@ } }, "node_modules/react-smooth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/react-smooth/-/react-smooth-2.0.1.tgz", - "integrity": "sha512-Own9TA0GPPf3as4vSwFhDouVfXP15ie/wIHklhyKBH5AN6NFtdk0UpHBnonV11BtqDkAWlt40MOUc+5srmW7NA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/react-smooth/-/react-smooth-2.0.3.tgz", + "integrity": "sha512-yl4y3XiMorss7ayF5QnBiSprig0+qFHui8uh7Hgg46QX5O+aRMRKlfGGNGLHno35JkQSvSYY8eCWkBfHfrSHfg==", "dependencies": { - "fast-equals": "^2.0.0", + "fast-equals": "^5.0.0", "react-transition-group": "2.9.0" }, "peerDependencies": { @@ -22043,9 +22074,9 @@ } }, "node_modules/react-transition-group": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.2.tgz", - "integrity": "sha512-/RNYfRAMlZwDSr6z4zNKV6xu53/e2BuaBbGhbyYIXTrmgu/bGHzmqOs7mJSJBHy9Ud+ApHx3QjrkKSp1pxvlFg==", + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", "dependencies": { "@babel/runtime": "^7.5.5", "dom-helpers": "^5.0.1", @@ -22257,7 +22288,8 @@ "node_modules/regenerator-runtime": { "version": "0.13.9", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true }, "node_modules/regenerator-transform": { "version": "0.15.0", @@ -23290,12 +23322,11 @@ } }, "node_modules/scheduler": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", - "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" } }, "node_modules/schema-utils": { diff --git a/package.json b/package.json index 833395253..1aad62374 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,11 @@ "hompage": "https://station.money", "author": "Terra (https://station.money)", "repository": "github:terra-money/station", - "version": "7.3.3", + "version": "7.3.4", "license": "MIT", "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", + "start": "echo \"$CF_PAGES_COMMIT_SHA\" > public/commit_hash && react-scripts start", + "build": "echo \"$CF_PAGES_COMMIT_SHA\" > public/commit_hash && react-scripts build", "test": "react-scripts test", "prepare": "husky install", "pre-commit": "lint-staged", @@ -34,13 +34,13 @@ "@terra-money/terra-utils": "^1.0.9", "@terra-money/terra.js": "^3.1.9", "@terra-money/terra.proto": "^2.0.0", - "@terra-money/wallet-kit": "^1.0.12", + "@terra-money/wallet-kit": "^1.0.15", "@tippyjs/react": "^4.2.6", "axios": "^0.27.2", "bech32": "^2.0.0", "bignumber.js": "^9.0.2", "buffer": "^6.0.3", - "classnames": "^2.3.1", + "classnames": "^2.3.2", "crypto-js": "^4.1.1", "date-fns": "^2.28.0", "i18next": "^21.8.14", @@ -51,17 +51,17 @@ "lottie-react": "^2.3.1", "numeral": "^2.0.6", "prettier": "^2.6.2", - "qrcode.react": "^3.0.2", + "qrcode.react": "^3.1.0", "qs": "^6.11.0", "ramda": "^0.28.0", - "react": "^17.0.2", + "react": "^18.2.0", "react-copy-to-clipboard": "^5.1.0", - "react-dom": "^17.0.2", - "react-hook-form": "7.22.5", + "react-dom": "^18.2.0", + "react-hook-form": "^7.29.0", "react-i18next": "^11.18.1", "react-modal": "^3.15.1", - "react-query": "^3.39.0", - "react-router-dom": "^6.3.0", + "react-query": "^3.39.3", + "react-router-dom": "^6.15.0", "recharts": "^2.1.16", "recoil": "^0.7.2", "sass": "^1.52.1", @@ -71,8 +71,6 @@ "xss": "1.0.11" }, "devDependencies": { - "@emotion/react": "^11.9.0", - "@emotion/styled": "^11.8.1", "@types/crypto-js": "^4.1.1", "@types/jest": "^27.5.1", "@types/node": "^17.0.35", @@ -80,9 +78,9 @@ "@types/qrcode.react": "^1.0.2", "@types/qs": "^6.9.7", "@types/ramda": "^0.28.13", - "@types/react": "^18.0.9", + "@types/react": "^18.2.21", "@types/react-copy-to-clipboard": "^5.0.2", - "@types/react-dom": "^18.0.5", + "@types/react-dom": "^18.2.7", "@types/react-modal": "^3.13.1", "@types/react-router-dom": "^5.3.3", "@types/secp256k1": "^4.0.3", diff --git a/src/app/App.tsx b/src/app/App.tsx index 9b2d589d2..1c9c27668 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -34,6 +34,7 @@ import Wallet from "pages/wallet/Wallet" import NavButton from "./sections/NavButton" import NetworkStatus from "components/display/NetworkStatus" import EnableCoinType from "./sections/EnableCoinType" +import UpdateNotification from "./update/UpdateNotification" const App = () => { const { element: routes } = useNav() @@ -81,6 +82,7 @@ const App = () => { + ) } diff --git a/src/app/components/Overlay.tsx b/src/app/components/Overlay.tsx index b8e0e0021..91b34d3a9 100644 --- a/src/app/components/Overlay.tsx +++ b/src/app/components/Overlay.tsx @@ -2,11 +2,13 @@ import classNames from "classnames" import { PropsWithChildren } from "react" import styles from "./Overlay.module.scss" +const cx = classNames.bind(styles) + const Overlay = ({ children, className, }: PropsWithChildren<{ className?: string }>) => { - return
{children}
+ return
{children}
} export default Overlay diff --git a/src/app/update/UpdateNotification.module.scss b/src/app/update/UpdateNotification.module.scss new file mode 100644 index 000000000..1c549e132 --- /dev/null +++ b/src/app/update/UpdateNotification.module.scss @@ -0,0 +1,26 @@ +@import "mixins"; + +.notification { + z-index: 1000; + position: absolute; + bottom: 1.2rem; + left: 50%; + transform: translate(-50%, 0); + background-color: var(--bg); + padding: 0.5rem 1.4rem; + border-radius: 1rem; + //font-size: var(--font-size-small); + white-space: nowrap; + // same shadow as send/receive/buy buttons + box-shadow: inset 0px 1.5px 0px 0px rgb(255 255 255 / 8%), + 0px 4px 24px 0px rgb(36 36 40 / 30%); + + button { + color: var(--button-primary-bg); + margin-left: 1rem; + + &:hover { + text-decoration: underline; + } + } +} diff --git a/src/app/update/UpdateNotification.tsx b/src/app/update/UpdateNotification.tsx new file mode 100644 index 000000000..60fab1927 --- /dev/null +++ b/src/app/update/UpdateNotification.tsx @@ -0,0 +1,44 @@ +import { RefetchOptions } from "data/query" +import { useQuery } from "react-query" +import styles from "./UpdateNotification.module.scss" +import { useTranslation } from "react-i18next" +import axios from "axios" +import { useEffect, useRef, useState } from "react" + +const useCommithash = (disabled: boolean) => { + return useQuery( + [], + async () => { + // fetch commit_hash file created at build time + const { data: commit_hash } = await axios.get("/commit_hash") + return commit_hash + }, + { ...RefetchOptions.DEFAULT, enabled: !disabled } + ) +} + +export default function UpdateNotification() { + const old_commit_hash = useRef() + const { t } = useTranslation() + const [showNotification, setShownotification] = useState(false) + const { data: commit_hash } = useCommithash(showNotification) + + useEffect(() => { + if (showNotification) return + if (!old_commit_hash.current) old_commit_hash.current = commit_hash + + setShownotification(old_commit_hash.current !== commit_hash) + }, [commit_hash, showNotification]) + + // no update available or request still in progress + // (comment out next line to test) + if (!showNotification) return null + + // update available + return ( +
+ {t("There is a new version available")} + +
+ ) +} diff --git a/src/auth/hooks/useNetwork.ts b/src/auth/hooks/useNetwork.ts index 99f959128..eaebc21eb 100644 --- a/src/auth/hooks/useNetwork.ts +++ b/src/auth/hooks/useNetwork.ts @@ -54,6 +54,7 @@ export const useNetwork = (): Record => { const wallet = useRecoilValue(walletState) const connectedWallet = useWallet() const { customLCDs } = useCustomLCDs() + const useOverrideAssets = process.env.REACT_APP_STATION_ASSETS function withCustomLCDs(networks: Record) { return Object.fromEntries( @@ -64,6 +65,10 @@ export const useNetwork = (): Record => { ) } + if (useOverrideAssets) { + return networks[network] + } + // check connected wallet if (connectedWallet.status === WalletStatus.CONNECTED) { if (network !== "mainnet" && "phoenix-1" in connectedWallet.network) { @@ -81,27 +86,9 @@ export const useNetwork = (): Record => { ) { setNetwork("localterra") } - - const networksWithVersion = Object.fromEntries( - Object.entries( - connectedWallet.network as Record - ).map(([key, value]) => { - if (value.version === undefined) { - if (key === "phoenix-1" || key === "pisco-1") { - return [ - key, - { - ...value, - version: "0.46", - }, - ] - } - } - return [key, value] - }) + return filterEnabledNetworks( + connectedWallet.network as Record ) - - return filterEnabledNetworks(networksWithVersion) } // multisig wallet are supported only on terra diff --git a/src/auth/modules/create/CreateMultisigWalletForm.tsx b/src/auth/modules/create/CreateMultisigWalletForm.tsx index e50a54e5d..3f4ede273 100644 --- a/src/auth/modules/create/CreateMultisigWalletForm.tsx +++ b/src/auth/modules/create/CreateMultisigWalletForm.tsx @@ -13,7 +13,7 @@ import { Grid } from "components/layout" import { Form, FormGroup, FormItem } from "components/form" import { FormError, FormWarning } from "components/form" import { Input, Submit, Paste } from "components/form" -import validate from "../../scripts/validate" +import validate from "auth/scripts/validate" interface Values { addresses: { value: AccAddress }[] @@ -125,7 +125,7 @@ const CreateMultisigWalletForm = ({ onCreated }: Props) => { diff --git a/src/auth/scripts/validate.ts b/src/auth/scripts/validate.ts index 87516669a..3de97a87c 100644 --- a/src/auth/scripts/validate.ts +++ b/src/auth/scripts/validate.ts @@ -1,3 +1,4 @@ +import { AccAddress } from "@terra-money/feather.js" import { getStoredWallet } from "./keystore" import wordlist from "bip39/src/wordlists/english.json" @@ -21,7 +22,10 @@ const validate = { } }, }, - + accAddress: { + address: (address: string) => + AccAddress.validate(address) || "Invalid address", + }, password: { required: (password: string) => !!password.length || "Password is required", length: (password: string) => diff --git a/src/components/display/Tag.tsx b/src/components/display/Tag.tsx index a5c2d6e2a..b372e68e4 100644 --- a/src/components/display/Tag.tsx +++ b/src/components/display/Tag.tsx @@ -12,7 +12,7 @@ interface Props { } const Tag = ({ color, small, children }: PropsWithChildren) => { - const className = classNames(styles.tag, `bg-${color}`, cx({ small })) + const className = cx(styles.tag, `bg-${color}`, { small }) return {children} } diff --git a/src/components/form/FormHelp.tsx b/src/components/form/FormHelp.tsx index 36ca4e4bf..40526dfcc 100644 --- a/src/components/form/FormHelp.tsx +++ b/src/components/form/FormHelp.tsx @@ -4,10 +4,12 @@ import InfoIcon from "@mui/icons-material/Info" import { Flex } from "../layout" import styles from "./FormHelp.module.scss" +const cx = classNames.bind(styles) + const Component = (props: PropsWithChildren<{ className: string }>) => { const { children, className } = props return ( -
+
diff --git a/src/components/form/Input.tsx b/src/components/form/Input.tsx index 34dca40d2..9801ac83f 100644 --- a/src/components/form/Input.tsx +++ b/src/components/form/Input.tsx @@ -40,9 +40,7 @@ const Input = forwardRef( {token && ( {({ symbol }) => ( - - {symbol} - + {symbol} )} )} @@ -50,7 +48,7 @@ const Input = forwardRef( {actionButton && (