diff --git a/.github/workflows/flow-and-lint.yml b/.github/workflows/flow-and-lint.yml index 85b6cdfab6..c53ccaf7c8 100644 --- a/.github/workflows/flow-and-lint.yml +++ b/.github/workflows/flow-and-lint.yml @@ -1,4 +1,4 @@ -name: Flow and lint +name: Flow and Lint and TSC on: workflow_dispatch: @@ -43,4 +43,7 @@ jobs: npm run flow - name: lint run: | - npm run eslint \ No newline at end of file + npm run eslint + - name: tsc + run: | + npm run tsc \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 146d983e00..347135abdb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -116,9 +116,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.6.tgz", - "integrity": "sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", + "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" @@ -137,24 +137,27 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", - "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -1570,16 +1573,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.8.0.tgz", - "integrity": "sha512-wORFWjU30B2WJ/aXBfOm1LX9v9nyt9D3jsSOxC3cCaTQGCW5k4jNpmjFv3U7p/7s4yvdjHzwtv2Sd2dOyhjS0A==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.16.0.tgz", + "integrity": "sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.8.0", - "@typescript-eslint/type-utils": "8.8.0", - "@typescript-eslint/utils": "8.8.0", - "@typescript-eslint/visitor-keys": "8.8.0", + "@typescript-eslint/scope-manager": "8.16.0", + "@typescript-eslint/type-utils": "8.16.0", + "@typescript-eslint/utils": "8.16.0", + "@typescript-eslint/visitor-keys": "8.16.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -1603,15 +1606,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.8.0.tgz", - "integrity": "sha512-uEFUsgR+tl8GmzmLjRqz+VrDv4eoaMqMXW7ruXfgThaAShO9JTciKpEsB+TvnfFfbg5IpujgMXVV36gOJRLtZg==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.16.0.tgz", + "integrity": "sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.8.0", - "@typescript-eslint/types": "8.8.0", - "@typescript-eslint/typescript-estree": "8.8.0", - "@typescript-eslint/visitor-keys": "8.8.0", + "@typescript-eslint/scope-manager": "8.16.0", + "@typescript-eslint/types": "8.16.0", + "@typescript-eslint/typescript-estree": "8.16.0", + "@typescript-eslint/visitor-keys": "8.16.0", "debug": "^4.3.4" }, "engines": { @@ -1631,13 +1634,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.8.0.tgz", - "integrity": "sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.16.0.tgz", + "integrity": "sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.8.0", - "@typescript-eslint/visitor-keys": "8.8.0" + "@typescript-eslint/types": "8.16.0", + "@typescript-eslint/visitor-keys": "8.16.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1648,13 +1651,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.8.0.tgz", - "integrity": "sha512-IKwJSS7bCqyCeG4NVGxnOP6lLT9Okc3Zj8hLO96bpMkJab+10HIfJbMouLrlpyOr3yrQ1cA413YPFiGd1mW9/Q==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.16.0.tgz", + "integrity": "sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.8.0", - "@typescript-eslint/utils": "8.8.0", + "@typescript-eslint/typescript-estree": "8.16.0", + "@typescript-eslint/utils": "8.16.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -1665,6 +1668,9 @@ "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, "peerDependenciesMeta": { "typescript": { "optional": true @@ -1672,9 +1678,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.0.tgz", - "integrity": "sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.16.0.tgz", + "integrity": "sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1685,13 +1691,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.0.tgz", - "integrity": "sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.16.0.tgz", + "integrity": "sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.8.0", - "@typescript-eslint/visitor-keys": "8.8.0", + "@typescript-eslint/types": "8.16.0", + "@typescript-eslint/visitor-keys": "8.16.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1737,15 +1743,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.8.0.tgz", - "integrity": "sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.16.0.tgz", + "integrity": "sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.8.0", - "@typescript-eslint/types": "8.8.0", - "@typescript-eslint/typescript-estree": "8.8.0" + "@typescript-eslint/scope-manager": "8.16.0", + "@typescript-eslint/types": "8.16.0", + "@typescript-eslint/typescript-estree": "8.16.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1756,16 +1762,21 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.0.tgz", - "integrity": "sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.16.0.tgz", + "integrity": "sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.8.0", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.16.0", + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1775,6 +1786,18 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@webpack-cli/configtest": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", @@ -3106,9 +3129,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz", - "integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -3285,9 +3308,9 @@ } }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "engines": { "node": ">=6" @@ -6673,9 +6696,9 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true }, "node_modules/picomatch": { @@ -8125,9 +8148,9 @@ } }, "node_modules/ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.2.tgz", + "integrity": "sha512-ZF5gQIQa/UmzfvxbHZI3JXN0/Jt+vnAfAviNRAMc491laiK6YCLpCW9ft8oaCRFOTxCZtUTE6XB0ZQAe3olntw==", "dev": true, "engines": { "node": ">=16" diff --git a/packages/e2e-tests/package-lock.json b/packages/e2e-tests/package-lock.json index 284e8c0295..f7064c2d92 100644 --- a/packages/e2e-tests/package-lock.json +++ b/packages/e2e-tests/package-lock.json @@ -41,7 +41,7 @@ "@emurgo/cardano-serialization-lib-nodejs": "^12.0.0-alpha.26", "bignumber.js": "^9.1.2", "chai": "^4.3.10", - "chromedriver": "130.0.1", + "chromedriver": "131.0.0", "cross-env": "^7.0.3", "json-server": "^0.17.4", "mocha": "^10.2.0", @@ -450,9 +450,9 @@ } }, "node_modules/chromedriver": { - "version": "130.0.1", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-130.0.1.tgz", - "integrity": "sha512-JH+OxDZ7gVv02r9oXwj4mQ8JCtj62g0fCD1LMUUYdB/4mPxn/E2ys+1IzXItoE7vXM9fGVc9R1akvXLqwwuSww==", + "version": "131.0.0", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-131.0.0.tgz", + "integrity": "sha512-ukYmdCox2eRsjpCYUB4AOLV1fSfWQ1ZPfcUc0PIUWZKoyjyXKEl8i4DJ14bcNzNbEvaVx2Z2pnx/nLK2CM+ruQ==", "dev": true, "hasInstallScript": true, "dependencies": { diff --git a/packages/e2e-tests/package.json b/packages/e2e-tests/package.json index 7498dade11..7d9dfc8772 100644 --- a/packages/e2e-tests/package.json +++ b/packages/e2e-tests/package.json @@ -47,7 +47,7 @@ "@emurgo/cardano-serialization-lib-nodejs": "^12.0.0-alpha.26", "bignumber.js": "^9.1.2", "chai": "^4.3.10", - "chromedriver": "130.0.1", + "chromedriver": "131.0.0", "cross-env": "^7.0.3", "json-server": "^0.17.4", "mocha": "^10.2.0", diff --git a/packages/yoroi-extension/.gitignore b/packages/yoroi-extension/.gitignore index e5f88b3bce..fad4529c33 100644 --- a/packages/yoroi-extension/.gitignore +++ b/packages/yoroi-extension/.gitignore @@ -45,4 +45,6 @@ Yoroi Shelley Testnet .netlify # SSL overrides for DEV -scripts/sslOverrides.js \ No newline at end of file +scripts/sslOverrides.js + +app/UI/**/*.d.ts diff --git a/packages/yoroi-extension/app/UI/components/BackButton.tsx b/packages/yoroi-extension/app/UI/components/BackButton.tsx new file mode 100644 index 0000000000..7f50212dbb --- /dev/null +++ b/packages/yoroi-extension/app/UI/components/BackButton.tsx @@ -0,0 +1,26 @@ +import { Button, Typography } from '@mui/material'; +import { styled } from '@mui/material/styles'; +import React from 'react'; +import { ReactComponent as BackIcon } from '../../assets/images/assets-page/back-arrow.inline.svg'; + +const SButton = styled(Button)(({ theme }: any) => ({ + color: theme.palette.ds.el_gray_medium, + '&.MuiButton-sizeMedium': { + padding: '13px 16px', + }, + '& svg': { + '& path': { + fill: theme.palette.ds.el_gray_medium, + }, + }, +})); + +export const BackButton = ({ label, onAction }: { label: string; onAction: () => void }) => { + return ( + }> + + {label} + + + ); +}; diff --git a/packages/yoroi-extension/app/UI/components/Collapsible/Collapsible.tsx b/packages/yoroi-extension/app/UI/components/Collapsible/Collapsible.tsx index f587de6765..0d635d7d0c 100644 --- a/packages/yoroi-extension/app/UI/components/Collapsible/Collapsible.tsx +++ b/packages/yoroi-extension/app/UI/components/Collapsible/Collapsible.tsx @@ -38,17 +38,18 @@ const AccordionDetails = styled(MuiAccordionDetails)(({ theme }: any) => ({ type Props = { title: string; content: React.ReactNode; + expanded?: boolean, }; -export const Collapsible = ({ title, content }: Props) => { - const [expanded, setExpanded] = React.useState('none'); +export const Collapsible = ({ title, content, expanded: startExpanded }: Props) => { + const [expanded, setExpanded] = React.useState(startExpanded ?? false); - const handleChange = (panel: string | false) => (_: React.SyntheticEvent, newExpanded: boolean) => { - setExpanded(newExpanded ? panel : false); + const handleChange = (_: React.SyntheticEvent, newExpanded: boolean) => { + setExpanded(newExpanded); }; return ( - + ({ - borderRadius: `${theme.shape.borderRadius}px`, +const StyledInput = styled(OutlinedInput)(({ theme }: any) => ({ width: '320px', height: '40px', - padding: `${theme.spacing(1)} ${theme.spacing(2)} ${theme.spacing(1)} ${theme.spacing(1)}`, - border: '1px solid', - borderColor: theme.palette.ds.gray_400, - 'input::placeholder': { - color: theme.palette.ds.gray_600, + padding: '8px', + '& svg': { + '& path': { + fill: theme.palette.ds.el_gray_low, + }, + }, + '& input::placeholder': { + color: theme.palette.ds.el_gray_low, + opacity: 1, }, })); diff --git a/packages/yoroi-extension/app/UI/components/TransactionFailed/TransactionFailed.tsx b/packages/yoroi-extension/app/UI/components/TransactionFailed/TransactionFailed.tsx index f40ab28149..01884d3619 100644 --- a/packages/yoroi-extension/app/UI/components/TransactionFailed/TransactionFailed.tsx +++ b/packages/yoroi-extension/app/UI/components/TransactionFailed/TransactionFailed.tsx @@ -4,9 +4,12 @@ import { FormattedMessage } from 'react-intl'; import globalMessages from '../../../i18n/global-messages'; import { useNavigateTo } from '../../features/governace/common/useNavigateTo'; import { FailedIlustration } from './FailedIlustration'; +import LocalizableError from '../../../i18n/LocalizableError'; -export const TransactionFailed = () => { +export const TransactionFailed = (props: { error: Error | null }) => { const navigate = useNavigateTo(); + const { error } = props; + return ( @@ -14,7 +17,9 @@ export const TransactionFailed = () => { - + {/* @ts-ignore */} + + + + {intl.formatMessage(messages.paperWallet)} + + + ); } diff --git a/packages/yoroi-extension/app/components/settings/menu/SettingsMenu.js b/packages/yoroi-extension/app/components/settings/menu/SettingsMenu.js index 6d69743fdb..886ce6d4b6 100644 --- a/packages/yoroi-extension/app/components/settings/menu/SettingsMenu.js +++ b/packages/yoroi-extension/app/components/settings/menu/SettingsMenu.js @@ -47,7 +47,7 @@ class SettingsMenu extends Component { render(): Node { const { intl } = this.context; - const { onItemClick, isActiveItem, isRevampLayout } = this.props; + const { onItemClick, isActiveItem } = this.props; const isProduction = environmnent.isProduction(); const settingOptions: Array = [ { @@ -72,9 +72,7 @@ class SettingsMenu extends Component { hidden: isProduction, }, { - label: intl.formatMessage( - isRevampLayout ? globalMessages.termsOfService : globalMessages.termsOfUse - ), + label: intl.formatMessage(globalMessages.termsOfService), route: ROUTES.SETTINGS.TERMS_OF_USE, className: 'termsOfUse', }, @@ -92,18 +90,10 @@ class SettingsMenu extends Component { label: intl.formatMessage(settingsMenuMessages.analytics), route: ROUTES.SETTINGS.ANALYTICS, className: 'analytics', - hidden: !isRevampLayout, }, ]; - return ( - - ); + return ; } } diff --git a/packages/yoroi-extension/app/components/transfer/cards/TransferCards.scss b/packages/yoroi-extension/app/components/transfer/cards/TransferCards.scss index 86fb38fe15..737783f665 100644 --- a/packages/yoroi-extension/app/components/transfer/cards/TransferCards.scss +++ b/packages/yoroi-extension/app/components/transfer/cards/TransferCards.scss @@ -22,7 +22,7 @@ } .tooltipSize { - width: 500px; + max-width: 500px; overflow-wrap: break-word; white-space: normal; } diff --git a/packages/yoroi-extension/app/components/wallet/assets/NFTDetails.js b/packages/yoroi-extension/app/components/wallet/assets/NFTDetails.js index bbc0e9c07f..442e9deadf 100644 --- a/packages/yoroi-extension/app/components/wallet/assets/NFTDetails.js +++ b/packages/yoroi-extension/app/components/wallet/assets/NFTDetails.js @@ -121,7 +121,7 @@ const SImageButton = styled(IconButton)(({ theme }) => ({ })); const STypography = styled(Typography)(({ theme }) => ({ - color: theme.palette.ds.el_gray_medium + color: theme.palette.ds.el_gray_medium, })); function NFTDetails({ nftInfo, network, intl, nextNftId, prevNftId, tab }: Props & Intl): Node { @@ -172,7 +172,9 @@ function NFTDetails({ nftInfo, network, intl, nextNftId, prevNftId, tab }: Props return ( }> - {intl.formatMessage(messages.back)} + + {intl.formatMessage(messages.back)} + { + const colorsByType = { + send: { bg: ds.primary_100, icon: ds.primary_600 }, + receive: { bg: ds.secondary_100, icon: ds.secondary_600 }, + reward: { bg: ds.secondary_100, icon: ds.secondary_600 }, + error: { bg: ds.magenta_100, icon: ds.magenta_500 }, + stake: { bg: ds.secondary_100, icon: ds.secondary_600 }, + }; + + return colorsByType[type] || { bg: ds.primary_100, icon: ds.primary_600 }; +}; + +const IconWrapper = styled(Box)(({ isDark, colors }) => ({ + '& svg': { + '& rect': { + fill: isDark && colors.bg, + }, + '& path': { + fill: isDark && colors.icon, + }, + }, +})); + const TypeIcon = ({ type }) => { const Icon = icons[type]; - return {Icon && }; + const theme = useTheme(); + const colors = getColors(theme.palette.ds, type); + const isDark = theme.name === 'dark-theme'; + + return ( + + + {Icon && } + + + ); }; diff --git a/packages/yoroi-extension/app/components/widgets/Support.js b/packages/yoroi-extension/app/components/widgets/Support.js index 37e0df0313..abdccd642c 100644 --- a/packages/yoroi-extension/app/components/widgets/Support.js +++ b/packages/yoroi-extension/app/components/widgets/Support.js @@ -35,8 +35,8 @@ export default class Support extends Component { } getUrl(): string | null { - if (!environment.userAgentInfo.isExtension()) return null; - const agent = environment.userAgentInfo.isFirefox() ? 'firefox' : 'chrome'; + if (!environment.isExtension()) return null; + const agent = environment.isFirefox() ? 'firefox' : 'chrome'; return `https://emurgo.github.io/yoroi-support/?source=${agent}&extensionId=${window.location.hostname}`; } diff --git a/packages/yoroi-extension/app/connector/containers/SignTxContainer.js b/packages/yoroi-extension/app/connector/containers/SignTxContainer.js index 9355a8ddba..a5941aeac0 100644 --- a/packages/yoroi-extension/app/connector/containers/SignTxContainer.js +++ b/packages/yoroi-extension/app/connector/containers/SignTxContainer.js @@ -51,10 +51,10 @@ export default class SignTxContainer extends Component< // will throw a WrongPasswordError if password is wrong await getPrivateStakingKey({ publicDeriverId: deriver.publicDeriverId, password }); } + await this.props.actions.connector.confirmSignInTx.trigger(password); window.removeEventListener('beforeunload', this.onUnload); window.removeEventListener('unload', this.onUnload); - - await this.props.actions.connector.confirmSignInTx.trigger(password); + window.close(); }; onCancel: () => void = () => { window.removeEventListener('beforeunload', this.onUnload); diff --git a/packages/yoroi-extension/app/connector/stores/ConnectorStore.js b/packages/yoroi-extension/app/connector/stores/ConnectorStore.js index b5fb9e2bff..5c7b730e80 100644 --- a/packages/yoroi-extension/app/connector/stores/ConnectorStore.js +++ b/packages/yoroi-extension/app/connector/stores/ConnectorStore.js @@ -361,7 +361,6 @@ export default class ConnectorStore extends Store { this.actions.connector.cancelSignInTx.remove(this._cancelSignInTx); await ampli.dappPopupSignTransactionSubmitted(); - this._closeWindow(); }; @action _cancelSignInTx: void => void = () => { diff --git a/packages/yoroi-extension/app/containers/profile/LanguageSelectionPage.js b/packages/yoroi-extension/app/containers/profile/LanguageSelectionPage.js index d2699437ff..83eaa41f73 100644 --- a/packages/yoroi-extension/app/containers/profile/LanguageSelectionPage.js +++ b/packages/yoroi-extension/app/containers/profile/LanguageSelectionPage.js @@ -87,6 +87,7 @@ export default class LanguageSelectionPage extends Component ); diff --git a/packages/yoroi-extension/app/containers/settings/categories/BlockchainSettingsPage.js b/packages/yoroi-extension/app/containers/settings/categories/BlockchainSettingsPage.js index caadf4342f..6bd10551e4 100644 --- a/packages/yoroi-extension/app/containers/settings/categories/BlockchainSettingsPage.js +++ b/packages/yoroi-extension/app/containers/settings/categories/BlockchainSettingsPage.js @@ -32,10 +32,10 @@ export default class BlockchainSettingsPage extends Component registerProtocols()} - isFirefox={environment.userAgentInfo.isFirefox()} + isFirefox={environment.isFirefox()} /> ) : null; diff --git a/packages/yoroi-extension/app/containers/settings/categories/SupportSettingsPage.js b/packages/yoroi-extension/app/containers/settings/categories/SupportSettingsPage.js index e0f6b21dac..103d4a4b56 100644 --- a/packages/yoroi-extension/app/containers/settings/categories/SupportSettingsPage.js +++ b/packages/yoroi-extension/app/containers/settings/categories/SupportSettingsPage.js @@ -8,6 +8,7 @@ import { downloadLogs } from '../../../utils/logging'; import type { StoresAndActionsProps } from '../../../types/injectedProps.types'; import IncludePublicKeyDialog from './IncludePublicKeyDialog'; import { ComplexityLevels } from '../../../types/complexityLevelType'; +import { ROUTES } from '../../../routes-config'; @observer export default class SupportSettingsPage extends Component { @@ -54,12 +55,14 @@ export default class SupportSettingsPage extends Component {this.getDialog()} actions.router.redirect.trigger({ route: ROUTES.TRANSFER.ROOT })} /> ); diff --git a/packages/yoroi-extension/app/containers/swap/asset-swap/actions/MiddleActions.js b/packages/yoroi-extension/app/containers/swap/asset-swap/actions/MiddleActions.js index 7f2860824c..90401aab01 100644 --- a/packages/yoroi-extension/app/containers/swap/asset-swap/actions/MiddleActions.js +++ b/packages/yoroi-extension/app/containers/swap/asset-swap/actions/MiddleActions.js @@ -4,16 +4,24 @@ import { ReactComponent as SwitchIcon } from '../../../../assets/images/revamp/i import { useSwapForm } from '../../context/swap-form'; export const MiddleActions = (): React$Node => { - const { clearSwapForm, switchTokens, onChangeLimitPrice } = useSwapForm(); + const { clearSwapForm, switchTokens, onChangeLimitPrice, buyTokenInfo = {} } = useSwapForm(); + + const handleSwitchTokens = () => { + // we have ticker on the buy side, so we can safely switch + if (buyTokenInfo?.ticker) { + onChangeLimitPrice(''); + return switchTokens(); + } + }; return ( { - onChangeLimitPrice(''); - return switchTokens(); + sx={{ + cursor: buyTokenInfo?.ticker ? 'pointer' : 'not-allowed', + color: buyTokenInfo?.ticker ? 'primary.500' : 'grayscale.400', }} + onClick={handleSwitchTokens} > diff --git a/packages/yoroi-extension/app/containers/transfer/Transfer.js b/packages/yoroi-extension/app/containers/transfer/Transfer.js index ef2293064b..fa1262add8 100644 --- a/packages/yoroi-extension/app/containers/transfer/Transfer.js +++ b/packages/yoroi-extension/app/containers/transfer/Transfer.js @@ -1,22 +1,17 @@ // @flow -import type { ComponentType, Node } from 'react'; +import type { Node } from 'react'; +import type { $npm$ReactIntl$IntlFormat } from 'react-intl'; +import type { StoresAndActionsProps } from '../../types/injectedProps.types'; import { Component, lazy, Suspense } from 'react'; import { observer } from 'mobx-react'; -import type { $npm$ReactIntl$IntlFormat } from 'react-intl'; import { intlShape } from 'react-intl'; -import type { StoresAndActionsProps } from '../../types/injectedProps.types'; import TopBarLayout from '../../components/layout/TopBarLayout'; import BannerContainer from '../banners/BannerContainer'; import SidebarContainer from '../SidebarContainer'; -import BackgroundColoredLayout from '../../components/layout/BackgroundColoredLayout'; import NoWalletMessage from '../wallet/NoWalletMessage'; -import UnsupportedWallet from '../wallet/UnsupportedWallet'; import NavBarTitle from '../../components/topbar/NavBarTitle'; -import NavBarContainer from '../NavBarContainer'; import globalMessages from '../../i18n/global-messages'; -import HorizontalLine from '../../components/widgets/HorizontalLine'; -import type { LayoutComponentMap } from '../../styles/context/layout'; -import { withLayout } from '../../styles/context/layout'; +import NavBarContainerRevamp from '../NavBarContainerRevamp'; export const WalletTransferPagePromise: void => Promise = () => import('./WalletTransferPage'); const WalletTransferPage = lazy(WalletTransferPagePromise); @@ -26,11 +21,8 @@ type Props = {| +children?: Node, |}; -type InjectedLayoutProps = {| +renderLayoutComponent: LayoutComponentMap => Node |}; -type AllProps = {| ...Props, ...InjectedLayoutProps |}; - @observer -class Transfer extends Component { +class Transfer extends Component { static contextTypes: {| intl: $npm$ReactIntl$IntlFormat |} = { intl: intlShape.isRequired, }; @@ -41,26 +33,17 @@ class Transfer extends Component { render(): Node { const { actions, stores } = this.props; - if (this.props.stores.profile.isRevampTheme) { - return null; - } const sidebarContainer = ; const navbar = ( - - } + title={} /> ); + return ( - } - navbar={navbar} - sidebar={sidebarContainer} - showInContainer - > + } navbar={navbar} sidebar={sidebarContainer}> {this.getContent()} ); @@ -72,24 +55,12 @@ class Transfer extends Component { if (wallet == null) { return ; } - // temporary solution: will need to handle more cases later for different currencies - if (wallet.isCardanoHaskell) { - return ; - } + return ( - <> - - - - - - - + + + ); }; } -export default (withLayout(Transfer): ComponentType); +export default Transfer; diff --git a/packages/yoroi-extension/app/containers/transfer/WalletTransferPage.js b/packages/yoroi-extension/app/containers/transfer/WalletTransferPage.js index 8189738564..6d5b9008f7 100644 --- a/packages/yoroi-extension/app/containers/transfer/WalletTransferPage.js +++ b/packages/yoroi-extension/app/containers/transfer/WalletTransferPage.js @@ -1,29 +1,15 @@ // @flow import type { Node } from 'react'; +import type { StoresAndActionsProps } from '../../types/injectedProps.types'; import { Component } from 'react'; import { observer } from 'mobx-react'; -import type { $npm$ReactIntl$IntlFormat } from 'react-intl'; -import { intlShape } from 'react-intl'; - -import type { StoresAndActionsProps } from '../../types/injectedProps.types'; - +import { getTokenName } from '../../stores/stateless/tokenHelpers'; +import { truncateToken } from '../../utils/formatters'; import TransferTypeSelect from '../../components/transfer/cards/TransferTypeSelect'; -import { PublicDeriver } from '../../api/ada/lib/storage/models/PublicDeriver'; import YoroiTransferPage from './YoroiTransferPage'; -import { genLookupOrFail, getTokenName, } from '../../stores/stateless/tokenHelpers'; -import { truncateToken } from '../../utils/formatters'; - -type Props = {| - ...StoresAndActionsProps, - publicDeriver: PublicDeriver<>, -|}; @observer -export default class WalletTransferPage extends Component { - static contextTypes: {|intl: $npm$ReactIntl$IntlFormat|} = { - intl: intlShape.isRequired, - }; - +export default class WalletTransferPage extends Component { onClose: void => void = () => { this.props.actions.dialogs.closeActiveDialog.trigger(); }; @@ -31,21 +17,20 @@ export default class WalletTransferPage extends Component { // paper startTransferYoroiPaperFunds: void => void = () => { this.props.actions.yoroiTransfer.startTransferFunds.trigger(); - } + }; render(): Node { const { actions, stores } = this.props; - const defaultToken = this.props.publicDeriver.getParent().getDefaultToken(); - const defaultTokenInfo = genLookupOrFail(this.props.stores.tokenInfoStore.tokenInfo)({ - identifier: defaultToken.defaultIdentifier, - networkId: defaultToken.defaultNetworkId, - }); + const wallet = stores.wallets.selected; + if (wallet == null) { + return null; + } + + const defaultTokenInfo = stores.tokenInfoStore.getDefaultTokenInfo(wallet.networkId); + return ( <> - + ); diff --git a/packages/yoroi-extension/app/containers/wallet/WalletSendPage.js b/packages/yoroi-extension/app/containers/wallet/WalletSendPage.js index b91530bf7e..cec7aa9bd0 100644 --- a/packages/yoroi-extension/app/containers/wallet/WalletSendPage.js +++ b/packages/yoroi-extension/app/containers/wallet/WalletSendPage.js @@ -32,6 +32,9 @@ import AddNFTDialog from '../../components/wallet/send/WalletSendFormSteps/AddNF import AddTokenDialog from '../../components/wallet/send/WalletSendFormSteps/AddTokenDialog'; import { ampli } from '../../../ampli/index'; import { getNetworkById } from '../../api/ada/lib/storage/database/prepackaged/networks'; +import LoadingSpinner from '../../components/widgets/LoadingSpinner'; +import VerticallyCenteredLayout from '../../components/layout/VerticallyCenteredLayout'; +import FullscreenLayout from '../../components/layout/FullscreenLayout'; const messages = defineMessages({ txConfirmationLedgerNanoLine1: { @@ -95,8 +98,10 @@ class WalletSendPage extends Component { this.props.stores.substores.ada.addresses.getSupportedAddressDomainBannerState(); }); const { loadProtocolParametersRequest } = this.props.stores.protocolParameters; - loadProtocolParametersRequest.reset(); - loadProtocolParametersRequest.execute(); + if (!loadProtocolParametersRequest.wasExecuted && !loadProtocolParametersRequest.isExecuting) { + loadProtocolParametersRequest.reset(); + loadProtocolParametersRequest.execute(); + } ampli.sendInitiated(); } @@ -145,7 +150,13 @@ class WalletSendPage extends Component { } = this.props.stores; if (!protocolParameters.loadProtocolParametersRequest.wasExecuted) { - return null; + return ( + + + + + + ); } const { actions } = this.props; diff --git a/packages/yoroi-extension/app/containers/wallet/staking/SeizaFetcher.js b/packages/yoroi-extension/app/containers/wallet/staking/SeizaFetcher.js index 2c7c68eaf7..833e5e98cb 100644 --- a/packages/yoroi-extension/app/containers/wallet/staking/SeizaFetcher.js +++ b/packages/yoroi-extension/app/containers/wallet/staking/SeizaFetcher.js @@ -157,8 +157,8 @@ class SeizaFetcher extends Component { _getBrowserReplacement(): string { // 1) handle Yoroi running as an extension - if (environment.userAgentInfo.isExtension()) { - if (environment.userAgentInfo.isFirefox()) { + if (environment.isExtension()) { + if (environment.isFirefox()) { return 'firefox&mozId=' + location.hostname; } // otherwise assume Chrome @@ -167,7 +167,7 @@ class SeizaFetcher extends Component { } // 2) Handle Yoroi running as a website - if (environment.userAgentInfo.isFirefox()) { + if (environment.isFirefox()) { return 'firefox&host' + location.host; } // otherwise assume Chrome diff --git a/packages/yoroi-extension/app/containers/wallet/staking/StakingPageContent.js b/packages/yoroi-extension/app/containers/wallet/staking/StakingPageContent.js index 301e895e84..8998bd463f 100644 --- a/packages/yoroi-extension/app/containers/wallet/staking/StakingPageContent.js +++ b/packages/yoroi-extension/app/containers/wallet/staking/StakingPageContent.js @@ -31,7 +31,6 @@ import type { LayoutComponentMap } from '../../../styles/context/layout'; import type { StoresAndActionsProps } from '../../../types/injectedProps.types'; import type { $npm$ReactIntl$IntlFormat } from 'react-intl'; import { MultiToken } from '../../../api/common/lib/MultiToken'; -import type { WalletType } from '../../../../chrome/extension/background/types'; // populated by ConfigWebpackPlugin declare var CONFIG: ConfigType; @@ -40,13 +39,21 @@ type InjectedLayoutProps = {| +renderLayoutComponent: LayoutComponentMap => Node, |}; +type State = {| + govStatusFetched: boolean; +|} + type AllProps = {| ...StoresAndActionsProps, ...InjectedLayoutProps |}; @observer -class StakingPageContent extends Component { +class StakingPageContent extends Component { static contextTypes: {| intl: $npm$ReactIntl$IntlFormat |} = { intl: intlShape.isRequired, }; + state: State = { + govStatusFetched: false, + }; + onClose: void => void = () => { this.props.actions.dialogs.closeActiveDialog.trigger(); }; @@ -56,10 +63,14 @@ class StakingPageContent extends Component { if (wallet == null) { throw new Error(`${nameof(StakingPageContent)} no public deriver. Should never happen`); } - // Check governance only for certain network - if (wallet.type !== 'trezor') { - noop(this.props.stores.delegation.checkGovernanceStatus(wallet)); - } + this.props.stores.delegation.checkGovernanceStatus(wallet).then(() => { + this.setState({ + govStatusFetched: true, + }); + return null; + }).catch(e => { + console.error('Failed to fetch governance status', e); + }); if (this.props.stores.delegation.getPoolTransitionConfig(wallet).shouldUpdatePool) { const poolTransitionInfo = this.props.stores.delegation.getPoolTransitionInfo(wallet); if (poolTransitionInfo?.suggestedPool) { @@ -212,9 +223,17 @@ class StakingPageContent extends Component { const delegatedUtxo = stores.delegation.getDelegatedUtxoBalance(publicDeriver.publicDeriverId); const delegatedRewards = stores.delegation.getRewardBalanceOrZero(publicDeriver); - // remove special check after governance for trezor is added - const isTrezor = (publicDeriver.type: WalletType) === 'trezor'; - const isParticipatingToGovernance = stores.delegation.governanceStatus?.drepDelegation != null || isTrezor; + const isParticipatingToGovernance = stores.delegation.governanceStatus?.drepDelegation != null; + + const handleRewardsWithdrawal = async () => { + if (!isParticipatingToGovernance) { + this.props.actions.dialogs.open.trigger({ + dialog: GovernanceParticipateDialog, + }); + return; + } + this.createWithdrawalTx(false) // shouldDeregister=false + }; return ( @@ -230,17 +249,7 @@ class StakingPageContent extends Component { dialog: OverviewModal, }) } - withdrawRewards={ - isParticipatingToGovernance === false - ? async () => { - this.props.actions.dialogs.open.trigger({ - dialog: GovernanceParticipateDialog, - }); - } - : isStakeRegistered - ? async () => this.createWithdrawalTx(false) // shouldDeregister=false - : undefined - } + withdrawRewards={isStakeRegistered && this.state.govStatusFetched ? handleRewardsWithdrawal : undefined} unitOfAccount={this.toUnitOfAccount} getTokenInfo={genLookupOrFail(stores.tokenInfoStore.tokenInfo)} shouldHideBalance={stores.profile.shouldHideBalance} diff --git a/packages/yoroi-extension/app/coreUtils.js b/packages/yoroi-extension/app/coreUtils.js index 1d60daf755..be0a53c946 100644 --- a/packages/yoroi-extension/app/coreUtils.js +++ b/packages/yoroi-extension/app/coreUtils.js @@ -225,11 +225,13 @@ export function timeCached(fun: () => R, ttl: number): () => R { * @return same value or a copy in case the value is an object */ export function sanitizeForLog(v: any): any { + const fields: Array = ['password']; if (v != null && typeof v === 'object') { let r = Object.keys(v).reduce((o, k) => ({ ...o, [k]: sanitizeForLog(v[k]) }) , {}) - // $FlowIgnore[incompatible-use] - if (r.password != null) { - r = { ...r, password: '[sanitized]' }; + for (const f of fields) { + if (r[f] != null) { + r = { ...r, [f]: '[sanitized]' }; + } } return r; } diff --git a/packages/yoroi-extension/app/domain/CardanoShelleyTransaction.js b/packages/yoroi-extension/app/domain/CardanoShelleyTransaction.js index 4beaca3ff4..f4f3fa1322 100644 --- a/packages/yoroi-extension/app/domain/CardanoShelleyTransaction.js +++ b/packages/yoroi-extension/app/domain/CardanoShelleyTransaction.js @@ -219,7 +219,11 @@ export function deserializeTransactionCtorData( state: serializedData.state, errorMsg: serializedData.errorMsg, certificates: serializedData.certificates, - ttl: serializedData.ttl && new BigNumber(serializedData.ttl), + ttl: serializedData.ttl && new BigNumber( + typeof serializedData.ttl === 'object' + ? { ...serializedData.ttl, _isBigNumber: true } + : serializedData.ttl + ), metadata: serializedData.metadata, withdrawals: serializedData.withdrawals.map(({ address, value }) => ({ address, diff --git a/packages/yoroi-extension/app/domain/TrezorLocalizedError.js b/packages/yoroi-extension/app/domain/TrezorLocalizedError.js index 24253f8ae0..dff1116c16 100644 --- a/packages/yoroi-extension/app/domain/TrezorLocalizedError.js +++ b/packages/yoroi-extension/app/domain/TrezorLocalizedError.js @@ -20,6 +20,10 @@ const messages = defineMessages({ defaultMessage: '!!!Could not sign the transaction. Please ensure the passphrase you entered is the passhprase used to create this wallet.', }, + conwayNotSupportedByFirmwareError: { + id: 'wallet.send.trezor.error.conway.firmware', + defaultMessage: '!!!Conway features not supported by your Trezor firmware version. Please upgrade to 2.8.1 or above.', + }, }); /** Converts error(from API or Trezor API) to LocalizableError */ @@ -35,6 +39,8 @@ export function convertToLocalizableError(error: Error): LocalizableError { localizableError = new LocalizableError(messages.noWitnessError); } else if (/Cancelled/.test(error.message)) { localizableError = new LocalizableError(messages.signTxError101); + } else if (/Feature Conway not supported by device firmware/.test(error.message)) { + localizableError = new LocalizableError(messages.conwayNotSupportedByFirmwareError); } else { // Trezor device related error happend, convert then to LocalizableError switch (error.message) { diff --git a/packages/yoroi-extension/app/environment.js b/packages/yoroi-extension/app/environment.js index ce035f74ed..e2191559a9 100644 --- a/packages/yoroi-extension/app/environment.js +++ b/packages/yoroi-extension/app/environment.js @@ -7,6 +7,78 @@ import userAgentInfo from './utils/userAgentInfo'; // populated by ConfigWebpackPlugin declare var CONFIG: ConfigType; +declare var browser; + +const IS_FIREFOX_BROWSER_INFO: [boolean | null] = [null]; +if (typeof browser !== 'undefined') { + browser.runtime.getBrowserInfo().then(({ name }) => { + const isff = name === 'Firefox'; + console.debug(`isFirefox = ${String(isff)} / defined by browser info API`) + IS_FIREFOX_BROWSER_INFO[0] = isff; + return null; + }).catch(e => { + console.error('failed to call browser info API', e); + }); +} + +function isChromeProtocol(): boolean { + return location.protocol === 'chrome-extension:'; +} + +function isMozProtocol(): boolean { + return location.protocol === 'moz-extension:'; +} + +function isExtension(): boolean { + return isChromeProtocol() || isMozProtocol(); +} + +function isFirefox(): boolean { + if (IS_FIREFOX_BROWSER_INFO[0] != null) { + return IS_FIREFOX_BROWSER_INFO[0]; + } + + if (isMozProtocol()) { + return true; + } + // if an extension type that isn't Firefox, return false + if (isExtension()) { + return false; + } + + // $FlowExpectedError[cannot-resolve-name] InstallTrigger is a global from the browser + return typeof InstallTrigger !== 'undefined'; +} + +function isChrome(): boolean { + /** + * This method returns true for all browser that uses `chrome-extension:` protocol, + *hence it will return true for browsers like Google Chrome, Brave + */ + if (isChromeProtocol()) { + return true; + } + // if an extension type that isn't Chrome-based, return false + if (isExtension()) { + return false; + } + + return !!window.chrome + && (!!window.chrome.webstore || !!window.chrome.runtime) + && !isFirefox(); +} + +function canRegisterProtocol(): boolean { + // Moz-Extension specify the protocol in the manifest not at runtime + if (isExtension() && isFirefox()) { + return false; + } + // Can only register a protocol to a website if it's https + if (!isExtension() && window.location.protocol !== 'https:') { + return false; + } + return true; +} function getVersion(): string { const genManifest = require('../chrome/manifest.' + CONFIG.network.name); @@ -16,6 +88,8 @@ function getVersion(): string { return content.version; } +const FIREFOX_PRIVACY_POLICY_URL = 'https://addons.mozilla.org/en-US/firefox/addon/yoroi/privacy'; + export const environment = (( { ...process.env, @@ -41,6 +115,16 @@ export const environment = (( getWalletRefreshInterval: () => CONFIG.app.walletRefreshInterval, getServerStatusRefreshInterval: () => CONFIG.app.serverStatusRefreshInterval, userAgentInfo, + isFirefox, + isChrome, + isExtension, + canRegisterProtocol, + externalPrivacyPolicyURL: () => { + if (isFirefox()) { + return FIREFOX_PRIVACY_POLICY_URL; + } + return null; + } } ): { getNetworkName: void => Network, @@ -56,6 +140,11 @@ export const environment = (( isProduction: void => boolean, getWalletRefreshInterval: void => number, getServerStatusRefreshInterval: void => number, + isExtension: void => boolean, + isFirefox: void => boolean, + isChrome: void => boolean, + canRegisterProtocol: void => boolean, + externalPrivacyPolicyURL: void => ?string, userAgentInfo: UserAgentInfo, isLight: boolean, ... diff --git a/packages/yoroi-extension/app/i18n/locales/en-US.json b/packages/yoroi-extension/app/i18n/locales/en-US.json index 6d6485a998..fdbb608278 100644 --- a/packages/yoroi-extension/app/i18n/locales/en-US.json +++ b/packages/yoroi-extension/app/i18n/locales/en-US.json @@ -226,6 +226,9 @@ "profile.analytics.accept": "Accept", "profile.analytics.allow": "Allow Yoroi analytics", "profile.analytics.learnMore": "Learn more about user insights", + "profile.analytics.seePrivacyNotice": "See Privacy Notice", + "profile.analytics.rejectionImpact": "Opting out won’t impact your experience", + "profile.analytics.collectedData": "Collected data includes: visited Yoroi extension pages, browser version, selected language, time of analytical events", "profile.analytics.line1": "Anonymous analytics data", "profile.analytics.line2": "You can always opt-out via Settings", "profile.analytics.line3": "We can not access private keys", @@ -308,6 +311,8 @@ "settings.noexternal.dialog.content": "Your memos are stored locally. They will not automatically sync with other Yoroi instances and will be lost if you delete Yoroi", "settings.noexternal.dialog.title": "No external storage", "settings.revamp.unitOfAccount.note": "Please note, that the coin price is approximate and may not match the price of any given trading platform. Any transactions based on this price approximates are done at your own risk", + "settings.support.paperWallet.title": "Paper Wallet", + "settings.support.paperWallet.button": "Transfer from Paper Wallet", "settings.support.faq.blogLinkUrl": "https://emurgo.io/en/blog/yoroi-custom-themes", "settings.support.faq.blogLinkWrapper": "blog post", "settings.support.faq.content": "If you are experiencing issues, please see the {faqLink} for guidance on known issues.", @@ -821,6 +826,7 @@ "wallet.send.trezor.confirmationDialog.info.line.2": "A new tab will appear. Please follow the instructions in the new tab.", "wallet.send.trezor.confirmationDialog.submit": "Send using Trezor", "wallet.send.trezor.error.101": "Signing cancelled on Trezor device. Please retry", + "wallet.send.trezor.error.conway.firmware": "Conway features not supported by your Trezor firmware version. Please upgrade to 2.8.1 or above.", "wallet.send.trezor.error.noWitness": "Could not sign the transaction. Please ensure the passphrase you entered is the passhprase used to create this wallet.", "wallet.settings.blockchain.explorer.title": "Explorer settings", "wallet.settings.changePassword.dialog.currentPasswordFieldPlaceholder": "Type current password", @@ -1080,7 +1086,7 @@ "governance.noConfidenceInfo": "You are expressing a lack of trust for all proposals now and in the future.", "governance.learnMore": "Learn more About Governance", "governance.becomeADrep": "Want to became a Drep?", - "governance.drepId": "Drep ID (Fingerprint):", + "governance.drepId": "Drep ID (CIP 129):", "governance.statusSelected": "You have selected {status} as your governance status. You can change it at any time by clicking in the card bellow", "governance.statusPending": "You have chosen your governance status, this process may take a while.", "governance.registerGovernance": "Register in Governance", @@ -1119,7 +1125,7 @@ "portfolio.button.liquidityPool": "Liquidity pool", "portfolio.button.openOrders": "Open orders", "portfolio.button.lendAndBorrow": "Lend & Borrow", - "portfolio.tokenInfo.balance": "balance", + "portfolio.tokenInfo.balance": "Balance", "portfolio.tokenInfo.marketPrice": "Market price", "portfolio.tokenInfo.menuLabel.overview": "Overview", "portfolio.tokenInfo.menuLabel.performance": "Performance", diff --git a/packages/yoroi-extension/app/i18n/locales/hu-HU.json b/packages/yoroi-extension/app/i18n/locales/hu-HU.json index 235a06f275..6a1af438cc 100644 --- a/packages/yoroi-extension/app/i18n/locales/hu-HU.json +++ b/packages/yoroi-extension/app/i18n/locales/hu-HU.json @@ -226,6 +226,9 @@ "profile.analytics.accept": "Accept", "profile.analytics.allow": "Allow Yoroi analytics", "profile.analytics.learnMore": "Learn more about user insights", + "profile.analytics.seePrivacyNotice": "See Privacy Notice", + "profile.analytics.rejectionImpact": "Opting out won’t impact your experience", + "profile.analytics.collectedData": "Collected data includes: visited Yoroi extension pages, browser version, selected language, time of analytical events", "profile.analytics.line1": "Anonymous analytics data", "profile.analytics.line2": "You can always opt-out via Settings", "profile.analytics.line3": "We can not access private keys", @@ -308,6 +311,8 @@ "settings.noexternal.dialog.content": "Your memos are stored locally. They will not automatically sync with other Yoroi instances and will be lost if you delete Yoroi", "settings.noexternal.dialog.title": "No external storage", "settings.revamp.unitOfAccount.note": "Please note, that the coin price is approximate and may not match the price of any given trading platform. Any transactions based on this price approximates are done at your own risk", + "settings.support.paperWallet.title": "Paper Wallet", + "settings.support.paperWallet.button": "Transfer from Paper Wallet", "settings.support.faq.blogLinkUrl": "https://emurgo.io/en/blog/yoroi-custom-themes", "settings.support.faq.blogLinkWrapper": "blog post", "settings.support.faq.content": "If you are experiencing issues, please see the {faqLink} for guidance on known issues.", @@ -821,6 +826,7 @@ "wallet.send.trezor.confirmationDialog.info.line.2": "A new tab will appear. Please follow the instructions in the new tab.", "wallet.send.trezor.confirmationDialog.submit": "Send using Trezor", "wallet.send.trezor.error.101": "Signing cancelled on Trezor device. Please retry", + "wallet.send.trezor.error.conway.firmware": "Conway features not supported by your Trezor firmware version. Please upgrade to 2.8.1 or above.", "wallet.send.trezor.error.noWitness": "Could not sign the transaction. Please ensure the passphrase you entered is the passhprase used to create this wallet.", "wallet.settings.blockchain.explorer.title": "Explorer settings", "wallet.settings.changePassword.dialog.currentPasswordFieldPlaceholder": "Type current password", @@ -1080,7 +1086,7 @@ "governance.noConfidenceInfo": "You are expressing a lack of trust for all proposals now and in the future.", "governance.learnMore": "Learn more About Governance", "governance.becomeADrep": "Want to became a Drep?", - "governance.drepId": "Drep ID (Fingerprint):", + "governance.drepId": "Drep ID (CIP 129):", "governance.statusSelected": "You have selected {status} as your governance status. You can change it at any time by clicking in the card bellow", "governance.statusPending": "You have chosen your governance status, this process may take a while.", "governance.registerGovernance": "Register in Governance", @@ -1119,7 +1125,7 @@ "portfolio.button.liquidityPool": "Liquidity pool", "portfolio.button.openOrders": "Open orders", "portfolio.button.lendAndBorrow": "Lend & Borrow", - "portfolio.tokenInfo.balance": "balance", + "portfolio.tokenInfo.balance": "Balance", "portfolio.tokenInfo.marketPrice": "Market price", "portfolio.tokenInfo.menuLabel.overview": "Overview", "portfolio.tokenInfo.menuLabel.performance": "Performance", @@ -1172,6 +1178,6 @@ "portfolio.orderTable.header.assetPrice": "Asset price", "portfolio.orderTable.header.assetAmount": "Asset amount", "portfolio.orderTable.header.transactionId": "Transaction ID", - "portfolio.welcomeBanner.title": "Welcome to Yoroi", - "portfolio.welcomeBanner.description": "With new features and upgraded performance, transactions can be done faster and more securely than ever before." + "portfolio.welcomeBanner.title": "Start your crypto journey", + "portfolio.welcomeBanner.description": "Get started with Cardanos native currency, ADA. Its your key to unlocking a world of possibilities." } diff --git a/packages/yoroi-extension/app/i18n/locales/vi-VN.json b/packages/yoroi-extension/app/i18n/locales/vi-VN.json index 996e6b31af..7a5eac760c 100644 --- a/packages/yoroi-extension/app/i18n/locales/vi-VN.json +++ b/packages/yoroi-extension/app/i18n/locales/vi-VN.json @@ -226,6 +226,9 @@ "profile.analytics.accept": "Accept", "profile.analytics.allow": "Allow Yoroi analytics", "profile.analytics.learnMore": "Learn more about user insights", + "profile.analytics.seePrivacyNotice": "See Privacy Notice", + "profile.analytics.rejectionImpact": "Opting out won’t impact your experience", + "profile.analytics.collectedData": "Collected data includes: visited Yoroi extension pages, browser version, selected language, time of analytical events", "profile.analytics.line1": "Anonymous analytics data", "profile.analytics.line2": "You can always opt-out via Settings", "profile.analytics.line3": "We can not access private keys", @@ -308,6 +311,8 @@ "settings.noexternal.dialog.content": "Bản ghi nhớ của bạn được lưu trữ cục bộ. Chúng sẽ không tự động đồng bộ với các phiên bản Yoroi khác và sẽ bị mất nếu bạn xóa Yoroi", "settings.noexternal.dialog.title": "Không có bộ nhớ ngoài", "settings.revamp.unitOfAccount.note": "Please note, that the coin price is approximate and may not match the price of any given trading platform. Any transactions based on this price approximates are done at your own risk", + "settings.support.paperWallet.title": "Paper Wallet", + "settings.support.paperWallet.button": "Transfer from Paper Wallet", "settings.support.faq.blogLinkUrl": "https://emurgo.io/en/blog/yoroi-custom-themes", "settings.support.faq.blogLinkWrapper": "bài đăng", "settings.support.faq.content": "Nếu bạn đang gặp sự cố, vui lòng xem {faqLink} để được hướng dẫn về các sự cố đã biết.", @@ -821,6 +826,7 @@ "wallet.send.trezor.confirmationDialog.info.line.2": "Một tab mới sẽ xuất hiện. Vui lòng làm theo hướng dẫn trong tab mới.", "wallet.send.trezor.confirmationDialog.submit": "Gửi bằng Trezor", "wallet.send.trezor.error.101": "Việc ký đã bị hủy trên thiết bị Trezor. Làm ơn hãy thử lại", + "wallet.send.trezor.error.conway.firmware": "Conway features not supported by your Trezor firmware version. Please upgrade to 2.8.1 or above.", "wallet.send.trezor.error.noWitness": "Không thể ký giao dịch. Vui lòng đảm bảo cụm mật khẩu bạn đã nhập là cụm mật khẩu được sử dụng để tạo ví này.", "wallet.settings.blockchain.explorer.title": "Explorer settings", "wallet.settings.changePassword.dialog.currentPasswordFieldPlaceholder": "Type current password", @@ -1080,7 +1086,7 @@ "governance.noConfidenceInfo": "You are expressing a lack of trust for all proposals now and in the future.", "governance.learnMore": "Learn more About Governance", "governance.becomeADrep": "Want to became a Drep?", - "governance.drepId": "Drep ID (Fingerprint):", + "governance.drepId": "Drep ID (CIP 129):", "governance.statusSelected": "You have selected {status} as your governance status. You can change it at any time by clicking in the card bellow", "governance.statusPending": "You have chosen your governance status, this process may take a while.", "governance.registerGovernance": "Register in Governance", @@ -1119,7 +1125,7 @@ "portfolio.button.liquidityPool": "Liquidity pool", "portfolio.button.openOrders": "Open orders", "portfolio.button.lendAndBorrow": "Lend & Borrow", - "portfolio.tokenInfo.balance": "balance", + "portfolio.tokenInfo.balance": "Balance", "portfolio.tokenInfo.marketPrice": "Market price", "portfolio.tokenInfo.menuLabel.overview": "Overview", "portfolio.tokenInfo.menuLabel.performance": "Performance", diff --git a/packages/yoroi-extension/app/routes-config.js b/packages/yoroi-extension/app/routes-config.js index 8f35cd6939..b03d5abeca 100644 --- a/packages/yoroi-extension/app/routes-config.js +++ b/packages/yoroi-extension/app/routes-config.js @@ -42,6 +42,7 @@ export const ROUTES = { SUPPORT: '/settings/support', LEVEL_OF_COMPLEXITY: '/settings/level-of-complexity', ANALYTICS: '/settings/analytics', + PAPER_WALLET: '/settings/paper-wallet', }, TRANSFER: { ROOT: '/transfer', diff --git a/packages/yoroi-extension/app/stores/ada/AdaDelegationTransactionStore.js b/packages/yoroi-extension/app/stores/ada/AdaDelegationTransactionStore.js index f29a173354..b64cf9c457 100644 --- a/packages/yoroi-extension/app/stores/ada/AdaDelegationTransactionStore.js +++ b/packages/yoroi-extension/app/stores/ada/AdaDelegationTransactionStore.js @@ -1,6 +1,6 @@ // @flow -import { observable, action, reaction } from 'mobx'; +import { observable, action, reaction, runInAction } from 'mobx'; import BigNumber from 'bignumber.js'; import Store from '../base/Store'; import LocalizedRequest from '../lib/LocalizedRequest'; @@ -27,6 +27,8 @@ export default class AdaDelegationTransactionStore extends Store mixed = reaction( () => [ @@ -146,45 +148,51 @@ export default class AdaDelegationTransactionStore extends Store { + this.error = error; + }); + throw error; } - await this.stores.substores.ada.wallets.adaSendAndRefresh({ - broadcastRequest: { - normal: { - wallet: request.wallet, - password: request.password, - signRequest: result.signTxRequest, - }, - }, - refreshWallet, - }); if (request.dialog) this.actions.dialogs.open.trigger({ dialog: request.dialog }); }; diff --git a/packages/yoroi-extension/app/stores/ada/AdaStateFetchStore.js b/packages/yoroi-extension/app/stores/ada/AdaStateFetchStore.js index 1b7493ca6c..a7b407e77e 100644 --- a/packages/yoroi-extension/app/stores/ada/AdaStateFetchStore.js +++ b/packages/yoroi-extension/app/stores/ada/AdaStateFetchStore.js @@ -25,10 +25,10 @@ export default class AdaStateFetchStore< () => environment.getVersion(), () => this.stores.profile.currentLocale, () => { - if (environment.userAgentInfo.isFirefox()) { + if (environment.isFirefox()) { return 'firefox'; } - if (environment.userAgentInfo.isChrome()) { + if (environment.isChrome()) { return 'chrome'; } return '-'; diff --git a/packages/yoroi-extension/app/stores/lib/TrezorWrapper.js b/packages/yoroi-extension/app/stores/lib/TrezorWrapper.js index 7e158467a9..ca1f4be7f2 100644 --- a/packages/yoroi-extension/app/stores/lib/TrezorWrapper.js +++ b/packages/yoroi-extension/app/stores/lib/TrezorWrapper.js @@ -29,7 +29,7 @@ export function getTrezorManifest(): Manifest { const trezorManifest: Manifest = { email: manifest.EMAIL, appUrl: (() => { - if (environment.userAgentInfo.isFirefox()) { + if (environment.isFirefox()) { // Set appUrl for `moz-extension:` protocol using browser (like Firefox) return manifest.appURL.FIREFOX; } diff --git a/packages/yoroi-extension/app/stores/stateless/sidebarCategories.js b/packages/yoroi-extension/app/stores/stateless/sidebarCategories.js index 23125e88d5..9fdc42f127 100644 --- a/packages/yoroi-extension/app/stores/stateless/sidebarCategories.js +++ b/packages/yoroi-extension/app/stores/stateless/sidebarCategories.js @@ -17,7 +17,6 @@ import environment from '../../environment'; import globalMessages, { connectorMessages } from '../../i18n/global-messages'; import { ROUTES } from '../../routes-config'; import type { WalletState } from '../../../chrome/extension/background/types'; -import { ReactComponent as assetsIcon } from '../../assets/images/sidebar/revamp/assets.inline.svg'; export type SidebarCategory = {| +className: string, @@ -131,13 +130,6 @@ export const allCategoriesRevamp: Array = [ label: globalMessages.sidebarSwap, isVisible: ({ selected }) => !selected?.isTestnet, }, - { - className: 'assets', - route: ROUTES.ASSETS.ROOT, - icon: assetsIcon, - label: globalMessages.sidebarAssets, - isVisible: () => environment.isProduction() || environment.isDev(), - }, { className: 'portfolio', route: ROUTES.PORTFOLIO.ROOT, @@ -172,7 +164,7 @@ export const allCategoriesRevamp: Array = [ route: '/governance', icon: governanceIcon, label: globalMessages.sidebarGovernance, - isVisible: ({ selected }) => selected != null && selected.type !== 'trezor', + isVisible: ({ selected }) => selected != null, }, { className: 'settings', diff --git a/packages/yoroi-extension/app/stores/toplevel/ProfileStore.js b/packages/yoroi-extension/app/stores/toplevel/ProfileStore.js index 6d431d8368..dbd9140d6f 100644 --- a/packages/yoroi-extension/app/stores/toplevel/ProfileStore.js +++ b/packages/yoroi-extension/app/stores/toplevel/ProfileStore.js @@ -22,9 +22,22 @@ export default class ProfileStore extends BaseProfileStore boolean | Promise, action: void => Promise |} = { + isDone: () => this.isAnalyticsOpted, + action: async () => { + const route = ROUTES.PROFILE.OPT_FOR_ANALYTICS; + if (this.stores.app.currentRoute === route) { + return; + } + this.actions.router.goToRoute.trigger({ route }); + }, + }; + /** Linear list of steps that need to be completed before app start */ @observable SETUP_STEPS: Array<{| isDone: void => boolean | Promise, action: void => Promise |}> = [ + // Firefox policy requires this to be the first + ...(environment.isFirefox() ? [this._analyticsStep] : []), { isDone: () => this.isCurrentLocaleSet, action: async () => { @@ -47,16 +60,7 @@ export default class ProfileStore extends BaseProfileStore this.isAnalyticsOpted, - action: async () => { - const route = ROUTES.PROFILE.OPT_FOR_ANALYTICS; - if (this.stores.app.currentRoute === route) { - return; - } - this.actions.router.goToRoute.trigger({ route }); - }, - }, + ...(environment.isFirefox() ? [] : [this._analyticsStep]), { isDone: () => this.isComplexityLevelSelected, action: async () => { @@ -78,7 +82,7 @@ export default class ProfileStore extends BaseProfileStore !environment.userAgentInfo.canRegisterProtocol() || this.isUriSchemeAccepted, + isDone: () => !environment.canRegisterProtocol() || this.isUriSchemeAccepted, action: async () => { const route = ROUTES.PROFILE.URI_PROMPT; if (this.stores.app.currentRoute === route) { @@ -112,7 +116,7 @@ export default class ProfileStore extends BaseProfileStore = new Map(); + setup(): void { + this.loadProtocolParametersRequest.execute(); + } + async loadProtocolParameters(): Promise { - for (const key of Object.keys(networks)) { + for (const key of listRelevantNetworkNamesForEnvironment()) { const networkId = networks[key].NetworkId; + if (networkId === networks.CardanoSanchoTestnet.NetworkId) continue; const protocolParameters = await getProtocolParameters({ networkId }); this.cache.set(networkId, protocolParameters); } diff --git a/packages/yoroi-extension/app/stores/toplevel/StateFetchStore.js b/packages/yoroi-extension/app/stores/toplevel/StateFetchStore.js index 4069caec18..3e0b46b8eb 100644 --- a/packages/yoroi-extension/app/stores/toplevel/StateFetchStore.js +++ b/packages/yoroi-extension/app/stores/toplevel/StateFetchStore.js @@ -26,10 +26,10 @@ export default class StateFetchStore< () => environment.getVersion(), () => this.stores.profile.currentLocale, () => { - if (environment.userAgentInfo.isFirefox()) { + if (environment.isFirefox()) { return 'firefox'; } - if (environment.userAgentInfo.isChrome()) { + if (environment.isChrome()) { return 'chrome'; } return '-'; diff --git a/packages/yoroi-extension/app/stores/toplevel/WalletStore.js b/packages/yoroi-extension/app/stores/toplevel/WalletStore.js index 1bca0fbb65..f9f987564f 100644 --- a/packages/yoroi-extension/app/stores/toplevel/WalletStore.js +++ b/packages/yoroi-extension/app/stores/toplevel/WalletStore.js @@ -288,13 +288,12 @@ export default class WalletStore extends Store { ); this.selectedIndex = walletIndex; this.selectedWalletName = this.wallets[walletIndex].name; - // Cache select wallet this.api.localStorage.setSelectedWalletId(publicDeriverId); subscribe(publicDeriverId); }; - getLastSelectedWallet: void => ?WalletState = () => { - const walletId = this.api.localStorage.getSelectedWalletId(); + getLastSelectedWallet: void => Promise = async () => { + const walletId: ?number = await this.api.localStorage.getSelectedWalletId(); return this.wallets.find(wallet => wallet.publicDeriverId === walletId); }; diff --git a/packages/yoroi-extension/app/uri-protocols.js b/packages/yoroi-extension/app/uri-protocols.js index 22d52917e6..d04cf3c1e4 100644 --- a/packages/yoroi-extension/app/uri-protocols.js +++ b/packages/yoroi-extension/app/uri-protocols.js @@ -12,7 +12,7 @@ const cardanoURI = { }; const registerProtocols = () => { - if (!environment.userAgentInfo.canRegisterProtocol()) { + if (!environment.canRegisterProtocol()) { Logger.error(`uri-protocols:registerProtocols cannot use registerProtocolHandler on this page`); return; } diff --git a/packages/yoroi-extension/app/utils/userAgentInfo.js b/packages/yoroi-extension/app/utils/userAgentInfo.js index cfa0156b3b..c39dba82ba 100644 --- a/packages/yoroi-extension/app/utils/userAgentInfo.js +++ b/packages/yoroi-extension/app/utils/userAgentInfo.js @@ -5,57 +5,9 @@ import UAParser from 'ua-parser-js'; export class UserAgentInfo { // Refer: https://www.npmjs.com/package/ua-parser-js ua: { ... }; - - isChrome: void => boolean = () => { - /** - * This method returns true for all browser that uses `chrome-extension:` protocol, - *hence it will return true for browsers like Google Chrome, Brave - */ - if (location.protocol === 'chrome-extension:') { - return true; - } - // if an extension type that isn't Chrome-based, return false - if (this.isExtension()) { - return false; - } - - return !!window.chrome && - (!!window.chrome.webstore || !!window.chrome.runtime) && - !this.isFirefox(); - }; - isFirefox: void => boolean = () => { - if (location.protocol === 'moz-extension:') { - return true; - } - // if an extension type that isn't Firefox, return false - if (this.isExtension()) { - return false; - } - - // $FlowExpectedError[cannot-resolve-name] InstallTrigger is a global from the browser - return typeof InstallTrigger !== 'undefined'; - } - isExtension: void => boolean = () => { - return ( - location.protocol === 'chrome-extension:' || location.protocol === 'moz-extension:' - ); - } - constructor() { this.ua = (new UAParser()).getResult(); } - - canRegisterProtocol: (() => boolean) = () => { - // Moz-Extension specify the protocol in the manifest not at runtime - if (this.isExtension() && this.isFirefox()) { - return false; - } - // Can only register a protocol to a website if it's https - if (!this.isExtension() && window.location.protocol !== 'https:') { - return false; - } - return true; - } } export default (new UserAgentInfo(): UserAgentInfo); diff --git a/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/index.js b/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/index.js index f935d3711a..4b88c7b783 100644 --- a/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/index.js +++ b/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/index.js @@ -43,6 +43,7 @@ import { } from './connector'; import { GetProtocolParameters } from './protocolParameters'; import { subscribe } from '../../subscriptionManager'; +import { sanitizeForLog } from '../../../../../app/coreUtils'; const handlerMap = Object.freeze({ [GetHistoricalCoinPrices.typeTag]: GetHistoricalCoinPrices.handle, @@ -107,6 +108,7 @@ export function getHandler(typeTag: string): ?Handler { return async (request, send, sendResponse) => { try { const result = await handler(request.request); + console.debug(`BACKGROUND [${typeTag}] sending result: `, JSON.stringify(sanitizeForLog(result))); sendResponse(result); } catch (error) { sendResponse({ error: error.message }); diff --git a/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/protocolParameters.js b/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/protocolParameters.js index 93e4cdb8c0..109f64594b 100644 --- a/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/protocolParameters.js +++ b/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/protocolParameters.js @@ -206,7 +206,7 @@ class ProcolParameterApi { } export const GetProtocolParameters: HandlerType< - { networkId: number, ... }, + {| networkId: number |}, ProtocolParameters > = Object.freeze({ typeTag: 'get-protocol-parameters', diff --git a/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/wallet.js b/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/wallet.js index 3bdce74838..a7053b9f17 100644 --- a/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/wallet.js +++ b/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/wallet.js @@ -65,6 +65,7 @@ export const CreateWallet: HandlerType = Object.freeze({ typeTag: 'remove-all-transactions', @@ -275,7 +276,7 @@ export const RemoveAllTransactions: HandlerType< }); export const PopAddress: HandlerType< - { publicDeriverId: number, ... }, + {| publicDeriverId: number |}, void > = Object.freeze({ typeTag: 'pop-address', @@ -354,6 +355,7 @@ export const RefreshTransactions: HandlerType< // initial transaction list loading txs = await adaApi.refreshTransactions(refreshTxRequest); } - return txs; + // $FlowIgnore + return JSON.stringify(txs); }, }); diff --git a/packages/yoroi-extension/chrome/extension/background/index.js b/packages/yoroi-extension/chrome/extension/background/index.js index 9df389ca06..feadd12e9f 100644 --- a/packages/yoroi-extension/chrome/extension/background/index.js +++ b/packages/yoroi-extension/chrome/extension/background/index.js @@ -9,11 +9,13 @@ import { environment } from '../../../app/environment'; import axios from 'axios'; import fetchAdapter from '@vespaiach/axios-fetch-adapter'; import { sanitizeForLog } from '../../../app/coreUtils'; +import LocalStorageApi from '../../../app/api/localStorage/index'; axios.defaults.adapter = fetchAdapter; /*:: declare var chrome; +declare var browser; */ const onYoroiIconClicked = () => { @@ -36,7 +38,11 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { } const handler = getHandler(message.type); if (handler) { - handler(message, sender, sendResponse); + const deserializedMessage = { + type: message.type, + request: JSON.parse(message.request), + }; + handler(deserializedMessage, sender, sendResponse); // Returning `true` is required by Firefox, see: // https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage return true; @@ -47,3 +53,12 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { init().catch(console.error); startMonitorServerStatus(); startPoll(); + +if (environment.isFirefox()) { + browser.runtime.onInstalled.addListener(async () => { + const analyticsFlag = await new LocalStorageApi().loadIsAnalyticsAllowed(); + if (analyticsFlag == null) { + onYoroiIconClicked(); + } + }); +} diff --git a/packages/yoroi-extension/chrome/extension/background/subscriptionManager.js b/packages/yoroi-extension/chrome/extension/background/subscriptionManager.js index a04d09943b..bd69ca4799 100644 --- a/packages/yoroi-extension/chrome/extension/background/subscriptionManager.js +++ b/packages/yoroi-extension/chrome/extension/background/subscriptionManager.js @@ -68,6 +68,6 @@ declare var chrome; */ export function emitUpdateToSubscriptions(data: Object): void { for (const { tabId } of getSubscriptions()) { - chrome.tabs.sendMessage(tabId, data); + chrome.tabs.sendMessage(tabId, { type: 'yoroi-emit-update', data: JSON.stringify(data) }); } } diff --git a/packages/yoroi-extension/chrome/extension/background/utils.js b/packages/yoroi-extension/chrome/extension/background/utils.js index f2d45b5186..2e93c2f637 100644 --- a/packages/yoroi-extension/chrome/extension/background/utils.js +++ b/packages/yoroi-extension/chrome/extension/background/utils.js @@ -17,10 +17,10 @@ async function createFetcher( () => environment.getVersion(), () => locale, () => { - if (environment.userAgentInfo.isFirefox()) { + if (environment.isFirefox()) { return 'firefox'; } - if (environment.userAgentInfo.isChrome()) { + if (environment.isChrome()) { return 'chrome'; } return '-'; @@ -40,10 +40,10 @@ export async function getCommonStateFetcher(): Promise { () => environment.getVersion(), () => locale, () => { - if (environment.userAgentInfo.isFirefox()) { + if (environment.isFirefox()) { return 'firefox'; } - if (environment.userAgentInfo.isChrome()) { + if (environment.isChrome()) { return 'chrome'; } return '-'; diff --git a/packages/yoroi-extension/chrome/manifest-mv2.template.js b/packages/yoroi-extension/chrome/manifest-mv2.template.js index 0790a7ed93..b7ed82c466 100644 --- a/packages/yoroi-extension/chrome/manifest-mv2.template.js +++ b/packages/yoroi-extension/chrome/manifest-mv2.template.js @@ -73,7 +73,7 @@ export default ({ ], content_scripts: [ { - matches: ['*://connect.trezor.io/*/popup.html'], + matches: ['*://connect.trezor.io/*/popup.html*'], js: ['js/trezor-content-script.js'], }, ], diff --git a/packages/yoroi-extension/chrome/manifest.template.js b/packages/yoroi-extension/chrome/manifest.template.js index c9aff95ea4..2cd8114fae 100644 --- a/packages/yoroi-extension/chrome/manifest.template.js +++ b/packages/yoroi-extension/chrome/manifest.template.js @@ -75,7 +75,7 @@ export default ({ ], content_scripts: [ { - matches: ['*://connect.trezor.io/*/popup.html'], + matches: ['*://connect.trezor.io/*/popup.html*'], js: ['js/trezor-content-script.js'], }, ], diff --git a/packages/yoroi-extension/package-lock.json b/packages/yoroi-extension/package-lock.json index 211ce573fa..525359e422 100644 --- a/packages/yoroi-extension/package-lock.json +++ b/packages/yoroi-extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "yoroi", - "version": "5.4.311", + "version": "5.4.500", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yoroi", - "version": "5.4.311", + "version": "5.4.500", "license": "MIT", "dependencies": { "@amplitude/analytics-browser": "^2.1.3", @@ -88,7 +88,7 @@ "semver": "7.6.0", "stream-browserify": "3.0.0", "tinycolor2": "1.4.2", - "trezor-connect-flow": "Emurgo/trezor-connect-flow#92d6d8c8faef25c0ea1d481aa1ecb4ba77ce539c", + "trezor-connect-flow": "Emurgo/trezor-connect-flow#692d366d4934382b5049e29683974e38156ccfc6", "ts-loader": "^9.5.1", "typescript": "^5.4.5", "ua-parser-js": "1.0.37", @@ -2726,6 +2726,70 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@ethereumjs/common": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-4.4.0.tgz", + "integrity": "sha512-Fy5hMqF6GsE6DpYTyqdDIJPJgUtDn4dL120zKw+Pswuo+iLyBsEYuSyzMw6NVzD2vDzcBG9fE4+qX4X2bPc97w==", + "dependencies": { + "@ethereumjs/util": "^9.1.0" + } + }, + "node_modules/@ethereumjs/rlp": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-5.0.2.tgz", + "integrity": "sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA==", + "bin": { + "rlp": "bin/rlp.cjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/tx": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-5.4.0.tgz", + "integrity": "sha512-SCHnK7m/AouZ7nyoR0MEXw1OO/tQojSbp88t8oxhwes5iZkZCtfFdUrJaiIb72qIpH2FVw6s1k1uP7LXuH7PsA==", + "dependencies": { + "@ethereumjs/common": "^4.4.0", + "@ethereumjs/rlp": "^5.0.2", + "@ethereumjs/util": "^9.1.0", + "ethereum-cryptography": "^2.2.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/util": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-9.1.0.tgz", + "integrity": "sha512-XBEKsYqLGXLah9PNJbgdkigthkG7TAGvlD/sH12beMXEyHDyigfcbdvHhmLyDWgDyOJn4QwiQUaF7yeuhnjdog==", + "dependencies": { + "@ethereumjs/rlp": "^5.0.2", + "ethereum-cryptography": "^2.2.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@fivebinaries/coin-selection": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@fivebinaries/coin-selection/-/coin-selection-2.2.1.tgz", + "integrity": "sha512-iYFsYr7RY7TEvTqP9NKR4p/yf3Iybf9abUDR7lRjzanGsrLwVsREvIuyE05iRYFrvqarlk+gWRPsdR1N2hUBrg==", + "dependencies": { + "@emurgo/cardano-serialization-lib-browser": "^11.5.0", + "@emurgo/cardano-serialization-lib-nodejs": "11.5.0" + } + }, + "node_modules/@fivebinaries/coin-selection/node_modules/@emurgo/cardano-serialization-lib-browser": { + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/@emurgo/cardano-serialization-lib-browser/-/cardano-serialization-lib-browser-11.5.0.tgz", + "integrity": "sha512-qchOJ9NYDUz10tzs5r5QhP9hK0p+ZOlRiBwPdTAxqAYLw/8emYBkQQLaS8T1DF6EkeudyrgS00ym5Trw1fo4iA==" + }, + "node_modules/@fivebinaries/coin-selection/node_modules/@emurgo/cardano-serialization-lib-nodejs": { + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/@emurgo/cardano-serialization-lib-nodejs/-/cardano-serialization-lib-nodejs-11.5.0.tgz", + "integrity": "sha512-IlVABlRgo9XaTR1NunwZpWcxnfEv04ba2l1vkUz4S1W7Jt36F4CtffP+jPeqBZGnAe+fnUwo0XjIJC3ZTNToNQ==" + }, "node_modules/@floating-ui/core": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.2.tgz", @@ -3830,6 +3894,14 @@ "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==", "dev": true }, + "node_modules/@mobily/ts-belt": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/@mobily/ts-belt/-/ts-belt-3.13.1.tgz", + "integrity": "sha512-K5KqIhPI/EoCTbA6CGbrenM9s41OouyK8A03fGJJcla/zKucsgLbz8HNbeseoLarRPgyWJsUyCYqFhI7t3Ra9Q==", + "engines": { + "node": ">= 10.*" + } + }, "node_modules/@mui/base": { "version": "5.0.0-beta.40", "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.40.tgz", @@ -4284,6 +4356,31 @@ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, + "node_modules/@noble/curves": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", + "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", + "dependencies": { + "@noble/hashes": "1.5.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/curves/node_modules/@noble/hashes": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@noble/hashes": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", @@ -5616,6 +5713,42 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@sentry/core": { "version": "6.19.7", "resolved": "https://registry.npmjs.org/@sentry/core/-/core-6.19.7.tgz", @@ -5707,6 +5840,11 @@ "integrity": "sha512-sBSO19KzdrJCM3gdx6eIxV8M9Gxfgg6iDQmH5TIAGaUu+X9VDdsINXJOnoiZ1Kx3TrHdH4bt5UVglkjsEGBcvw==", "dev": true }, + "node_modules/@sinclair/typebox": { + "version": "0.31.28", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.31.28.tgz", + "integrity": "sha512-/s55Jujywdw/Jpan+vsy6JZs1z2ZTGxTmbZTPiuSL2wz9mfzA2gN1zzaqmvfi4pq+uOt7Du85fkiwv5ymW84aQ==" + }, "node_modules/@sindresorhus/is": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz", @@ -5737,6 +5875,55 @@ "@sinonjs/commons": "^1.7.0" } }, + "node_modules/@solana/buffer-layout": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", + "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", + "dependencies": { + "buffer": "~6.0.3" + }, + "engines": { + "node": ">=5.10" + } + }, + "node_modules/@solana/web3.js": { + "version": "1.95.5", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.95.5.tgz", + "integrity": "sha512-hU9cBrbg1z6gEjLH9vwIckGBVB78Ijm0iZFNk4ocm5OD82piPwuk3MeQ1rfiKD9YQtr95krrcaopb49EmQJlRg==", + "dependencies": { + "@babel/runtime": "^7.25.0", + "@noble/curves": "^1.4.2", + "@noble/hashes": "^1.4.0", + "@solana/buffer-layout": "^4.0.1", + "agentkeepalive": "^4.5.0", + "bigint-buffer": "^1.1.5", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "bs58": "^4.0.1", + "buffer": "6.0.3", + "fast-stable-stringify": "^1.0.0", + "jayson": "^4.1.1", + "node-fetch": "^2.7.0", + "rpc-websockets": "^9.0.2", + "superstruct": "^2.0.2" + } + }, + "node_modules/@solana/web3.js/node_modules/@babel/runtime": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@solana/web3.js/node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, "node_modules/@svgr/babel-plugin-add-jsx-attribute": { "version": "5.4.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-5.4.0.tgz", @@ -5944,6 +6131,19 @@ "url": "https://github.com/sponsors/gregberge" } }, + "node_modules/@swc/helpers": { + "version": "0.5.15", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", + "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@swc/helpers/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, "node_modules/@szmarczak/http-timer": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", @@ -5966,43 +6166,77 @@ } }, "node_modules/@trezor/analytics": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@trezor/analytics/-/analytics-1.0.5.tgz", - "integrity": "sha512-XpgAsQDi8uZ+PmfCS6KUn+frUqR1ckOY9NdeC0PMGmkTzWm47oatvoyLSy2umd30T9M4h1LJECBqA80XpEV5MA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@trezor/analytics/-/analytics-1.2.0.tgz", + "integrity": "sha512-q3lJtHL0tXDEbjl/pENpmUVzVcTd9NW4G2gskY2OKLsUykWP0pqN+9YX41C/f2TvMePVEA67kzXTm9US2sB2eA==", "dependencies": { - "@trezor/env-utils": "1.0.4", - "@trezor/utils": "9.0.11" + "@trezor/env-utils": "1.2.0", + "@trezor/utils": "9.2.0" + }, + "peerDependencies": { + "tslib": "^2.6.2" } }, "node_modules/@trezor/blockchain-link": { - "version": "2.1.15", - "resolved": "https://registry.npmjs.org/@trezor/blockchain-link/-/blockchain-link-2.1.15.tgz", - "integrity": "sha512-Y7QsggFUGk84yKY06eSuS3oTNwH+chz0fuCWMs7aKr4TxXsxILNwzoYg7Erecf+WZuydAdmjZRDT4QbmMUc65g==", - "dependencies": { - "@trezor/blockchain-link-types": "1.0.4", - "@trezor/blockchain-link-utils": "1.0.5", - "@trezor/utils": "9.0.11", - "@trezor/utxo-lib": "1.0.9", - "@types/web": "^0.0.100", - "bignumber.js": "^9.1.1", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@trezor/blockchain-link/-/blockchain-link-2.3.0.tgz", + "integrity": "sha512-kuDHXIVhiTzpCmqoCH3zzCtM2BK+MEIvlj+GpA9VHPQbMGM55YU6c7M2jtq3vbw1XdtyvmvTD/s7Y8/WZR+IMg==", + "dependencies": { + "@solana/buffer-layout": "^4.0.1", + "@solana/web3.js": "^1.95.0", + "@trezor/blockchain-link-types": "1.2.0", + "@trezor/blockchain-link-utils": "1.2.0", + "@trezor/utils": "9.2.0", + "@trezor/utxo-lib": "2.2.0", + "@types/web": "^0.0.138", "events": "^3.3.0", "ripple-lib": "^1.10.1", "socks-proxy-agent": "6.1.1", - "ws": "7.5.9" + "ws": "^8.18.0" + }, + "peerDependencies": { + "tslib": "^2.6.2" } }, "node_modules/@trezor/blockchain-link-types": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@trezor/blockchain-link-types/-/blockchain-link-types-1.0.4.tgz", - "integrity": "sha512-EBX8Fi38mqIRStOQsUNbma1RwEP57B104N77p1CPHML3Kxu6M0DVcTulFKJKAJ6laQyfULzTeUYfEdn//dCcFA==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@trezor/blockchain-link-types/-/blockchain-link-types-1.2.0.tgz", + "integrity": "sha512-MCukIR4R6IuzAS4I51j9r0KRYXGBNzqMAPh0Fc9gerWvEC9rNrcsbYYDJy/7wYsiAxHRVYiqUyq9yTjUzUkdUA==", + "dependencies": { + "@solana/web3.js": "^1.95.0", + "@trezor/type-utils": "1.1.0", + "@trezor/utxo-lib": "2.2.0", + "socks-proxy-agent": "6.1.1" + }, + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/blockchain-link-types/node_modules/socks-proxy-agent": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz", + "integrity": "sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==", + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.1", + "socks": "^2.6.1" + }, + "engines": { + "node": ">= 10" + } }, "node_modules/@trezor/blockchain-link-utils": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@trezor/blockchain-link-utils/-/blockchain-link-utils-1.0.5.tgz", - "integrity": "sha512-Kj8Zuy22ApV+FcLhMFdFVMAjbJwS4VaXndkz1OgjF7UHTb0jEJtIk5JSe5KNbvNUsyGcEAn9vZ+RogfZETOVGw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@trezor/blockchain-link-utils/-/blockchain-link-utils-1.2.0.tgz", + "integrity": "sha512-C9nMCbj5qaMvKzUXfMb1+nfPZd6StTeIBpQBFEnvHOcCl6p4Meab1HUSVJ+Dcd1Y+y0mhlWGcOw8ZvBTLIB/Pg==", "dependencies": { - "@trezor/utils": "9.0.11", - "bignumber.js": "^9.1.1" + "@mobily/ts-belt": "^3.13.1", + "@solana/web3.js": "^1.95.0", + "@trezor/env-utils": "1.2.0", + "@trezor/utils": "9.2.0" + }, + "peerDependencies": { + "tslib": "^2.6.2" } }, "node_modules/@trezor/blockchain-link/node_modules/socks-proxy-agent": { @@ -6018,51 +6252,88 @@ "node": ">= 10" } }, + "node_modules/@trezor/blockchain-link/node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/@trezor/connect": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@trezor/connect/-/connect-9.1.1.tgz", - "integrity": "sha512-qIovN55BN5zciRiwIeEAHISjspy9jWkusBntk5z5SFmXw95KG6trms7GCodpbEuueboUS9Ts9xHorYwvqMmweg==", - "dependencies": { - "@trezor/blockchain-link": "2.1.15", - "@trezor/blockchain-link-types": "1.0.4", - "@trezor/connect-analytics": "1.0.4", - "@trezor/connect-common": "0.0.18", - "@trezor/transport": "1.1.14", - "@trezor/utils": "9.0.11", - "@trezor/utxo-lib": "1.0.9", - "bignumber.js": "^9.1.1", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@trezor/connect/-/connect-9.4.0.tgz", + "integrity": "sha512-gtY5coDzTEaJ/mrdXkRgpWARO/bWcEDFIuJMPjpEr27UzeTZy8loSFRA7jR3IsJXHyxJ7g8iLrd4jeuC9rdpow==", + "dependencies": { + "@babel/preset-typescript": "^7.24.7", + "@ethereumjs/common": "^4.3.0", + "@ethereumjs/tx": "^5.3.0", + "@fivebinaries/coin-selection": "2.2.1", + "@trezor/blockchain-link": "2.3.0", + "@trezor/blockchain-link-types": "1.2.0", + "@trezor/connect-analytics": "1.2.0", + "@trezor/connect-common": "0.2.0", + "@trezor/protobuf": "1.2.0", + "@trezor/protocol": "1.2.0", + "@trezor/schema-utils": "1.2.0", + "@trezor/transport": "1.3.0", + "@trezor/utils": "9.2.0", + "@trezor/utxo-lib": "2.2.0", "blakejs": "^1.2.1", "bs58": "^5.0.0", "bs58check": "^3.0.1", - "cross-fetch": "^3.1.6", - "events": "^3.3.0", - "randombytes": "2.1.0" + "cross-fetch": "^4.0.0" + }, + "peerDependencies": { + "tslib": "^2.6.2" } }, "node_modules/@trezor/connect-analytics": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@trezor/connect-analytics/-/connect-analytics-1.0.4.tgz", - "integrity": "sha512-GLD5CCh6hcXsovxM2Fyns25GbGRCJ3lgFhWQ9WyqkFveI41cwMGCJZuXSyGSWCeMpazOYdvpgyXMqc22J2tatg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@trezor/connect-analytics/-/connect-analytics-1.2.0.tgz", + "integrity": "sha512-tgbxoHQN8TUMjZ9k2XgIya3+nYcQFG+eUKNHzBe6zN2vyXuWF93jAph4uC42L+8YbYYya080BwCXjq0YfGZQgA==", "dependencies": { - "@trezor/analytics": "1.0.5" + "@trezor/analytics": "1.2.0" + }, + "peerDependencies": { + "tslib": "^2.6.2" } }, "node_modules/@trezor/connect-common": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/@trezor/connect-common/-/connect-common-0.0.18.tgz", - "integrity": "sha512-tFian3z2ce/gQpjtFddr5NCKeJEEpV/t+Srb0Sa/STXqY/mTaADzti1aqp+/w4bL+1E2NNdAmCtsCl5AZc4a+A==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@trezor/connect-common/-/connect-common-0.2.0.tgz", + "integrity": "sha512-yfLbOOBQyKoXblLGTjhArv0AxAUrxm+asOYT+WFR+SocuIxFlWLOEk80HYfowucPJ1aN0W8T/kTOPCO+x9pd+Q==", "dependencies": { - "@trezor/env-utils": "1.0.4" + "@trezor/env-utils": "1.2.0", + "@trezor/utils": "9.2.0" + }, + "peerDependencies": { + "tslib": "^2.6.2" } }, "node_modules/@trezor/connect-web": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@trezor/connect-web/-/connect-web-9.1.1.tgz", - "integrity": "sha512-FDwdARtUAITO80bahfU5gR4NS0q85rOvtyCCtwGgbH04JpOvmmoaNgYdXwfYfPaZCd2ZxZZ4omBermVPaE/wvA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@trezor/connect-web/-/connect-web-9.4.0.tgz", + "integrity": "sha512-y3upWE6LA7Qq2uHiTcw3IOgT4vSYfG9fxUOBmtiEpBo5A0QHH7MNDk5eTVoKJ7Hcc2A/qOCR8aA++3hOXTZGrA==", "dependencies": { - "@trezor/connect": "9.1.1", - "@trezor/utils": "9.0.11", - "events": "^3.3.0" + "@trezor/connect": "9.4.0", + "@trezor/connect-common": "0.2.0", + "@trezor/utils": "9.2.0" + }, + "peerDependencies": { + "tslib": "^2.6.2" } }, "node_modules/@trezor/connect/node_modules/base-x": { @@ -6087,92 +6358,140 @@ "bs58": "^5.0.0" } }, + "node_modules/@trezor/connect/node_modules/cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, "node_modules/@trezor/env-utils": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@trezor/env-utils/-/env-utils-1.0.4.tgz", - "integrity": "sha512-V9DdjpCH6hyN7AYPEIV1WR44fmgN6d3iF8DtHYNljnMFOaan167DDVq51ZpSPAnyppulIEhdK7kuLDW3KPcnpw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@trezor/env-utils/-/env-utils-1.2.0.tgz", + "integrity": "sha512-dbOR+PIeReZW4iooN+DQIMWloZAV92jMGOTzEdcY6NA63nCV8QUSxoNZwZtU9nVRPeJLrT6cVkVG80nZjlplow==", "dependencies": { - "ua-parser-js": "^1.0.35" + "ua-parser-js": "^1.0.37" }, "peerDependencies": { - "expo-localization": "^14.1.1", - "react-native": "0.71.8", - "react-native-config": "^1.5.0" + "expo-constants": "*", + "expo-localization": "*", + "react-native": "*", + "tslib": "^2.6.2" }, "peerDependenciesMeta": { - "expo-localization": { + "expo-constants": { "optional": true }, - "react-native": { + "expo-localization": { "optional": true }, - "react-native-config": { + "react-native": { "optional": true } } }, - "node_modules/@trezor/transport": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/@trezor/transport/-/transport-1.1.14.tgz", - "integrity": "sha512-KRurYZonsPugKyCJFEEkDi82gjD1lwNDEaROCwQvIHcdXO2spHj1XDlIWa8dgBVrglukJmYutqCzE+RtaMeVVQ==", + "node_modules/@trezor/protobuf": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@trezor/protobuf/-/protobuf-1.2.0.tgz", + "integrity": "sha512-lc09F0MotgKx3W9+hPGY1f/egRgymNha6PQJTgTaXam/6yoP7MSA9obQlmvndJZymbdqLb9jbtigGuLgoxx6Bw==", "dependencies": { - "@trezor/utils": "9.0.11", - "bytebuffer": "^5.0.1", - "cross-fetch": "^3.1.6", - "json-stable-stringify": "^1.0.2", - "long": "^4.0.0", - "prettier": "2.8.8", - "protobufjs": "7.2.4", - "usb": "^2.9.0" + "@trezor/schema-utils": "1.2.0", + "protobufjs": "7.2.6" + }, + "peerDependencies": { + "tslib": "^2.6.2" } }, - "node_modules/@trezor/transport/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + "node_modules/@trezor/protocol": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@trezor/protocol/-/protocol-1.2.0.tgz", + "integrity": "sha512-2dE/deXGszpnOAF1FHvx1QG8pwkwCm2UqN3lfD0mBobpvTjkLqNROuOCwDN/HApMV0f3OYoIVR6Y3mgkRfc42w==", + "peerDependencies": { + "tslib": "^2.6.2" + } }, - "node_modules/@trezor/transport/node_modules/json-stable-stringify": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz", - "integrity": "sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==", + "node_modules/@trezor/schema-utils": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@trezor/schema-utils/-/schema-utils-1.2.0.tgz", + "integrity": "sha512-LUvcNpYjrkOyThVqzMobWXl7W39apyp5tlaj0LRkCQFRvpt1q8eXynjdLb2ofJTiwrMvLLFB4NRRpD3hBqu1LQ==", "dependencies": { - "call-bind": "^1.0.5", - "isarray": "^2.0.5", - "jsonify": "^0.0.1", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" + "@sinclair/typebox": "^0.31.28", + "ts-mixer": "^6.0.3" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "peerDependencies": { + "tslib": "^2.6.2" } }, - "node_modules/@trezor/transport/node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "bin": { - "prettier": "bin-prettier.js" + "node_modules/@trezor/transport": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@trezor/transport/-/transport-1.3.0.tgz", + "integrity": "sha512-rgUwtH63PJRoOftkLcIo4/ElkaKq/2ban4wf2y/8k7lseU4OQXl5yxBJS7dGc3rVtxSBd3QhL6TY3h9icrJUVQ==", + "dependencies": { + "@trezor/protobuf": "1.2.0", + "@trezor/protocol": "1.2.0", + "@trezor/utils": "9.2.0", + "cross-fetch": "^4.0.0", + "long": "^4.0.0", + "protobufjs": "7.2.6", + "usb": "^2.11.0" }, + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/transport/node_modules/cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "node_modules/@trezor/transport/node_modules/node-addon-api": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.2.2.tgz", + "integrity": "sha512-9emqXAKhVoNrQ792nLI/wpzPpJ/bj/YXxW0CvAau1+RdGBcCRF1Dmz7719zgVsQNrzHl9Tzn3ImZ4qWFarWL0A==", "engines": { - "node": ">=10.13.0" + "node": "^18 || ^20 || >= 21" + } + }, + "node_modules/@trezor/transport/node_modules/usb": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/usb/-/usb-2.14.0.tgz", + "integrity": "sha512-I3lzVOH21BsO6qPYvx1C7Ji08lbuM0qmsEtNGAphqlhNME5cz/vExY+jIXZl+HQIRybI/sTxdyLab5tALsL69w==", + "hasInstallScript": true, + "dependencies": { + "@types/w3c-web-usb": "^1.0.6", + "node-addon-api": "^8.0.0", + "node-gyp-build": "^4.5.0" }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" + "engines": { + "node": ">=12.22.0 <13.0 || >=14.17.0" } }, + "node_modules/@trezor/type-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@trezor/type-utils/-/type-utils-1.1.0.tgz", + "integrity": "sha512-zoPN9ZmdYlr03WyCWEQY6xCHPfhsodENYHPcZMKObVsUlhtMh1Z7OSD/pzd/NzOPBAtSctNbldx4aFu9A88afw==" + }, "node_modules/@trezor/utils": { - "version": "9.0.11", - "resolved": "https://registry.npmjs.org/@trezor/utils/-/utils-9.0.11.tgz", - "integrity": "sha512-HJBgR6/VYjJX8AP/fNIcYC+gDNjP2JLfgYBrT/naupEwDQJcxfn8KgUBrR1/akm61g8CPOot/YEj4o5nXuRt/g==" + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/@trezor/utils/-/utils-9.2.0.tgz", + "integrity": "sha512-OslmtISmVl2r5lS/BPagyaWYudT/fSiezrSaKA1aDctGKOrze1JkA7p5J1j0uUAgjf9HODCiH8+PBAVXjUZL8A==", + "dependencies": { + "bignumber.js": "^9.1.2" + }, + "peerDependencies": { + "tslib": "^2.6.2" + } }, "node_modules/@trezor/utxo-lib": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@trezor/utxo-lib/-/utxo-lib-1.0.9.tgz", - "integrity": "sha512-ezLJzAslhW6HVTyZWpfBmrXY5/hz5XKT0FkYRS7lhnf56LwtVPUkLvLqGtDPuV8djF04meXxoRNO8jjtnQgYqA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@trezor/utxo-lib/-/utxo-lib-2.2.0.tgz", + "integrity": "sha512-Fhu+QZjOMpiipmJWdRAwbJEVk4DtwZfh7jy67vjgliWlO9p8M5Ap3XzlbZGF9+mKLrACjv/yhN63XMqTbxVcqw==", "dependencies": { - "@trezor/utils": "9.0.11", + "@trezor/utils": "9.2.0", "bchaddrjs": "^0.5.2", "bech32": "^2.0.0", "bip66": "^1.1.5", @@ -6182,14 +6501,16 @@ "bn.js": "^5.2.1", "bs58": "^5.0.0", "bs58check": "^3.0.1", - "create-hash": "^1.2.0", "create-hmac": "^1.1.7", "int64-buffer": "^1.0.1", "pushdata-bitcoin": "^1.0.1", "tiny-secp256k1": "^1.1.6", "typeforce": "^1.18.0", "varuint-bitcoin": "^1.1.2", - "wif": "^2.0.6" + "wif": "^4.0.0" + }, + "peerDependencies": { + "tslib": "^2.6.2" } }, "node_modules/@trezor/utxo-lib/node_modules/base-x": { @@ -6214,6 +6535,14 @@ "bs58": "^5.0.0" } }, + "node_modules/@trezor/utxo-lib/node_modules/wif": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/wif/-/wif-4.0.0.tgz", + "integrity": "sha512-kADznC+4AFJNXpT8rLhbsfI7EmAcorc5nWvAdKUchGmwXEBD3n55q0/GZ3DBmc6auAvuTSsr/utiKizuXdNYOQ==", + "dependencies": { + "bs58check": "^3.0.1" + } + }, "node_modules/@ts-nameof/common": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/@ts-nameof/common/-/common-4.2.1.tgz", @@ -6325,7 +6654,6 @@ "version": "3.4.38", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", - "dev": true, "dependencies": { "@types/node": "*" } @@ -6591,9 +6919,9 @@ } }, "node_modules/@types/lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha512-wYCP26ZLxaT3R39kiN2+HcJ4kTd3U1waI/cY7ivWYqFP6pW3ZNpvi6Wd6PHZx7T/t8z0vlkXMg3QYLa7DZ/IJQ==" + "version": "4.17.13", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.13.tgz", + "integrity": "sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg==" }, "node_modules/@types/mdast": { "version": "3.0.15", @@ -6834,15 +7162,20 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, + "node_modules/@types/uuid": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", + "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" + }, "node_modules/@types/w3c-web-usb": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/@types/w3c-web-usb/-/w3c-web-usb-1.0.10.tgz", "integrity": "sha512-CHgUI5kTc/QLMP8hODUHhge0D4vx+9UiAwIGiT0sTy/B2XpdX1U5rJt6JSISgr6ikRT7vxV9EVAFeYZqUnl1gQ==" }, "node_modules/@types/web": { - "version": "0.0.100", - "resolved": "https://registry.npmjs.org/@types/web/-/web-0.0.100.tgz", - "integrity": "sha512-8NDSrDsyF7qv93SQ7aNFk0NqpNb1QEC1meoEZW/+KGMHZWd0WOC2DiT9pVhS5+w5q+u9+2bkBCfUQpe9wbqiPA==" + "version": "0.0.138", + "resolved": "https://registry.npmjs.org/@types/web/-/web-0.0.138.tgz", + "integrity": "sha512-oQD74hl+cNCZdSWIupJCXZ2azTuB3MJ/mrWlgYt+v4pD7/Dr78gl5hKAdieZNf9NrAqwUez79bHtnFVSNSscWA==" }, "node_modules/@types/ws": { "version": "7.4.7", @@ -6868,16 +7201,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.12.2.tgz", - "integrity": "sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.15.0.tgz", + "integrity": "sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.12.2", - "@typescript-eslint/type-utils": "8.12.2", - "@typescript-eslint/utils": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2", + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/type-utils": "8.15.0", + "@typescript-eslint/utils": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -6901,15 +7234,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.12.2.tgz", - "integrity": "sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.15.0.tgz", + "integrity": "sha512-7n59qFpghG4uazrF9qtGKBZXn7Oz4sOMm8dwNWDQY96Xlm2oX67eipqcblDj+oY1lLCbf1oltMZFpUso66Kl1A==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.12.2", - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/typescript-estree": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2", + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/typescript-estree": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", "debug": "^4.3.4" }, "engines": { @@ -6929,13 +7262,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.12.2.tgz", - "integrity": "sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.15.0.tgz", + "integrity": "sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2" + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -6946,13 +7279,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.12.2.tgz", - "integrity": "sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.15.0.tgz", + "integrity": "sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.12.2", - "@typescript-eslint/utils": "8.12.2", + "@typescript-eslint/typescript-estree": "8.15.0", + "@typescript-eslint/utils": "8.15.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -6963,6 +7296,9 @@ "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, "peerDependenciesMeta": { "typescript": { "optional": true @@ -6970,9 +7306,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.12.2.tgz", - "integrity": "sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.15.0.tgz", + "integrity": "sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -6983,13 +7319,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.12.2.tgz", - "integrity": "sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.15.0.tgz", + "integrity": "sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -7035,15 +7371,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.12.2.tgz", - "integrity": "sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.15.0.tgz", + "integrity": "sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.12.2", - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/typescript-estree": "8.12.2" + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/typescript-estree": "8.15.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -7054,16 +7390,21 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.12.2.tgz", - "integrity": "sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.15.0.tgz", + "integrity": "sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.12.2", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.15.0", + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -7074,12 +7415,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -7808,7 +8149,6 @@ "version": "4.5.0", "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", - "dev": true, "dependencies": { "humanize-ms": "^1.2.1" }, @@ -9184,6 +9524,18 @@ "node": "*" } }, + "node_modules/bigint-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", + "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", + "hasInstallScript": true, + "dependencies": { + "bindings": "^1.3.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/bignumber.js": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", @@ -9450,6 +9802,16 @@ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" }, + "node_modules/borsh": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", + "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", + "dependencies": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -9728,6 +10090,19 @@ "node": ">=0.2.0" } }, + "node_modules/bufferutil": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/byline": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz", @@ -9743,25 +10118,6 @@ "integrity": "sha512-ovBpjmsgd/teRmgcPh23d4gJvxDoXtAzEL9xTfMU8Yc2kqCDb7L9jAG0XHl1nzuGl+h3ebCIF1i62UFyA9V/2Q==", "dev": true }, - "node_modules/bytebuffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", - "integrity": "sha512-IuzSdmADppkZ6DlpycMkm8l9zeEq16fWtLvunEwFiYciR/BHo4E8/xs5piFquG+Za8OWmMqHF8zuRviz2LHvRQ==", - "dependencies": { - "long": "~3" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/bytebuffer/node_modules/long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg==", - "engines": { - "node": ">=0.6" - } - }, "node_modules/bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -11420,6 +11776,7 @@ "version": "3.1.8", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "dev": true, "dependencies": { "node-fetch": "^2.6.12" } @@ -12219,6 +12576,17 @@ "uniq": "^1.0.1" } }, + "node_modules/delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -12918,6 +13286,19 @@ "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==" }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "node_modules/es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "dependencies": { + "es6-promise": "^4.0.3" + } + }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -13637,6 +14018,28 @@ "node": ">= 0.6" } }, + "node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/ethereum-cryptography/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -14015,6 +14418,14 @@ "node": ">=8" } }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "engines": { + "node": "> 0.1.90" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -14068,6 +14479,11 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fast-stable-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", + "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" + }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", @@ -15945,7 +16361,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "dev": true, "dependencies": { "ms": "^2.0.0" } @@ -17008,6 +17423,14 @@ "node": ">=0.10.0" } }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "peerDependencies": { + "ws": "*" + } + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", @@ -17128,6 +17551,69 @@ "node": ">=8" } }, + "node_modules/jayson": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.2.tgz", + "integrity": "sha512-5nzMWDHy6f+koZOuYsArh2AXs73NfWYVlFyJJuCedr93GpY+Ku8qq10ropSXVfHK+H0T6paA88ww+/dV+1fBNA==", + "dependencies": { + "@types/connect": "^3.4.33", + "@types/node": "^12.12.54", + "@types/ws": "^7.4.4", + "commander": "^2.20.3", + "delay": "^5.0.0", + "es6-promisify": "^5.0.0", + "eyes": "^0.1.8", + "isomorphic-ws": "^4.0.1", + "json-stringify-safe": "^5.0.1", + "JSONStream": "^1.3.5", + "uuid": "^8.3.2", + "ws": "^7.5.10" + }, + "bin": { + "jayson": "bin/jayson.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jayson/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + }, + "node_modules/jayson/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/jayson/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/jayson/node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/jdenticon": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jdenticon/-/jdenticon-3.2.0.tgz", @@ -19200,6 +19686,11 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -19224,10 +19715,19 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "engines": [ + "node >= 0.2.0" + ] + }, "node_modules/jsonschema": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.2.2.tgz", @@ -19236,6 +19736,21 @@ "node": "*" } }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, "node_modules/jsx-ast-utils": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", @@ -22839,9 +23354,9 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/protobufjs": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.4.tgz", - "integrity": "sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==", + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", + "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", "hasInstallScript": true, "dependencies": { "@protobufjs/aspromise": "^1.1.2", @@ -24042,6 +24557,69 @@ "lodash": "^4.17.15" } }, + "node_modules/rpc-websockets": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-9.0.4.tgz", + "integrity": "sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ==", + "dependencies": { + "@swc/helpers": "^0.5.11", + "@types/uuid": "^8.3.4", + "@types/ws": "^8.2.2", + "buffer": "^6.0.3", + "eventemitter3": "^5.0.1", + "uuid": "^8.3.2", + "ws": "^8.5.0" + }, + "funding": { + "type": "paypal", + "url": "https://paypal.me/kozjak" + }, + "optionalDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + } + }, + "node_modules/rpc-websockets/node_modules/@types/ws": { + "version": "8.5.13", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz", + "integrity": "sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/rpc-websockets/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + }, + "node_modules/rpc-websockets/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/rpc-websockets/node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/rsvp": { "version": "4.8.5", "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz", @@ -25729,6 +26307,14 @@ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==" }, + "node_modules/superstruct": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz", + "integrity": "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -26179,6 +26765,11 @@ "node": ">=8" } }, + "node_modules/text-encoding-utf-8": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", + "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==" + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -26194,8 +26785,7 @@ "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" }, "node_modules/throwback": { "version": "4.1.0", @@ -26215,9 +26805,9 @@ "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==" }, "node_modules/tiny-secp256k1": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz", - "integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.7.tgz", + "integrity": "sha512-eb+F6NabSnjbLwNoC+2o5ItbmP1kg7HliWue71JgLegQt6A5mTN8YbvTLCazdlg6e5SV6A+r8OGvZYskdlmhqQ==", "hasInstallScript": true, "dependencies": { "bindings": "^1.3.0", @@ -26231,9 +26821,9 @@ } }, "node_modules/tiny-secp256k1/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", + "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==" }, "node_modules/tiny-warning": { "version": "1.0.3", @@ -26399,11 +26989,11 @@ }, "node_modules/trezor-connect-flow": { "version": "1.0.0", - "resolved": "git+ssh://git@github.com/Emurgo/trezor-connect-flow.git#92d6d8c8faef25c0ea1d481aa1ecb4ba77ce539c", - "integrity": "sha512-XkgQsN8AVPs8ucg2qWUUY+u2lgBJnfzzBjC7SoHAp0N5VFI5vsi5CRJ4URbaC7kTMJwoOrjQ2rNyIgFEKYwm+Q==", + "resolved": "git+ssh://git@github.com/Emurgo/trezor-connect-flow.git#692d366d4934382b5049e29683974e38156ccfc6", + "integrity": "sha512-6+w/X+GsrwAodsDKLAnFAaWD9MzF+NJPRaN7eQ3cmHrGoyjKoir+GZlMUI4YLz5Q52TTWwlakGL+LZCKXcfHMw==", "license": "MIT", "dependencies": { - "@trezor/connect-web": "9.1.1" + "@trezor/connect-web": "9.4.0" } }, "node_modules/trim-newlines": { @@ -26539,6 +27129,11 @@ "node": ">=8" } }, + "node_modules/ts-mixer": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", + "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==" + }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -27285,6 +27880,19 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/util": { "version": "0.12.5", "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", diff --git a/packages/yoroi-extension/package.json b/packages/yoroi-extension/package.json index 620f52fa44..1c1da99856 100644 --- a/packages/yoroi-extension/package.json +++ b/packages/yoroi-extension/package.json @@ -1,6 +1,6 @@ { "name": "yoroi", - "version": "5.4.311", + "version": "5.4.500", "description": "Cardano ADA wallet", "scripts": { "dev-mv2": "rimraf dev/ && NODE_OPTIONS=--openssl-legacy-provider babel-node scripts-mv2/build --type=debug --env 'mainnet'", @@ -226,7 +226,7 @@ "semver": "7.6.0", "stream-browserify": "3.0.0", "tinycolor2": "1.4.2", - "trezor-connect-flow": "Emurgo/trezor-connect-flow#92d6d8c8faef25c0ea1d481aa1ecb4ba77ce539c", + "trezor-connect-flow": "Emurgo/trezor-connect-flow#692d366d4934382b5049e29683974e38156ccfc6", "ts-loader": "^9.5.1", "typescript": "^5.4.5", "ua-parser-js": "1.0.37", diff --git a/run-dev.sh b/run-dev.sh index 95483286cc..a08455035d 100644 --- a/run-dev.sh +++ b/run-dev.sh @@ -1 +1 @@ -nvm i && . install-all.sh && npm run dev:stable --prefix packages/yoroi-extension \ No newline at end of file +nvm i && . install-all.sh && npm run "dev${1:-:stable}" --prefix packages/yoroi-extension \ No newline at end of file